Fichiers Sage
var('x')
T1(x) = x T3(x) = T1(x) - x^3/factorial(3) T5(x) = T3(x) + x^5/factorial(5)
xmin = -pi xmax = pi G = plot(T1(x), (x, xmin, xmax), color='blue') G+= plot(T3(x), (x, xmin, xmax), color='orange') G+= plot(T5(x), (x, xmin, xmax), color='red') G+= plot(sin(x), (x, xmin, xmax), color='green') show(G)
y = sin(12*pi/180) y.n()
yapprox = T5(12*pi/180) yapprox.n()
R5(x) = sin(x)-T5(x) erreur = R5(12*pi/180) erreur.n()