Write Matlab commands to compute and plot the first n partia

Write Matlab commands to compute and plot the first n partial sums of

The plot has the index of the partial sum on the horizontal axis, and the value of the partial sum on the vertical axis. You get to choose n and x. Note that you are supposed to recognize that series.

(-1) x2i+1 i-o (2i+1)!

Solution

Here is the matlab program for the given sumation   

syms i x

s=symsum(((-1)^i*x^(2*i+1))/factorial(2i+1),k,0,inf)

This is the main step in this program as it has to satisfy the given conditions like summation from 0 to infinity

and also given series as the above step solves all the requirements of the given question.

Program:

i=10;

x=5;

s=symsum(((-1)^i*x^(2*i+1))/factorial(2i+1),k,0,inf);

plot(s,x)

--> Based on our requirement x and i values varies.

Write Matlab commands to compute and plot the first n partial sums of The plot has the index of the partial sum on the horizontal axis, and the value of the par

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site