2.1.15.2 Solved using first_order_ode_dAlembert

Entering first order ode dAlembert solver

\[\begin {aligned} x^{\prime }&=\cos \left (\frac {x}{t}\right ) \end {aligned}\]

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

\begin{align*} p = \cos \left (\frac {x}{t}\right ) \end{align*}

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

\begin{align*} x &= \arccos \left (p \right ) t\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 &= \arccos \left (p \right )\\ g &= 0 \end{align*}

Hence (2) becomes

\begin{align*} p -\arccos \left (p \right ) = -\frac {t p^{\prime }\left (t \right )}{\sqrt {-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 -\arccos \left (p \right ) = 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 ) = -\frac {\left (p \left (t \right )-\arccos \left (p \left (t \right )\right )\right ) \sqrt {-p \left (t \right )^{2}+1}}{t}\tag {4} \end{align*}

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

The ode

\begin{align*} p^{\prime }\left (t \right ) = -\frac {\left (p \left (t \right )-\arccos \left (p \left (t \right )\right )\right ) \sqrt {-\left (p \left (t \right )-1\right ) \left (p \left (t \right )+1\right )}}{t} \end{align*}

is separable as it can be written as

\begin{align*} p^{\prime }\left (t \right )&= -\frac {\left (p \left (t \right )-\arccos \left (p \left (t \right )\right )\right ) \sqrt {-\left (p \left (t \right )-1\right ) \left (p \left (t \right )+1\right )}}{t}\\ &= f(t) g(p) \end{align*}

Where

\begin{align*} f(t) &= -\frac {1}{t}\\ g(p) &= \left (p -\arccos \left (p \right )\right ) \sqrt {-\left (p -1\right ) \left (p +1\right )} \end{align*}

Integrating gives

\begin{gather*} \begin {aligned} \int { \frac {1}{g(p)} \,dp} &= \int { f(t) \,dt}\\ \int { \frac {1}{\left (p -\arccos \left (p \right )\right ) \sqrt {-\left (p -1\right ) \left (p +1\right )}}\,dp} &= \int { -\frac {1}{t} \,dt} \end {aligned} \end{gather*}

We now need to find the singular solutions, these are found by finding for what values \(g(p)\) is zero, since we had to divide by this above. Solving \(g(p)=0\) or

\begin{align*} \left (p -\arccos \left (p \right )\right ) \sqrt {-\left (p -1\right ) \left (p +1\right )}&=0 \end{align*}

for \(p \left (t \right )\) gives

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

Now we each such singular solution is checked if it verifies the ode itself and any initial conditions given. If it does not then the singular solution is removed.

Therefore the solutions found are

\begin{gather*} \begin {aligned} \int _{}^{p \left (t \right )}\frac {1}{\left (\tau -\arccos \left (\tau \right )\right ) \sqrt {-\left (\tau -1\right ) \left (\tau +1\right )}}d \tau &= \ln \left (\frac {1}{t}\right )+c_1\\ p \left (t \right ) &= -1\\ p \left (t \right ) &= 1\\ \end {aligned} \end{gather*}

Solving for \(p\) from above gives

\[ p = \operatorname {RootOf}\left (-\int _{}^{\textit {\_Z}}\frac {1}{\left (\tau -\arccos \left (\tau \right )\right ) \sqrt {-\left (\tau -1\right ) \left (\tau +1\right )}}d \tau +\ln \left (\frac {1}{t}\right )+c_1 \right ) \]

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

\[ x = \arccos \left (\operatorname {RootOf}\left (-\int _{}^{\textit {\_Z}}\frac {1}{\left (\tau -\arccos \left (\tau \right )\right ) \sqrt {-\left (\tau -1\right ) \left (\tau +1\right )}}d \tau +\ln \left (\frac {1}{t}\right )+c_1 \right )\right ) t \]

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

\[ x = \pi t \]

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

\[ x = 0 \]
Direction field with Isoclines Direction field and Solutions plot

Summary of solutions found

\begin{align*} x&=\arccos \left (\operatorname {RootOf}\left (-\int _{}^{\textit {\_Z}}\frac {1}{\left (\tau -\arccos \left (\tau \right )\right ) \sqrt {-\left (\tau -1\right ) \left (\tau +1\right )}}d \tau +\ln \left (\frac {1}{t}\right )+c_1 \right )\right ) t\\ x&=\pi t\\ x&=0 \end{align*}