Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Maclaurin Series of Tanh(x)

  1. May 30, 2010 #1
    Let's find the Maclaurin Series of tanhx up to powers of x^5

    Yeah! Good idea!

    I know

    Right, f(x) = tanh
    [tex]f'(x) = sech^{2}(x)[/tex]
    [tex]f''(x) = -2sech^{2}(x)tanh(x)[/tex]
    [tex]f''(x) = 4sech^{2}(x)tanh^{2}(x) - 2sech^{4}(x)[/tex]

    giving f(0) = 0, f'(0) = 1, f''(0) = 0 f'''(-2)

    but according to my text book apparently f'(0) = -1, how can this be. Especially as f'''(0) = -2, not just 2.

    Thanks
    Thomas
     
  2. jcsd
  3. May 30, 2010 #2

    tiny-tim

    User Avatar
    Science Advisor
    Homework Helper

    Hi Thomas! :smile:

    Looks like they're doing cothx instead of tanhx :confused:
     
  4. May 30, 2010 #3
    Yes, something is wrong here....

    Another thing is that the Taylor formula is not the most efficient way to derive such series expansions. You can speed things up by dividing the series expansions of sinh(x) and cosh(x). To do that, you can use long division, or similarly, you can equate the fraction to an undetermined series a1 x + a3 x^3 + a5 x^5 + ... (as we know that tanh(x) is an aodd function) and then multiply both sides by the series for cosh(x) and then solve for a1, a3, etc by equating the coefficients of equal powers of x on both sides.

    A third way is to use a more advanced algorithm for division, like e.g. Newton-Raphson division. Such algorithms will double the number of correct coefficients at each step, so you can obtain the first million terms in just 20 steps.
     
  5. May 30, 2010 #4

    Mute

    User Avatar
    Homework Helper

    Not if the series is about x = 0!

    OP: Are you sure the book claims f'(0) = -1? The first term in the series for tanh(x) is indeed x.
     
  6. May 31, 2010 #5

    tiny-tim

    User Avatar
    Science Advisor
    Homework Helper

    oops! :rolleyes: :redface:
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Maclaurin Series of Tanh(x)
  1. MacLaurin Series (Replies: 6)

  2. Taylor series for tanh (Replies: 2)

Loading...