Question: A commonly used approximation in mathematics is s i n ( x ) = x where x is in radians. Write a script to calculate

A commonly used approximation in mathematics is
sin(x)=x
where x is in radians. Write a script to calculate the relative error, , in the small angle approximation defined by:
=|sin(x)-xsin(x)|
Note the vertical bars indicate this is an absolute value. Write a script to generate a 3-column matrix with the first column containing 100 equally spaced values of x starting at 0.01 and ending at 2, the second column containing the corresponding values of sin(x), and the third column containing the relative error of the small angle approximation. Assign the matrix to the variable
SmallangleErrorTable.
Solve this problem using vectorized code (i.e. do not use a loop in your solution)
 A commonly used approximation in mathematics is sin(x)=x where x is

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!