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

Consider the function f(x) = cos(x). Expand f(x) using Taylor series near x = 0.

ID: 3143858 • Letter: C

Question

Consider the function f(x) = cos(x). Expand f(x) using Taylor series near x = 0.2. That is, express f(x) in the form f(x) ~ a_0 + a_1 (x - 0.2) + a_2 (x - 0.2)^2 + ... a) Find the numerical values of a_0, a_1, a_2 (Show your work) b) Use 3 terms as given in the expression above to compute f(x = 0.25), what is the truncation error? c) Use 3 terms as given in the expression above to compute f(x = 0.2), what is the truncation error? d) Use 3 terms as given in the expression above to compute f(x = 0), what is the truncation error?

Explanation / Answer

f(x) = f(x0) + f'(x0) (x -x0) + f''(x0)/2 *(x-x0)^2 + ...

f(x) = cos(0.2) -sin(0.2) (x-0.2) -cos(0.2)/2 * (x-0.2)^2 + ..

f(x) = 0.980067 - 0.198669 (x-0.2) - 0.490033*(x-0.2)^2

b) f(0.25) =0.980067 - 0.198669 (0.25-0.2) - 0.490033*(0.25-0.2)^2

=0.968908

truncation error = |cos(0.25) - 0.968908| = 0.00000442171

c) f(0.2) = 0.980067

trucation error = 0

d) f(0) = 0.980067 - 0.198669 (0-0.2) - 0.490033*(0-0.2)^2

=1.00019948

truncation error = 0.00019948

Please rate my solution