Separation of variables exercise 1

Exercise:

Solve this differential equation by separation of variables:
$$x(t)’ = 1+x(t)^2 \\ x(\frac{\pi}{4}) = -1$$

Solution:

$$1+x(t)^2$$, the slope of the wanted function, is nowhere zero. There is no stationary solution.

Furthermore $$1+x(t)^2$$ is continuous on $$\mathbb{R}^2$$ and locally Lipschitz continuous relative to $$x$$, therefore the initial value problem has a unique solution.

$$\begin{align}\frac{dx}{dt} &= 1+x^2\\ \frac{dx}{1+x^2} &= 1 \text{ } dt\\ \int \frac{dx}{1+x^2} &= \int 1 \text{ } dt\\ \arctan (x) &= t+c \quad (c\in \mathbb{R})\\ x &= \tan(t + c)\end{align}$$

With the initial value we have

$$\tan(\frac{\pi}{4} + c) = -1$$

That implies

$$c=-\frac{\pi}{2}$$

because

$$\tan(\frac{\pi}{4} -\frac{\pi}{2}) = \tan(-\frac{\pi}{4}) = -1$$

Therefore the solution of the initial value problem is:

$$x(t)=\tan(t-\frac{\pi}{2})$$