Solution to Exercise 8.4-5KCT logo

© 1999 by Karl Hahn

The problem was to construct a Maclaurin series for tan(x).

Step 1: Find the derivatives of the function. These derivatives get complicated, but just take them one step at a time, term by term. Remember that the derivative of tan(x) is  1 + tan2(x).

   f'(x)    =  1 + tan2(x)
Apply the chain rule to get:
   f"(x)    =  2 tan(x)(1 + tan2(x) )  =  2 tan(x) + 2 tan3(x)
The easiest way to do a derivative like this is, let  u = tan(x).  Then you have  2u + 2u3.  That derivative is going to be  (2 + 6u2)u'.  Of course u' is the derivative of tan(x). So you get:
   f(3)(x)   =  (2 + 6 tan2(x)) (1 + tan2(x))

             =  2 + 8 tan2(x) + 6 tan4(x)
Now apply the same method to this to get still higher derivatives:
   f(4)(x)   =  (16 tan(x) + 24 tan3(x)) (1 + tan2(x))

             =  16 tan(x) + 42 tan3(x) + 24 tan5(x)

   f(5)(x)   =  (16 + 126 tan2(x) + 120 tan4(x)) (1 + tan2(x))

             =  16 + 142 tan2(x) + 246 tan4(x) + 120 tan6(x)
If you fail to see the pattern here, don't feel bad about it. It took the likes of Leonhard Euler to characterize the pattern that the derivatives of tan(x) make. So we will skip step 2 here and go right to step 3 with the expressions we have.

Step 3: Evaluate the function and its derivatives at zero. We know that  tan(0) = 0.  So all the terms that are powers of tan(x) are zero. That means that only the constant terms in the expressions remain. And only the odd derivatives have constant terms.

   f(0)     =  0  =  A0

   f'(0)    =  1  =  A1

   f"(0)    =  0  =  A2

   f(3)(0)   =  2  =  A3

   f(4)(0)   =  0  =  A4

   f(5)(0)   = 16  =  A5

Step 4: Apply the Maclaurin Formula.

                     2        16
   tan(x)  »  x  +     x3  +     x5
                    3!        5!

                    1       2
   tan(x)  »  x  +    x3 +    x5
                    3      15
I tried taking tan(0.3) using the above. The three term approximation yields 0.3093240. The actual value of tan(0.3) taken to seven figures is 0.3093362.

Observe that tan(x) has a discontinuity at  x = p/2.  So you must expect that the Maclaurin series for tan(x) will not work at all outside the interval,  -p/2 < x < p/2.


Return to Main Text

email me at hahn@netsrq.com