Question: Write a MATLAB program that will compute an approximation of the sin of a value using the Taylor senies expansion. The Taylor series expansion of

 Write a MATLAB program that will compute an approximation of the
sin of a value using the Taylor senies expansion. The Taylor series

Write a MATLAB program that will compute an approximation of the sin of a value using the Taylor senies expansion. The Taylor series expansion of the sin tunction is sin(x)=x3!x3+5!x57!x7+=n=0(2n+1)!(1)nx2n+1 And can be approximated by using an upper limit of N rather than infinity on the summation. The program should 1. Read in the value of x and the value of N from the user using MATLAB s s inputfunction 2. Compute the approximation of the sin(x) using N+1 terms in the summation. The approximation should be computed using array operations rather thian Beration. MMATLAB has a buth in sum function that will sum all the elements in an array and a buit in factor fal function that will compute the factonar of: Whole number greater than equal to zero) 3. Display the resuit of the sin(x) approximation. 4. Calcuate the percent diffenece, your approximation minus the value calculated using sin(x), divide by singo then munple with 100 XRead in the value of x and the value of M fron the user usiag MatLaB's Inputfunction 2x - Input ('Please input x '): 3 N- input("please input N '): 4 Again, we will hand code this two for MatLAg Geadief x=pI/2: N=10; Mienerate N+1 terms between to N 7. n= 16 I WConpute the approxfmation of the sin(x) using n+1 tang in the surnation. The approkination should be coeputed asing array operat 1) indpprox: 14 16. farintifint diffpercentr

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!