Question: 1. The value of function sin(2) can be approximated by the following formula sin(x) = 2 +}**==- .. for I near zero. (a) Write a

 1. The value of function sin(2) can be approximated by the

1. The value of function sin(2) can be approximated by the following formula sin(x) = 2 +"}**==- .. for I near zero. (a) Write a user-defined function (using a loop) that computes an approximation to sin(2) using the above formula. The factorial is calculated use built-in function factorial, for example, 4! is calculated use factorial(4). Your function must take r and n as input arguments to your user-defined function. n is the number of terms you want to keep in your approximation. The approximation will get more accurate if you keep more terms. (b) Write a M-file that determine the minimum number of terms you need to approximate sin(0.5) with tolerance=0.00000001

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!