# hyperbolic tangent

• Sep 25th 2009, 07:56 AM
rainer
hyperbolic tangent
Hi,

Two things regarding hyperbolic tangent (tanh(x)):

1) What is the inverse function of tanh(x)?

Apparently it is NOT artanh(x).

I need to know how to "undo" a tanh(x) function. Please help.

2) In my grapher, artanh(1) does not exist (is undefined, invalid or whatever).

Yet when I plug in artanh(sin(x)^2+cos(x)^2), which should be the same, I get weird splotches.

Is the grapher getting confused, or does there really exist a difference between 1 and sin(x)^2+cos(x)^2 vis-a-vis artanh(x)?

Thanks
• Sep 25th 2009, 10:47 AM
Amer
Quote:

Originally Posted by rainer
Hi,

Two things regarding hyperbolic tangent (tanh(x)):

1) What is the inverse function of tanh(x)?

Apparently it is NOT artanh(x).

I need to know how to "undo" a tanh(x) function. Please help.

2) In my grapher, artanh(1) does not exist (is undefined, invalid or whatever).

Yet when I plug in artanh(sin(x)^2+cos(x)^2), which should be the same, I get weird splotches.

Is the grapher getting confused, or does there really exist a difference between 1 and sin(x)^2+cos(x)^2 vis-a-vis artanh(x)?

Thanks

$\tanh (x) = \frac{e^x - e^{-x}}{e^x + e^{-x} }$

to find the inverse let

$u = \tanh ^{-1} x$

$\tanh(u) = x$

$\frac{e^u - e^{-u}}{e^u+e^{-u}}=x$

simplify

$e^u - e^{-u} = xe^u + xe^{-u}$

$e^{2u} -1 = xe^{2u} + x$

$e^{2u}(x-1) +x+1=0$ let $e^{u} = t$

$t^2 (x-1) + x+1 = 0$

$t = \frac{\mp\sqrt{-4(x-1)(x+1)}}{2(x-1)}$

$t = \frac{\mp 2 \sqrt{(1-x)(1+x)}}{2(x-1)}$

$t =\mp \sqrt{\frac{(1-x)(1+x)}{(1-x)(1-x)}}$

$t=\mp \sqrt{\frac{1+x}{1-x}}$

but t=exp(u) so

$e^u = \mp \sqrt{\frac{1+x}{1-x}}$

$u=\frac{1}{2}\ln \left(\frac{1+x}{1-x}\right)$

$\tanh ^{-1}(x)=\frac{1}{2}\ln \left(\frac{1+x}{1-x}\right)$
• Sep 26th 2009, 09:05 AM
rainer
Amer-

Your demonstration is very useful to me. Many thanks.

An important question remains, however: Is artanh(x) the inverse function of tanh(x)?

The wikipedia definition of inverse function is:

"If ƒ is a function from A to B then an inverse function for ƒ is a function in the opposite direction, from B to A, with the property that a round trip (a composition) from A to B to A (or from B to A to B) returns each element of the initial set to itself."

By this definition, for x=1, artanh(x) is NOT the inverse function of
tanh(x).

Perhaps this simply means that tanh(x) is not invertible?

Thanks
• Sep 26th 2009, 09:47 AM
Amer
Quote:

Originally Posted by rainer
Amer-

Your demonstration is very useful to me. Many thanks.

An important question remains, however: Is artanh(x) the inverse function of tanh(x)?

The wikipedia definition of inverse function is:

"If ƒ is a function from A to B then an inverse function for ƒ is a function in the opposite direction, from B to A, with the property that a round trip (a composition) from A to B to A (or from B to A to B) returns each element of the initial set to itself."

By this definition, for x=1, artanh(x) is NOT the inverse function of
tanh(x).

Perhaps this simply means that tanh(x) is not invertible?

Thanks

ok I see let take

$\tanh ^{-1}(1) = \frac{1}{2} \ln \left(\frac{1+1}{1-1} \right) = \infty$

now

$\tanh (\infty) =\lim_{x\rightarrow \infty}\frac{e^x - e^{-x} }{e^x + e^{-x} }=\lim _{x\rightarrow \infty} \frac{e^{2x}-1}{e^{2x}+1}=1$

that's it

or

I will prove that $\tanh ^{-1} (\tanh (x)) =x$

$\tanh ^{-1}(\tanh) = \frac{1}{2} \ln\left(\frac{1+\dfrac{e^x - e^{-x} }{e^x + e^{-x} } }{1-\dfrac{e^x - e^{-x} }{e^x + e^{-x} }}\right)$

$\tanh ^{-1}(\tanh) = \frac{1}{2} \ln\left(\frac{e^x + e^{-x} + e^{x} - e^{-x} }{e^x + e^{-x} -(e^x -e^{-x})}\right)$

$\tanh ^{-1}(\tanh) = \frac{1}{2} \ln\left(\frac{2e^x}{2e^{-x}}\right)$

$\tanh ^{-1}(\tanh) = \frac{1}{2} (\ln (e^x) - \ln(e^{-x}))=2x/2=x$