Question: The sine function can be evaluated by the following infinite series: s i n x = x - x 3 3 ! + x 5

The sine function can be evaluated by the following infinite series:
sinx=x-x33!+x55!-dots
Create a function file to implement this formula where the input parameters are x and n for the number of terms to be computed. Return a vector series comprised of each term in the sequence i.e x,x-x33!,x-x33!+x55!,dots. From the main program (this file) compute and display the error
% error =true-seriesapproximationtrue100%
between the series approximations using your own function where x=0.8,n=5 and the true value found with the built-in sin(x) function.
Please solve using matlab
 The sine function can be evaluated by the following infinite series:

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!