# Solving a separable ODE explicitly

I am stuck at solving the following separable ODE: $$f(x)=\sqrt{1+[f'(x)]^2},$$ with the condition that $$f:[0,\infty)\longrightarrow [0,\infty)$$.

I first note that $$f(x)\geq 1$$ and that the constant function $$f(x)=1$$ is a solution.

By squaring both sides and separating $$f'(x)$$, I get that $$[f(x)]^2=1+[f'(x)]^2 \iff \\ f'(x)=\pm\sqrt{[f(x)]^2-1}$$

Now, for $$f(x)\neq 1$$, using the fact that $$f'(x)=\frac{df}{dx}$$ and abusing the notaion $$f=f(x)$$, I separate the differentials as follows: $$\frac{df}{dx}=\pm\sqrt{f^2-1} \iff\\ \frac{df}{\sqrt{f^2-1}}=\pm dx$$

Integrating both sides gives $$\int\frac{df}{\sqrt{f^2-1}}=\int \pm dx \implies ln(f+\sqrt{f^2-1})=\pm x+C$$

We can collect the R.H.S. $$\begin{cases} x+C_1 & (1)\\ -x+C_2 & (2) \end{cases}$$

For the left integral, I used the standard integral that is provided in my textbook, namely that $$\int\frac{dx}{\sqrt{x^2+\alpha}}=\\ ln\left|x+\sqrt{x^2+\alpha}\right|+C$$

I know that I can get rid of the logarithm in the L.H.S., using $$(1)$$ from above, $$ln(f+\sqrt{f^2-1})=x+C_1\iff \\ f+\sqrt{f^2-1}=e^{x+C_1}$$ Note that i have dropped the absolute value sign, due to the given condition which constraints $$f=f(x)$$ to the positive real numbers.

But this is where I am stuck. What am I supposed to do? I am failing to factorize $$f$$. I know that we can have implicit answers for separable ODEs, but I am supposed to satisfy the condition that $$f:[0,\infty)\longrightarrow [0,\infty)$$, i.e., I need to find all such functions $$f$$.

To reiterate: how do I continue to find the explicit answer to the given separable ODE?

P.S. This is my very first time posting a question, although I have read a lot of answers. Also, english is not my first language, please excuse any grammatical errors.

• $$|f'|^2 = f^2 - 1$$ from your original equation. Dec 7, 2020 at 16:10

$$1=f(x)^2-f'(x)^2$$ is a hyperbole equation, so you can parametrize it in hyperbolic functions, $$f(x)=\cosh(u(x)), ~~f'(x)=\sinh(u(x)).$$ In consequence of the first part, also $$f'(x)=\sinh(u(x))u'(x),$$ so that, apart from the constant solution, $$u'(x)=\pm 1$$. Both signs lead to the same solution family $$f(x)=\cosh(x+C).$$
$$f+\sqrt{f^2-1}=e^{x+C_1}. (1)$$ Now, squaring both sides, $$\left(f+\sqrt{f^2-1}\right)^2=\left(e^{x+C_1}\right)^2 \iff f^2+2f\sqrt{f^2-1}+f^2-1=e^{2(x+C_1)} \\ \iff 2f^2+2f\sqrt{f^2-1}-1=e^{2(x+C_1)}$$ and now we factor out common factors from the L.H.S. and use $$\mathbf{(1)}$$ from above to solve for $$f$$, $$2f\underbrace{\left(f+\sqrt{f^2-1}\right)}_{e^{x+C_1}}-1=e^{2(x+C_1)} \iff 2f\cdot e^{x+C_1}=e^{2(x+C_1)}+1 \\ \iff f=\frac{e^{x+C_1}+e^{-(x+C_1)}}{2}=\text{cosh}\ \left(x+C_1\right).$$
Going back to my original question, we find that there are two different cases for $$\mathbf{(1)}$$, the first case is the one used above, namely that $$f+\sqrt{f^2-1}=e^{x+C_1}$$. The second case is $$f+\sqrt{f^2-1}=e^{-x+C_2}$$. However, we solve this second case just like we did above for the first case. We would then arrive at a different $$f$$: $$f=\text{cosh}\ \left(-x+C_2\right)=\text{cosh}\ \left(x-C_2\right).$$ Notice that the last equality is true because hyperbolic cosine is an even function. We recall from my original post that the constant function $$f=1$$ is also a solution to the DE.
Now we are done since all $$f$$ that satisfies the original DE are found. But we could note that the solutions are shifted hyperbolic cosine and we can therefore conclude the solutions and form a general solution with a new piecewise function $$f$$ by introducing arbitrary constants, say $$x_0\leq x_1$$: $$f= \begin{cases} \text{cosh}\ \left(x-x_0\right) & x\leq x_0, \\ 1 & x_0\leq x\leq x_1, \\ \text{cosh}\ \left(x-x_1\right) & x_1\leq x. \end{cases}$$