next up previous contents
Next: Indefinite Integral Up: Calculus Previous: Differentiation

Taylorpolynomial

taylor(function, x, x0, n) calculates the n-th Taylorpolynomial in the symbolic variable x at the point x0.
>> syms x
>> taylor(log(x),x,1,1)
ans = x-1
>> rat( taylor(exp(x),x,0,6))
ans = 1/720*x^6+1/120*x^5+1/24*x^4+1/6*x^3+1/2*x^2+x+1
>> float( taylor(x^3*sin(2*x+pi/4),x,pi/8,2))
ans = 1.057*x^2-0.36751*x+4.1881E-2



Helmut Dersch
2009-03-15