5.21 problem 7(c)

5.21.1 Solving as homogeneous ode
5.21.2 Maple step by step solution

Internal problem ID [6223]
Internal file name [OUTPUT/5471_Sunday_June_05_2022_03_40_11_PM_7650062/index.tex]

Book: Differential Equations: Theory, Technique, and Practice by George Simmons, Steven Krantz. McGraw-Hill NY. 2007. 1st Edition.
Section: Chapter 1. What is a differential equation. Section 1.7. Homogeneous Equations. Page 28
Problem number: 7(c).
ODE order: 1.
ODE degree: 1.

The type(s) of ODE detected by this program :

Maple gives the following as the ode type

[[_homogeneous, `class A`], _dAlembert]

\[ \boxed {y^{\prime }-\frac {x^{2}-y x}{y^{2} \cos \left (\frac {x}{y}\right )}=0} \]

5.21.1 Solving as homogeneous ode

In canonical form, the ODE is \begin {align*} y' &= F(x,y)\\ &= -\frac {x \left (-x +y \right )}{y^{2} \cos \left (\frac {x}{y}\right )}\tag {1} \end {align*}

An ode of the form \(y' = \frac {M(x,y)}{N(x,y)}\) is called homogeneous if the functions \(M(x,y)\) and \(N(x,y)\) are both homogeneous functions and of the same order. Recall that a function \(f(x,y)\) is homogeneous of order \(n\) if \[ f(t^n x, t^n y)= t^n f(x,y) \] In this case, it can be seen that both \(M=x \left (x -y \right )\) and \(N=\cos \left (\frac {x}{y}\right ) y^{2}\) are both homogeneous and of the same order \(n=2\). Therefore this is a homogeneous ode. Since this ode is homogeneous, it is converted to separable ODE using the substitution \(u=\frac {y}{x}\), or \(y=ux\). Hence \[ \frac { \mathop {\mathrm {d}y}}{\mathop {\mathrm {d}x}}= \frac { \mathop {\mathrm {d}u}}{\mathop {\mathrm {d}x}}x + u \] Applying the transformation \(y=ux\) to the above ODE in (1) gives \begin {align*} \frac { \mathop {\mathrm {d}u}}{\mathop {\mathrm {d}x}}x + u &= \frac {1}{u^{2} \cos \left (\frac {1}{u}\right )}-\frac {1}{u \cos \left (\frac {1}{u}\right )}\\ \frac { \mathop {\mathrm {d}u}}{\mathop {\mathrm {d}x}} &= \frac {\frac {1}{u \left (x \right )^{2} \cos \left (\frac {1}{u \left (x \right )}\right )}-\frac {1}{u \left (x \right ) \cos \left (\frac {1}{u \left (x \right )}\right )}-u \left (x \right )}{x} \end {align*}

Or \[ u^{\prime }\left (x \right )-\frac {\frac {1}{u \left (x \right )^{2} \cos \left (\frac {1}{u \left (x \right )}\right )}-\frac {1}{u \left (x \right ) \cos \left (\frac {1}{u \left (x \right )}\right )}-u \left (x \right )}{x} = 0 \] Or \[ u^{\prime }\left (x \right ) u \left (x \right )^{2} \cos \left (\frac {1}{u \left (x \right )}\right ) x +u \left (x \right )^{3} \cos \left (\frac {1}{u \left (x \right )}\right )+u \left (x \right )-1 = 0 \] Or \[ u \left (x \right )^{2} \left (x u^{\prime }\left (x \right )+u \left (x \right )\right ) \cos \left (\frac {1}{u \left (x \right )}\right )+u \left (x \right )-1 = 0 \] Which is now solved as separable in \(u \left (x \right )\). Which is now solved in \(u \left (x \right )\). In canonical form the ODE is \begin {align*} u' &= F(x,u)\\ &= f( x) g(u)\\ &= -\frac {\left (u -1\right ) \sec \left (\frac {1}{u}\right )+u^{3}}{x \,u^{2}} \end {align*}

Where \(f(x)=-\frac {1}{x}\) and \(g(u)=\frac {\left (u -1\right ) \sec \left (\frac {1}{u}\right )+u^{3}}{u^{2}}\). Integrating both sides gives \begin{align*} \frac {1}{\frac {\left (u -1\right ) \sec \left (\frac {1}{u}\right )+u^{3}}{u^{2}}} \,du &= -\frac {1}{x} \,d x \\ \int { \frac {1}{\frac {\left (u -1\right ) \sec \left (\frac {1}{u}\right )+u^{3}}{u^{2}}} \,du} &= \int {-\frac {1}{x} \,d x} \\ \int _{}^{u}\frac {\textit {\_a}^{2}}{\left (\textit {\_a} -1\right ) \sec \left (\frac {1}{\textit {\_a}}\right )+\textit {\_a}^{3}}d \textit {\_a}&=-\ln \left (x \right )+c_{2} \\ \end{align*} Which results in \[ \int _{}^{u}\frac {\textit {\_a}^{2}}{\left (\textit {\_a} -1\right ) \sec \left (\frac {1}{\textit {\_a}}\right )+\textit {\_a}^{3}}d \textit {\_a}=-\ln \left (x \right )+c_{2} \] The solution is \[ \int _{}^{u \left (x \right )}\frac {\textit {\_a}^{2}}{\left (\textit {\_a} -1\right ) \sec \left (\frac {1}{\textit {\_a}}\right )+\textit {\_a}^{3}}d \textit {\_a} +\ln \left (x \right )-c_{2} = 0 \] Now \(u\) in the above solution is replaced back by \(y\) using \(u=\frac {y}{x}\) which results in the solution \[ \int _{}^{\frac {y}{x}}\frac {\textit {\_a}^{2}}{\left (\textit {\_a} -1\right ) \sec \left (\frac {1}{\textit {\_a}}\right )+\textit {\_a}^{3}}d \textit {\_a} +\ln \left (x \right )-c_{2} = 0 \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} \int _{}^{\frac {y}{x}}\frac {\cos \left (\frac {1}{\textit {\_a}}\right ) \textit {\_a}^{2}}{\textit {\_a}^{3} \cos \left (\frac {1}{\textit {\_a}}\right )+\textit {\_a} -1}d \textit {\_a} +\ln \left (x \right )-c_{2} &= 0 \\ \end{align*}

Figure 164: Slope field plot

Verification of solutions

\[ \int _{}^{\frac {y}{x}}\frac {\cos \left (\frac {1}{\textit {\_a}}\right ) \textit {\_a}^{2}}{\textit {\_a}^{3} \cos \left (\frac {1}{\textit {\_a}}\right )+\textit {\_a} -1}d \textit {\_a} +\ln \left (x \right )-c_{2} = 0 \] Verified OK.

5.21.2 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & y^{\prime }-\frac {x^{2}-y x}{y^{2} \cos \left (\frac {x}{y}\right )}=0 \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & y^{\prime } \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & y^{\prime }=\frac {x^{2}-y x}{y^{2} \cos \left (\frac {x}{y}\right )} \end {array} \]

