How do you write hyperbolic functions in LaTeX?

This will give proper spacing and italicized font.In summary, the conversation discusses how to write the LaTeX code for the secant, cosecant, and cotangent hyperbolic functions. The user is having trouble using the commands \sech, \csch, and \coth and is wondering if there is a package they need to include. Another user suggests using \text{} or creating macros in the preamble, and also mentions potential issues with using these commands in an {eqnarray*}. Ultimately, the conversation concludes with different suggestions for creating a new command using \newcommand or \DeclareMathOperator.
  • #1
mathemagician
Hi! How do you write the LaTeX code for the secant, cosecant, and cotangent hyperbolic functions?

I tried using \sech, \csch, and \coth but I am getting an error when I run the latex program. It is giving me a undefiend control sequence message? Is there a package I need to include in my .tex file to have those hyperbolic functions?

Thanks
 
Mathematics news on Phys.org
  • #2
just use \text{sech} and so on. you could create your own macro too. these aren't latex commands you see, though the coth one is supposed to be.

rather than search for a package that may have them and probably won't install easily just create the macros in your preamble
 
  • #3
matt grime said:
just use \text{sech} and so on. you could create your own macro too. these aren't latex commands you see, though the coth one is supposed to be.

rather than search for a package that may have them and probably won't install easily just create the macros in your preamble

Thanks. I think I sort of jumped to conclusions with the coth. However, I still get an undefined control sequence error using \text{}. Does it matter it being used within an {eqnarray*} ?
 
  • #4
mathemagician said:
Hi! How do you write the LaTeX code for the secant, cosecant, and cotangent hyperbolic functions?

I tried using \sech, \csch, and \coth but I am getting an error when I run the latex program. It is giving me a undefiend control sequence message? Is there a package I need to include in my .tex file to have those hyperbolic functions?

Thanks
[itex]\coth x[/itex] works for me... I'm not using \text. Maybe you left no space between coth and the argument...
 
  • #5
as he says, he's got coth to work.

i don't know why it's not working in an eqnarray* (though I wouldn't put the braces there ). Some environments have problems if \ is the first character of an entry in some slot, you could try typing {\text{sech}}
 
  • #6
The other way around this problem, especially if using the command several times, is to create a new command in the preamble.

\newcommand{\sech}{\mathrm{sech} \,}

And similar for the others. The \mathrm will ensure it's written in normal font and the \, will make sure there is a gap between the function and variable.

Adrian.
 
  • #7
If you're using amsmath, an even better way is to use \DeclareMathOperator.
 

1. What are hyperbolic functions?

Hyperbolic functions are mathematical functions that are defined in terms of the area of a hyperbola. They are similar to trigonometric functions, but use the hyperbola instead of a circle.

2. What are the main types of hyperbolic functions?

The main types of hyperbolic functions are the hyperbolic sine (sinh), hyperbolic cosine (cosh), hyperbolic tangent (tanh), hyperbolic cosecant (csch), hyperbolic secant (sech), and hyperbolic cotangent (coth).

3. How are hyperbolic functions related to exponential functions?

Hyperbolic functions are closely related to exponential functions and can be expressed in terms of them. For example, sinh(x) = (e^x - e^(-x))/2 and cosh(x) = (e^x + e^(-x))/2.

4. What are some real-world applications of hyperbolic functions?

Hyperbolic functions are used in various fields such as physics, engineering, and economics. They can be used to model various natural phenomena, such as the shape of a catenary curve or the motion of a pendulum. They are also used in signal processing and electrical engineering.

5. How are hyperbolic functions useful in calculus?

Hyperbolic functions are useful in calculus as they have many properties that are similar to trigonometric functions, making them useful for solving integrals and differential equations. They are also used in the study of complex numbers and in the field of differential geometry.

Similar threads

Replies
1
Views
777
  • General Math
Replies
2
Views
723
Replies
14
Views
1K
  • Programming and Computer Science
Replies
6
Views
718
Replies
15
Views
5K
  • Calculus and Beyond Homework Help
Replies
5
Views
8K
  • Programming and Computer Science
Replies
2
Views
376
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
910
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • Programming and Computer Science
Replies
2
Views
1K
Back
Top