1

I have the following hyperbolic identity, which I solved, analytically:

$6~\text{sech}^2 x$ $= 4 + \tanh x$

The two solutions which I get are:

$x=\frac{1}{2} \ln3$ and $x=-\frac{1}{2} \ln5$

These roots, providing they are right, would satisfy the original equation. So to check I substituted these roots into the equation.

For $x=-\frac{1}{2} \ln 5$, I get the correct result $(\text{LHS}=\text{RHS})$.

But for the second root, I don't. It is pretty close but I get; $1.1×10^{-13}\approx 0$.

What I don't understand is where this error comes from, is it my calculator, or am I just doing something incorrect?

I apologise in advance if I haven't use $mathjax$ properly.

Cheers

Gurjinder
  • 1,289
  • 1
    Quick note on terminology: $6, \mathrm{sech}^2 x = 4 \tanh x$ is an equation, not an identity. An identity is a special kind of equation that holds regardless of the values of its variables. For example, $\cosh^2 x - \sinh^2 x = 1$ is an identity, since it is true for all values of $x$. But $6, \mathrm{sech}^2 x = 4 \tanh x$ is not an identity, since it only holds for certain values of $x$. – Jim Belk Jan 21 '16 at 17:52
  • @ Jim Belk, sorry, I did mean equation, as I have wrote that in the rest of my question. I guess I just got mixed up between the two, when composing my question, as I solved the equation using a hyperbolic identity. – Gurjinder Jan 21 '16 at 17:55
  • Whenever you use numerical methods to check an answer the minimum error you are going to get is going to be of the order of the precision of the numbers used in the calculation. Most systems uses $64$-bit (or $32$-bit) numbers which corresponds to an accuracy of $10^{-16}$ (or $10^{-8}$). Depending on the exact calculation and the way you do it the error can be larger than these estimates. – Winther Jan 21 '16 at 18:38

1 Answers1

1

$1.1 \times 10^{-13}$ is $0.00000000000011$. A 32-bit calculator can store numbers as big as $2^{32}$, which is only 10 digits in decimal. It's not surprising if there's a tiny bit of error when you're dealing with transcendental functions such as hyperbolic functions and logarithms. Use a more high-powered calculator and the error goes away.

NoName
  • 2,975
  • This is only possible with symbolic calculators. Floating-point arithmetic always suffers from truncation errors. –  Jan 21 '16 at 18:08
  • 1
    The link from W|A you present uses symbolic calculations to get the answer. To force W|A to do a numerical calculation use floating points in the input like here. The error it gives is then $10^{-16}$ which is (64 bit) floating point accuracy. – Winther Jan 21 '16 at 18:18
  • Okay cheers, understand – Gurjinder Jan 21 '16 at 18:46