Maple trace

`Methods for first order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying 1st order linear 
trying Bernoulli 
trying separable 
trying inverse linear 
trying homogeneous types: 
trying homogeneous D 
<- homogeneous successful`
 

Solution by Maple

Time used: 0.015 (sec). Leaf size: 36

dsolve(diff(y(x),x)=(x^2-x*y(x))/(y(x)^2*cos(x/y(x))),y(x), singsol=all)
 

\[ y \left (x \right ) = \operatorname {RootOf}\left (\int _{}^{\textit {\_Z}}\frac {\textit {\_a}^{2} \cos \left (\frac {1}{\textit {\_a}}\right )}{\textit {\_a}^{3} \cos \left (\frac {1}{\textit {\_a}}\right )+\textit {\_a} -1}d \textit {\_a} +\ln \left (x \right )+c_{1} \right ) x \]

Solution by Mathematica

Time used: 1.114 (sec). Leaf size: 49

DSolve[y'[x]==(x^2-x*y[x])/(y[x]^2*Cos[x/y[x]]),y[x],x,IncludeSingularSolutions -> True]
 

\[ \text {Solve}\left [\int _1^{\frac {y(x)}{x}}\frac {\cos \left (\frac {1}{K[1]}\right ) K[1]^2}{\cos \left (\frac {1}{K[1]}\right ) K[1]^3+K[1]-1}dK[1]=-\log (x)+c_1,y(x)\right ] \]