0

I am a beginner in Latex and I would like to draw the attached graph. I have seen that there are different packages, that by means of dots are drawing. I would like the method to be as mathematical and exact as possible. enter image description here

Torbjørn T.
  • 206,688
Carlos
  • 111

2 Answers2

4

Here is something to start with, you need to add the other curves. You can also tweak the options to get the look you are after.

\documentclass{standalone}
\usepackage{pgfplots,tikz}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
    \begin{axis}[xmin = -2, xmax = 2,
                 ymin = -1, ymax = 3,
                axis lines=middle,
                axis equal image,
                ticks = none,
                xlabel style={below right},
                ylabel style={above left},
                ]
        \addplot[samples=100,thick,no marks,color=blue] {cosh(x)}
                node[black, rotate = 55] at (axis cs: 1.1,2) {\tiny$y = \cosh(x)$};
        \addplot[no marks, dashed] {1/2*exp(x)};
    \end{axis}
\end{tikzpicture}
\end{document}

enter image description here

jak123
  • 4,252
  • 5
  • 26
  • 49
4

Here is an alternative. (EDIT: Corrected xlabel, big thanks to thymaro !)

\documentclass[tikz,border=3.14mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\begin{document}
\begin{tikzpicture}
\begin{axis}[axis x line=middle, axis y line=middle,
    xtick=\empty,ytick=\empty,
    %ymin=-0.5, ymax=3,
    ylabel=$y$, 
    xmin=-1.7,xmax=1.9,xlabel=$\alpha$,
    samples=101,
    legend pos=south east]
\addplot [blue,thick,domain=-1.5:1.6] {sinh(x)} node[pos=0.87,below,sloped]
{$y=\sinh\alpha$};
\addplot [red,thick,domain=-1.5:1.5] {cosh(x)} node[pos=0.82,above,sloped]
{$y=\cosh\alpha$};
\addplot [black,dashed,thick,domain=-1.5:1.55] {exp(x)/2} node[pos=0.1,above,sloped]
{$y=\frac{1}{2}\mathrm{e}^\alpha$};
\addplot [black,dashed,thick,domain=-1.5:1.5] {exp(-x)/2} node[pos=0.9,above,sloped]
{$y=\frac{1}{2}\mathrm{e}^{-\alpha}$};
\end{axis}
\end{tikzpicture} 
\end{document}

enter image description here