APPLIED NUMERICAL METHODS WITH WOLFRAM MATHEMATICA The sine function can be eval
ID: 2254818 • Letter: A
Question
APPLIED NUMERICAL METHODS WITH WOLFRAM MATHEMATICA
The sine function can be evaluated by the following infinite series: sinx =x-31+5! Create an M-file to implement this formula so that it computes and displays the values of sin x as each term in the series is added. In other words, compute and display in sequence the values for sin x = x 3! sinx = x-3, + up to the order term of your choosing. For each of the preceding, compute and display the percent relative error as %error- As a test case, employ the program to compute sin(0.9) for up to and including eight terms-- true series approximation true x100% that is, up to the term x15/15!Explanation / Answer
this is the expansion of sinx to calculate the approximate value of sinx at any given x
what question,ask you to do is to calculate the value of sin(x) using different number of terms.
first use only one term,then use two terms,then 3 terms. And simultaneously calculate the error(difference) from actual value of sin(x).
the purpose of the exercise is to show that when you use more terms,you tend to get more accurate (closer to actual) value.
Here in the table ,in columns you have actual value of sin(x) at x=0.9.sin(0.9)=0.78332691 with just first term,sin(0.9)=x=0.9 (at this value the error is calculated in the last column)
with 2 terms,sin(0.9)=x-x^3/3!=0.7785
similarly rest of the table
x 0.9
term no actual value series approx % error 1 0.78332691 0.900000 -14.9% 2 0.78332691 0.778500 0.6% 3 0.78332691 0.783421 0.0% 4 0.78332691 0.783326 0.0% 5 0.78332691 0.783327 0.0% 6 0.78332691 0.783327 0.0% 7 0.78332691 0.783327 0.0% 8 0.78332691 0.783327 0.0%Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.