Skip to content

Sala2Code/Interactive-Function-Approximation

Repository files navigation

Interactive-Function-Approximation

Interactive approximation of continuous functions using Remes, Bernstein, and Fourier methods

main.py

The main file contains the interactive plot. You can modify abscissas, function, approximation methods, change the degree of approximation, look error wtih the function and see the difference between numerical computation and symbolic.

InteractiveApproximation py

To modify the new function, write in python. If you want $\sqrt{cos(x^2)}$ you have to write : np.cos(x**2)**(0.5). Maybe, a parser LaTeX will be there like a warning when you put an undefined function ($\frac{1}{x}$ on $[-1;1]$). The code continues to well works in despite of this lack.

We add Fourier Method, but the result is not a polynomial ! So, when you update the slider, keep in mind, we change argument in trigonometric function. His form is iθ with 1≤i≤n We add that to personal pleasure! No comments are written in the report.

UniformApproximation.pdf

Then, it's a scholar project. We made a more of 15 pages project titled "Approximation uniforme de fonctions continues : aspects analytique, algébrique et numérique" explaining how works approximation. The initial subject is about Bernstein Polynomials to then find out the reason why that's approximate and to finish on the Remes algorithm, to get the best polynomial approximation (and that's work very well, try on the code !)

remes.py / remes.jl

If you interested by Remes Alogrithm, a code has been separated to a better handling. And even in 2 langages : Python and Julia.

Julia, $f(x)=cos(3x)*sin(x)^2-ln(2+x^2)$:

Remes jl

Python, $f(x) = e^x$, I compare with Taylor Young approximation:

Remes py

Interpolator.py / Interpolator.jl

There is equally, in these 2 langages, an interpolator code : interpolator ; that's compare equidistants nodes and Tchebychev nodes. The historical example :

Interpolator jl

Lean

And to conclude, we write some definitions and try to prove some basics theorems, propositions, lemmas with Lean about algebra and analysis. See the Lean folder.

About

Interactive approximation of continuous functions using Remes, Bernstein, and Fourier methods

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •