### Infinite Continued Fractions

In this article we are going to look at infinite continued fractions - continued fractions that do not terminate.

### Gosh Cosh

Explore the hyperbolic functions sinh and cosh using what you know about the exponential function.

# Hyperbolic Thinking

##### Stage: 5 Challenge Level:
Jin from Portugal sent in a solution investigating many properties of the new functions.

### 1. A property similar to $\sin^2x + \cos^2x = 1$.

\begin{align}
A^2(x) &= \frac{1}{4}\left(10^{2x} + 2 + 10^{-2x}\right) \\
B^2(x) &= \frac{1}{4}\left(10^{2x} - 2 + 10^{-2x}\right)
\end{align}
From which we deduce that $A^2(x) - B^2(x) = 1$ because subtracting in this way cancels the terms involving $x$, just leaving $1$. This analysis shows a similarity between these functions and the trigonometric ones, but whereas a point $\left(X, Y\right)$ with coordinates $\left(\cos x, \sin x\right)$ is on the unit circle with equation $X^2+Y^2 = 1$; a point $\left(A(x), B(x)\right)$ is on the unit hyperbola with equation $X^2-Y^2 = 1$.

### 2. Cosine is an even function, sine is odd.

Recall that $\cos(x) = \cos(-x)$ and $\sin(x) = -\sin(-x)$. This is also the case with $A$ and $B$ which have:
\begin{align} A(x) &= A(-x) & B(x) = -B(-x) \end{align}

### 3. A property similar to $\sin(2x) = 2\sin x \cos x$.

To compare this identity first compute $2A(x)B(x)$
$$2A(x)B(x) = 2\left(\frac{1}{2}(10^x+10^-x)\frac{1}{2}(10^x-10^-x)\right) = \frac{1}{2}\left(10^{2x}-10^{-2x}\right)$$
which equals $B(2x)$ so the identity also holds with $A$ and $B$ swapped with $\cos$ and $\sin$ respectively.

### 4. A property similar to $\cos(2x) = \cos^2 x - \sin^2 x$.

Look back at part 1. and see that we may add the expressions for $A^2(x)$ and $B^2(x)$ to cancel out the twos and leave
$$A^2(x) + B^2(x) = \frac{1}{2}\left(10^{2x} + 10^{-2x}\right) = A(2x)$$
So the identity for $A$ and $B$ follows the patters with a change of sign, just like in part 1. Very interesting.

### 5. Addition formulae like $\sin(x+y) = \sin x \cos y + \cos x \sin y$ and $\cos(x+y) = \cos x \cos y - \sin x \sin y$.

By now it feels like $A$ behaves like $\cos$ and $B$ like $\sin$ in these identities. Calculate the right hand sides of both versions, and correct the sign where necessary to find
\begin{align}
A(x+y) &= A(x)A(y) + B(x)B(y) \\
B(x+y) &= A(x)B(y) + B(x)A(y)
\end{align}
which are the $\cos$ formula with a sign change, and the $\sin$ formula respectively.

### 6. Differentiation

We know that $\frac{d}{dx} \sin x = \cos x$ and $\frac{d}{dx} \cos x = -\sin x$ so do the same with $A$ and $B$. Recall that $\frac{d}{dx}a^x = a^x \ln a$. Then, for example,
\begin{align}
\frac{d}{dx}A(x) &= \frac{d}{dx}\frac{1}{2}\left(10^x + 10^-x\right) \\
&= \frac{\ln {10}}{2}\left(10^x - 10^-x\right) \\
&= B(x)\ln {10}
\end{align}

You can work out $\frac{d}{dx}B(x)$ for yourself, try to spot the pattern.

### 7. The size of $\cos x$ and $\sin x$.

It is well known that $\left\vert \cos x \right\vert \leq 1$ and $\left\vert \sin x \right\vert \leq 1$ but what about $A$ and $B$? Well notice that for any real $x$ value the numbers $10^x$ and $10^{-x}$ are positive. Then what about very large $x$ values? We can make $10^x$ as big as we like by choosing big $x$ values. When $10^x$ is large; $10^{-x} = \frac{1}{10^x}$ is very small. This means that both $A(x)$ and $B(x)$ get as big as we want for large $x$ because the contribution from the $\pm 10^{-x}$ is tiny. This is rather unlike $\sin$ and $\cos$.

### 8. Choice of base.

Most of the properties don't depend on the base but if we imagine replacing $10$ in the definitions by $b$, say, then we have:
\begin{align}
\frac{d}{dx}A(x) &=  B(x) \ln b & \frac{d}{dx}B(x) &= A(x) \ln b
\end{align}
So it makes sense to choose $b$ such that $\ln b =1$. Then the relationships would all be like those for $\sin$ and $\cos$ except for a few signs swapped. The mathematical constant $e$ is the number which has $\ln e = 1$ and so we might consider the functions
\begin{align}
A(x) &= \frac{1}{2}\left(e^x+e^{-x}\right) & B(x) &= \frac{1}{2}\left(e^x-e^{-x}\right)
\end{align}
which are in fact called $\cosh x$ and $\sinh x$ (sometimes pronounced 'cosh' and 'shine'). These are the hyperbolic trigonometric functions.