Calculate c(sub0), c(sub1), c(sub2), c(sub3), and c(sub4) for the power series the sum from n=0 to infinity of c(subn)x^n that represents f(x)=tanx. Use the first two nonzero terms of the series to approximate the tangent of 1/4 radian. Compare your approximation with the actual value of the tangent of 1/4 radian as shown on a calculator. Your help is very much appreciated!

1 answer

Usually, the efficient way to compute Taylor series is by using the Taylor series of the known standard functions like sin(x), cos(x) etc., instead of using the definition of the Taylor series in terms of the derivatives of the function.

In this case, you can write:

tan(x) = sin(x)/cos(x)

If we put:

tan(x) = c1 x + c3 x^3 + c5 x^5 + ...

(note that because tan(x) is n odd function, it can only have odd powers of x in the Taylor expansion), then we can find the ck from:

sin(x) = [c1 x + c3 x^3 + c5 x^5...] * cos(x)

if we substitute for sin(x) and cos(x) their respective series expansions and equate equal coefficients of x:

x - x^3/3! + x^5/5! - ... =

[c1 x + c3 x^3 + c5 x^5...] *

[1 - x^2/2! + x^4/4! - ...]

The coefficient of x on the r.h.s. is c1 and this has to be 1, so c1 = 1.

Equating the coefficient of x^3 on both sides gives:

-1/6 = -1/2 + c3 --->

c3 = 1/3

Equating the coefficient of x^5 on both sides gives:

1/120 = 1/24 -1/6 + c5 ---->

c5 = 2/15

So, we have:

tan(x) = x + x/3 + 2/15 x^5 + ...