2.1.15.3 Solved using first_order_ode_homog_type_D2

Entering first order ode homog type D2 solver

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

Applying change of variables \(x = u \left (t \right ) t\), the ode becomes

\begin{align*} u^{\prime }\left (t \right ) t +u \left (t \right ) = \cos \left (u \left (t \right )\right ) \end{align*}

Which is now solved The ode

\begin{align*} u^{\prime }\left (t \right ) = -\frac {u \left (t \right )-\cos \left (u \left (t \right )\right )}{t} \end{align*}

is separable as it can be written as

\begin{align*} u^{\prime }\left (t \right )&= -\frac {u \left (t \right )-\cos \left (u \left (t \right )\right )}{t}\\ &= f(t) g(u) \end{align*}

Where

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

Integrating gives

\begin{gather*} \begin {aligned} \int { \frac {1}{g(u)} \,du} &= \int { f(t) \,dt}\\ \int { \frac {1}{-u +\cos \left (u \right )}\,du} &= \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(u)\) is zero, since we had to divide by this above. Solving \(g(u)=0\) or

\begin{align*} -u +\cos \left (u \right )&=0 \end{align*}

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

\begin{align*} u \left (t \right )&=\operatorname {RootOf}\left (-\cos \left (\textit {\_Z} \right )+\textit {\_Z} \right ) \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.

The solution \(\operatorname {RootOf}\left (-\cos \left (\textit {\_Z} \right )+\textit {\_Z} \right )\) will not be used

Converting \(\int _{}^{u \left (t \right )}\frac {1}{-\tau +\cos \left (\tau \right )}d \tau = \ln \left (t \right )+c_1\) back to \(x\) gives

\begin{align*} \int _{}^{\frac {x}{t}}\frac {1}{-\tau +\cos \left (\tau \right )}d \tau = \ln \left (t \right )+c_1 \end{align*}
Direction field with Isoclines Direction field

Summary of solutions found

\[ \int _{}^{\frac {x}{t}}\frac {1}{-\tau +\cos \left (\tau \right )}d \tau = \ln \left (t \right )+c_1 \]