Understanding Hyperbolic Functions: Calculations in Calculators and MATLAB

  • Thread starter Firepanda
  • Start date
  • Tags
    Computing
In summary, the conversation discusses different methods for computing hyperbolic functions using calculators and matlab. Some suggestions include using taylor series, double-angle and angle-addition formulas, and half-angle formulas. It is also mentioned that for larger values, calculators use taylor series sums, while for smaller values they have stored data. The conversation also touches on the use of e^x and its taylor series for computing hyperbolic functions. Overall, there is a focus on finding efficient and accurate ways to compute these functions.
  • #1
Firepanda
430
0
How do calculators/matlab compute hyperbolic functions?

I believe it may have something to do with the taylor series but apart from that I can't find anything else from the net. I was told to try and compute cosh^2(x) - sinh^2(x) = 1, and notice the errors for increasing values of x, which I have done, but I'm still unsure on how this is computed. If it is in fact the taylor series used, then how do I find out how many terms it was computed to?

Thanks :)
 
Physics news on Phys.org
  • #2
For large numbers, I would expect them to make good use of the double-angle and angle-addition formulas. For small numbers, I suppose you could use half-angle formulae, but a Taylor series is probably best in this domain.

Maybe there's a way to use Newton's method to refine an initial estimate?

(Note that you would compute e^x with the same kinds of methods)
 
  • #3
Nice advice, but what I think they want is simpler, considering we havn't learned much of what you mentioned :P. I was thinking along the lines of them being computed by the maclaurin series, to an already determined-term degree of accuracy. Such that as x increases the graph of the functions converges further away, (as x needs to stay small using maclaurin).
 
  • #4
Not sure about matlab, but pocket calculators only store about 15 digits of accuracy. To get that even for e^(1000) you would require less than 20 taylor series terms (someone could probably reduce that upper bound for me), and I am quite certain for large values they have taylor series sums, and for small values they are stored.

eg if you put [itex]exp(\sqrt{163}\pi) - (640320^4 + 744)[/itex] into your calculator, it says exactly zero, because the exponential differs from the integer part by less than 1x 10^(-60). Theoretically, you calculator should be able to display that information, it is by no means too small or too large for the display, but the memory only holds 15 digits, so it thinks they are the same numbers.
 
  • #5
I understand what you mean gib z, but your example doesn't work for me :P

So when the calculator calculates cosh(x), does it use ((e^x) + (e^-x))/2, and use taylor series for e^x and e^-x, or just simply use the series of cosh(x)?
 
  • #6
Ok well let me reiterate that small values are kept on the calculators storage, its only large values we are wondering about. Now, calculators keep it to about 15 digits memory, which means that an error of 1 * 10^(-15) is ok for a calculator. We shall note that e^(-x)/2 reaches this very quickly indeed. In fact, the error bound is already satisfied for x= 35. So really all the calculator does is compute (e^x)/2. For that, it uses the Taylor series of e^x.

PS: Hurkyl, i wouldn't say no to a homework helpers ribbon, i have earned it no :D?
 
Last edited:
  • #7
So let me get this straight, the calculator uses an algorithm inside it using the exact definition of cosh(x), but it uses the taylor series when computing the exponentials.

Also, you say the series for e^x is used for higher values of x, but what series is used for the lower values? Say |x| < 1, or more generally |x| < 35.

P.S. And give him his ribbon :P
 
  • #8
For smaller values the calculator keeps extensive libraries of data, remember a calculators storage memory can have millions upon millions of digits. So it would have handy e, e^10, e^(0.1), e^(0.001)...e^(0.0000000001). Then any power of e can be composed from them, eg e^(3.2) = ( e^1 ) ^ 3 * (e^0.1)^2
 
  • #9
That's exactly what i needed to know, thankyou
 
  • #10
No problem =]
 

Related to Understanding Hyperbolic Functions: Calculations in Calculators and MATLAB

1. What are hyperbolic functions?

Hyperbolic functions are mathematical functions that are closely related to trigonometric functions. They are typically denoted using the prefix "hyper" and include functions such as hyperbolic sine (sinh), hyperbolic cosine (cosh), and hyperbolic tangent (tanh).

2. How are hyperbolic functions calculated in calculators?

Calculators use complex algorithms and mathematical formulas to calculate hyperbolic functions. These algorithms are built into the calculator's software, so users can simply input the desired function and value to obtain the result.

3. Can I use hyperbolic functions in MATLAB?

Yes, MATLAB has built-in functions for calculating hyperbolic functions. These functions can be accessed through the MATLAB command window or by creating a script or function file.

4. Are there any special considerations when using hyperbolic functions in calculations?

Yes, it is important to keep in mind that hyperbolic functions deal with hyperbolas rather than circles like trigonometric functions. This means that the values and properties of these functions may differ from trigonometric functions in certain cases.

5. Can hyperbolic functions be graphed in calculators or MATLAB?

Yes, both calculators and MATLAB have the capability to graph hyperbolic functions. Users can enter the function and desired values to generate a graph, which can then be customized with different colors and axes labels.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
2
Views
2K
Replies
1
Views
792
  • Calculus and Beyond Homework Help
Replies
1
Views
780
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • Calculus and Beyond Homework Help
Replies
18
Views
1K
  • Calculus
Replies
5
Views
1K
  • Atomic and Condensed Matter
Replies
1
Views
922
  • Precalculus Mathematics Homework Help
Replies
2
Views
650
  • Precalculus Mathematics Homework Help
Replies
13
Views
1K
  • Precalculus Mathematics Homework Help
Replies
10
Views
3K
Back
Top