> restart;

> f:= x-> x*x - 0.5;

[Maple Math]

> f2:=x-> -1/6+1/(Pi*Pi)*(-4*cos(Pi*x)):

> f3:=x-> -1/6+1/(Pi*Pi)*(-4*cos(Pi*x)+cos(2*Pi*x)):

> f4:=x-> -1/6+1/(Pi*Pi)*(-4*cos(Pi*x)+cos(2*Pi*x)-4/9*cos(3*Pi*x)):

> f5:=x-> -1/6+1/(Pi*Pi)*(-4*cos(Pi*x)+cos(2*Pi*x)-4/9*cos(3*Pi*x)+1/4*cos(4*Pi*x)):

> f6:=x-> -1/6+1/(Pi*Pi)*(-4*cos(Pi*x)+cos(2*Pi*x)-4/9*cos(3*Pi*x)+1/4*cos(4*Pi*x)-4/25*cos(5*Pi*x)):

> plot(f(x), x=-1..1, title="f(x)");

> plot([f(x),f2(x), f3(x), f6(x)], x=-1..1, title="approximations 2,3,6", color=[black,black,black,black]);

> plot([f(x), f2(x)], x=-1..1, title = "second order approximation", color=[black,black]);

> plot([f(x), f3(x)], x=-1..1, title = "third order approximation", color=[black,black]);

> plot([f(x), f4(x)], x=-1..1, title = "fourth order approximation", color=[black,black]);

> plot([f(x), f5(x)], x=-1..1, title = "fifth order approximation", color=[black,black]);

> plot([f(x), f6(x)], x=-1..1, title = "sixth order approximation", color=[black,black]);

>