Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

An approximation of sin(x) around the point x = 0 can be represent as a Taylor s

ID: 2325077 • Letter: A

Question

An approximation of sin(x) around the point x = 0 can be represent as a Taylor series as follow,

Write a C code does the following

b. Since the expansion is made around x=0, it will start to miss-predict the value once x is far from 0. Make a table in the following form to find out where the Taylor series (of seventh order) fail to predict the sin(x) within an error of 1%

x

true value

3rd order value

3rd order error

5rd order value

5rd order error

7rd order value

7rd order error

0.01

0.02

0.03

Note: use function “sin()” within “math.h” as the accurate result.

x

true value

3rd order value

3rd order error

5rd order value

5rd order error

7rd order value

7rd order error

0.01

0.02

0.03

Explanation / Answer

C Code: #include #include long int factorial(int m) { if (m==0 || m==1) return (1); else return (m*factorial(m-1)); } double power(double x,int n) { double val=1; int i; for (i=1;i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote