Polynomial approximation

Approximation of functions using:[br][list][*]Legendre and Chebyshev polynomials on the interval [-1,1].[br][/*][*]Cosine and Sine series on the interval [0,pi].[/*][/list]Things to try:[br][list][*]Change the function f(x).[br][/*][*]Select an option to approximate: Legendre, Chebyshev, Cosine or Sine.[br][/*][*]Drag slider to approximate.[br][/*][/list][br]Notice that the approximation is [b]WRONG[/b], since the first three coefficients are zero by default in the simulation. Enter the first three coefficients to calculate the [b]CORRECT[/b] approximation.

Information: Polynomial approximation