2.1.12.4 Solved using first_order_ode_dAlembert

Entering first order ode dAlembert solver

\[\begin {aligned} x^{\prime }&=\tan \left (x\right )\\ x \left (0\right ) &= 1\\ \end {aligned}\]

Let \(p=x^{\prime }\) the ode becomes

\begin{align*} p = \tan \left (x \right ) \end{align*}

Solving for \(x\) from the above results in

\begin{align*} x &= \arctan \left (p \right )\tag {1A} \end{align*}

This has the form

\begin{align*} x&=t f(p)+g(p)\tag {*} \end{align*}

Where \(f,g\) are functions of \(p=x'(t)\). The above ode is dAlembert ode which is now solved.

Taking derivative of (*) w.r.t. \(t\) gives

\begin{align*} p &= f+(t f'+g') \frac {dp}{dt}\\ p-f &= (t f'+g') \frac {dp}{dt}\tag {2} \end{align*}

Comparing the form \(x=t f + g\) to (1A) shows that

\begin{align*} f &= 0\\ g &= \arctan \left (p \right ) \end{align*}

Hence (2) becomes

\begin{align*} p = \frac {p^{\prime }\left (t \right )}{p^{2}+1}\tag {3} \end{align*}

The singular solution is found by setting \(\frac {dp}{dt}=0\) in the above which gives

\begin{align*} p = 0 \end{align*}

No valid singular solutions found.

The general solution is found when \( \frac { \mathop {\mathrm {d}p}}{\mathop {\mathrm {d}t}}\neq 0\) from eq. (3). This results in

\begin{align*} p^{\prime }\left (t \right ) = p \left (t \right ) \left (p \left (t \right )^{2}+1\right )\tag {4} \end{align*}

This ODE is now solved for \(p \left (t \right )\). No inversion is needed.

Integrating gives

\begin{align*} \int \frac {1}{p \left (p^{2}+1\right )}d p &= dt\\ -\frac {\ln \left (p^{2}+1\right )}{2}+\ln \left (p \right )&= t +c_1 \end{align*}

Singular solutions are found by solving

\begin{align*} p \left (p^{2}+1\right )&= 0 \end{align*}

for \(p \left (t \right )\). This is because of dividing by the above earlier. This gives the following singular solution(s), which also has to satisfy the given ODE.

\begin{align*} p \left (t \right )&=0\\ p \left (t \right )&=-i \end{align*}

Solving for \(p\) from above gives

\[ p = \arctan \left (\frac {\sqrt {-\left ({\mathrm e}^{2 t +2 c_1}-1\right ) {\mathrm e}^{2 t +2 c_1}}}{{\mathrm e}^{2 t +2 c_1}-1}\right ) \]

Substituing the above solution for \(p\) in \(x = \arctan \left (p \right )\) gives

\[ x = \arctan \left (\frac {\sqrt {-\left ({\mathrm e}^{2 t +2 c_1}-1\right ) {\mathrm e}^{2 t +2 c_1}}}{{\mathrm e}^{2 t +2 c_1}-1}\right ) \]

Initial condition \(x \left (0\right ) = 1\) is now applied. Applying the initial condition \(x \left (0\right ) = 1\), the solution becomes

\begin{align*} x &= \arctan \left (\frac {\sqrt {2}\, \sqrt {-\sinh \left (t +\ln \left (\sin \left (1\right )\right )\right ) {\mathrm e}^{3 t +3 \ln \left (\sin \left (1\right )\right )}}}{{\mathrm e}^{2 t +2 \ln \left (\sin \left (1\right )\right )}-1}\right ) \\ x &= \arctan \left (\frac {\sqrt {2}\, \sqrt {-\sinh \left (t +\ln \left (\sin \left (1\right )\right )\right ) {\mathrm e}^{3 t +3 \ln \left (\sin \left (1\right )\right )}}}{{\mathrm e}^{2 t +2 \ln \left (\sin \left (1\right )\right )}-1}\right ) \\ \end{align*}

Substituing the above solution for \(p\) in \(x = \arctan \left (p \right )\) gives

\[ x = 0 \]

Simplifying \(x = \arctan \left (\frac {\sqrt {2}\, \sqrt {-\sinh \left (t +\ln \left (\sin \left (1\right )\right )\right ) {\mathrm e}^{3 t +3 \ln \left (\sin \left (1\right )\right )}}}{{\mathrm e}^{2 t +2 \ln \left (\sin \left (1\right )\right )}-1}\right )\) gives

\[ x = \arctan \left (\frac {\sqrt {2}\, \sin \left (1\right )^{{3}/{2}} \sqrt {-\sinh \left (t +\ln \left (\sin \left (1\right )\right )\right ) {\mathrm e}^{3 t}}}{{\mathrm e}^{2 t} \sin \left (1\right )^{2}-1}\right ) \]
Direction field with Isoclines Direction field and Solutions plot

Summary of solutions found

\begin{align*} x&=\arctan \left (\frac {\sqrt {2}\, \sin \left (1\right )^{{3}/{2}} \sqrt {-\sinh \left (t +\ln \left (\sin \left (1\right )\right )\right ) {\mathrm e}^{3 t}}}{{\mathrm e}^{2 t} \sin \left (1\right )^{2}-1}\right )\\ x&=0 \end{align*}