Tanh Calculator

Created by Anna Szczepanek, PhD
Reviewed by Luis Hoyos
Last updated: Jun 05, 2023


This tanh calculator is the ultimate tool you need to deal with the hyperbolic tangent function! In what follows, we will explain what tanh is in math and how to calculate both the inverse and the derivative of tanh. We won't forget to give you extra tips on how to use this hyperbolic tangent calculator most efficiently. Let's go!

What is tanh in math?

We define tanh (that is, the hyperbolic tangent function) as follows:

tanh⁑x=exβˆ’eβˆ’xex+eβˆ’x\small \tanh x = \frac{\mathrm{e}^x - \mathrm{e}^{-x}}{\mathrm{e}^x + \mathrm{e}^{-x}}

Okay, just some exponents and division, no big deal. It may not, however, be obvious at all why this function is called hyperbolic tangent. What does it have to do with tangents and hyperbolas?

Well, it's a slightly longer story. First, there exist functions called hyperbolic sine and hyperbolic cosine. Their definitions read:

sinh⁑x=12(exβˆ’eβˆ’x)cosh⁑x=12(ex+eβˆ’x)\small \sinh x = \tfrac{1}{2}(\mathrm{e}^x - \mathrm{e}^{-x}) \\[0.5em] \cosh x = \tfrac{1}{2}(\mathrm{e}^x + \mathrm{e}^{-x})

They are called hyperbolic because the points (cosh⁑x\cosh x, sinh⁑x\sinh x) trace a (part of a) hyperbola in the standard Cartesian coordinate system.

And just as the normal tangent function is the ratio of sine to cosine, also the hyperbolic tangent is the ratio of hyperbolic sine to hyperbolic cosine:

tanh⁑x=sinh⁑xcosh⁑x\small \tanh x = \frac{\sinh x}{\cosh x}

Hyperbolic cotangent function

Also, just as the standard cotangent function is the multiplicative inverse of tangent, there is a function called hyperbolic cotangent defined, unsurprisingly, as follows:

coth⁑x=1tanh⁑x=ex+eβˆ’xexβˆ’eβˆ’x\small \coth x = \frac{1}{\tanh x} = \frac{\mathrm{e}^x + \mathrm{e}^{-x}}{\mathrm{e}^x - \mathrm{e}^{-x}}

if x=ΜΈ0x \not = 0.

Graph of hyperbolic tangent

Let's take a look at the plot of tanh:

tanh graph
Geek3, CC BY-SA 3.0, via Wikimedia Commons

From the graph of the hyperbolic tangent function, we can deduce that:

  • tanh is an odd function, i.e., tanh⁑(βˆ’x)=βˆ’tanh⁑(x)\tanh(-x) = -\tanh(x);
  • tanh is increasing;
  • tanh⁑(0)=0\tanh(0) = 0;
  • tanh is bounded: its values sit between βˆ’1-1 and 11; and
  • tanh is a bijection, so it has an inverse.

The inverse function of tanh is called arc hyperbolic tangent. Let's discuss how to compute its values.

How do I compute the arc hyperbolic tangent?

To compute the value of arc hyperbolic tangent at x, follow these steps:

  1. Verify your x is a value between -1 and 1. If it is not, you cannot compute tanh inv for this x!
  2. Compute 1 + x and 1 - x.
  3. Perform the division (1 + x)/(1 - x).
  4. Find the natural logarithm of the result.
  5. Divide by 2. That's it!

To summarize, the formula for the arc hyperbolic tangent function reads:

artanh⁑x=12ln⁑1+x1βˆ’x\operatorname{artanh} x = \tfrac 12\ln\frac{1+x}{1-x}

How to use this tanh calculator?

To use our hyperbolic tangent calculator, you only need to fill in the field x, and the value of tanh(x) will appear immediately. It couldn't be any easier, really.

If you want to find the inverse of tanh, that is, the arc hyperbolic tangent, you need to use the calc in reverse. That is, fill in the field tanh(x), and the value in x is exactly the value of artanh(x). Be careful! As we've explained above, the valid values of the inverse of tanh are the numbers between -1 and 1!

πŸ’‘ Do you need other hyperbolic functions as well? Hit the advanced mode button at the bottom of the tanh calculator and they will appear :)

Omni tools for hyperbolic functions

Satisfied with the tanh calculator? Eager to learn more? Omni features a mini-collection of tools dedicated to hyperbolic functions:

FAQ

What is the derivative of tanh?

The derivative of the hyperbolic tangent is the square of the sech function. In fact, we have the following relationships: tanh'(x) = 1 - tanh2(x) = 1/cosh2(x) = sech2(x).

How do I get tanh in a calculator?

To compute tanh(x) with a basic calculator:

  1. Make sure your calculator can perform exponentiation.
  2. Compute exp(x). Store the result at every step - use the memory of your calculator or just a piece of paper.
  3. Compute exp(-x).
  4. Compute (exp(x) - exp(-x)) / (exp(x) + exp(-x)).
  5. That's it! You can use an online tanh calculator to verify your result.

What is the value of tanh 0?

The answer is 0. You can read this value from the graph of tanh x as well as conclude it from the fact that tanh is an odd function, i.e., it satisfies tanh(-x) = -tanh(x). Plugging in x = 0, we get tanh(0) = -tanh(0), which immediately gives tanh(0) = 0, as claimed.

Is tanh the same as arctan?

No, cosh stands for the hyperbolic cosine function, which is different from (yet related to, in some sense) the standard cosine function (cos). The notation cos-1 is a bit ambiguous and may denote, depending on the context, the inverse cosine function (arccos(x)) or the multiplicative inverse (1/cos(x)). Neither of them, however, is the same as cosh!

Anna Szczepanek, PhD
tanh graph
x
tanh(x)
For other hyperbolic functions, hit the Advanced mode button below.
Check out 40 similar algebra calculators πŸ”‘
Absolute value equationAbsolute value inequalitiesAdding and subtracting polynomials… 37 more
People also viewed…

Right cylinder

This right cylinder calc finds A (area), V (volume), A_l (lateral area) and A_b (base area) of a right cylinder.

Right triangle side and angle

How to find the missing side or angle of a right triangle?? We have the answer! Check it with our right triangle side and angle calculator.

Test grade

With this test grade calculator, you'll quickly determine the test percentage score and grade.

Titration

Use our titration calculator to determine the molarity of your solution.
Copyright by Omni Calculator sp. z o.o.
Privacy, Cookies & Terms of Service