how can i use matlab and write code function taylor y=f(x) to level n at x0 in matlab?? please help..

1 view (last 30 days)
abc

Answers (1)

James Tursa
James Tursa on 5 Dec 2018
Use the taylor( ) function.
  3 Comments
James Tursa
James Tursa on 6 Dec 2018
E.g.,
>> syms x
>> taylor(exp(x),x)
ans =
x^5/120 + x^4/24 + x^3/6 + x^2/2 + x + 1
>> taylor(exp(-x),x,'Order',8)
ans =
- x^7/5040 + x^6/720 - x^5/120 + x^4/24 - x^3/6 + x^2/2 - x + 1

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!