20.25 problem 664

20.25.1 Solving as second order ode missing y ode
20.25.2 Solving as second order ode non constant coeff transformation on B ode
20.25.3 Maple step by step solution

Internal problem ID [15428]
Internal file name [OUTPUT/15429_Wednesday_May_08_2024_03_58_36_PM_34969694/index.tex]

Book: A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section: Chapter 2 (Higher order ODE’s). Section 15.5 Linear equations with variable coefficients. The Lagrange method. Exercises page 148
Problem number: 664.
ODE order: 2.
ODE degree: 1.

The type(s) of ODE detected by this program : "second_order_ode_missing_y", "second_order_ode_non_constant_coeff_transformation_on_B"

Maple gives the following as the ode type

[[_2nd_order, _missing_y]]

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

20.25.1 Solving as second order ode missing y ode

This is second order ode with missing dependent variable \(y\). Let \begin {align*} p(x) &= y^{\prime } \end {align*}

Then \begin {align*} p'(x) &= y^{\prime \prime } \end {align*}

Hence the ode becomes \begin {align*} x \ln \left (x \right ) p^{\prime }\left (x \right )-p \left (x \right )-\ln \left (x \right )^{2} = 0 \end {align*}

Which is now solve for \(p(x)\) as first order ode.

Entering Linear first order ODE solver. In canonical form a linear first order is \begin {align*} p^{\prime }\left (x \right ) + p(x)p \left (x \right ) &= q(x) \end {align*}

Where here \begin {align*} p(x) &=-\frac {1}{x \ln \left (x \right )}\\ q(x) &=\frac {\ln \left (x \right )}{x} \end {align*}

Hence the ode is \begin {align*} p^{\prime }\left (x \right )-\frac {p \left (x \right )}{x \ln \left (x \right )} = \frac {\ln \left (x \right )}{x} \end {align*}

The integrating factor \(\mu \) is \begin{align*} \mu &= {\mathrm e}^{\int -\frac {1}{x \ln \left (x \right )}d x} \\ &= \frac {1}{\ln \left (x \right )} \\ \end{align*} The ode becomes \begin {align*} \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}}\left ( \mu p\right ) &= \left (\mu \right ) \left (\frac {\ln \left (x \right )}{x}\right ) \\ \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}} \left (\frac {p}{\ln \left (x \right )}\right ) &= \left (\frac {1}{\ln \left (x \right )}\right ) \left (\frac {\ln \left (x \right )}{x}\right )\\ \mathrm {d} \left (\frac {p}{\ln \left (x \right )}\right ) &= \frac {1}{x}\, \mathrm {d} x \end {align*}

Integrating gives \begin {align*} \frac {p}{\ln \left (x \right )} &= \int {\frac {1}{x}\,\mathrm {d} x}\\ \frac {p}{\ln \left (x \right )} &= \ln \left (x \right ) + c_{1} \end {align*}

Dividing both sides by the integrating factor \(\mu =\frac {1}{\ln \left (x \right )}\) results in \begin {align*} p \left (x \right ) &= \ln \left (x \right )^{2}+c_{1} \ln \left (x \right ) \end {align*}

which simplifies to \begin {align*} p \left (x \right ) &= \ln \left (x \right ) \left (\ln \left (x \right )+c_{1} \right ) \end {align*}

Since \(p=y^{\prime }\) then the new first order ode to solve is \begin {align*} y^{\prime } = \ln \left (x \right ) \left (\ln \left (x \right )+c_{1} \right ) \end {align*}

Integrating both sides gives \begin {align*} y &= \int { \ln \left (x \right ) \left (\ln \left (x \right )+c_{1} \right )\,\mathop {\mathrm {d}x}}\\ &= x \ln \left (x \right )^{2}+\left (-2+c_{1} \right ) x \ln \left (x \right )-c_{1} x +2 x +c_{2} \end {align*}

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= x \ln \left (x \right )^{2}+\left (-2+c_{1} \right ) x \ln \left (x \right )-c_{1} x +2 x +c_{2} \\ \end{align*}

Verification of solutions

\[ y = x \ln \left (x \right )^{2}+\left (-2+c_{1} \right ) x \ln \left (x \right )-c_{1} x +2 x +c_{2} \] Verified OK.

20.25.2 Solving as second order ode non constant coeff transformation on B ode

Given an ode of the form \begin {align*} A y^{\prime \prime } + B y^{\prime } + C y &= F(x) \end {align*}

This method reduces the order ode the ODE by one by applying the transformation \begin {align*} y&= B v \end {align*}

This results in \begin {align*} y' &=B' v+ v' B \\ y'' &=B'' v+ B' v' +v'' B + v' B' \\ &=v'' B+2 v'+ B'+B'' v \end {align*}

And now the original ode becomes \begin {align*} A\left ( v'' B+2v'B'+ B'' v\right )+B\left ( B'v+ v' B\right ) +CBv & =0\\ ABv'' +\left ( 2AB'+B^{2}\right ) v'+\left (AB''+BB'+CB\right ) v & =0 \tag {1} \end {align*}

If the term \(AB''+BB'+CB\) is zero, then this method works and can be used to solve \[ ABv''+\left ( 2AB' +B^{2}\right ) v'=0 \] By Using \(u=v'\) which reduces the order of the above ode to one. The new ode is \[ ABu'+\left ( 2AB'+B^{2}\right ) u=0 \] The above ode is first order ode which is solved for \(u\). Now a new ode \(v'=u\) is solved for \(v\) as first order ode. Then the final solution is obtain from \(y=Bv\).

This method works only if the term \(AB''+BB'+CB\) is zero. The given ODE shows that \begin {align*} A &= \ln \left (x \right ) x\\ B &= -1\\ C &= 0\\ F &= \ln \left (x \right )^{2} \end {align*}

The above shows that for this ode \begin {align*} AB''+BB'+CB &= \left (\ln \left (x \right ) x\right ) \left (0\right ) + \left (-1\right ) \left (0\right ) + \left (0\right ) \left (-1\right ) \\ &=0 \end {align*}

Hence the ode in \(v\) given in (1) now simplifies to \begin {align*} -\ln \left (x \right ) x v'' +\left ( 1\right ) v' & =0 \end {align*}

Now by applying \(v'=u\) the above becomes \begin {align*} -\ln \left (x \right ) x u^{\prime }\left (x \right )+u \left (x \right ) = 0 \end {align*}

Which is now solved for \(u\). In canonical form the ODE is \begin {align*} u' &= F(x,u)\\ &= f( x) g(u)\\ &= \frac {u}{x \ln \left (x \right )} \end {align*}

Where \(f(x)=\frac {1}{x \ln \left (x \right )}\) and \(g(u)=u\). Integrating both sides gives \begin {align*} \frac {1}{u} \,du &= \frac {1}{x \ln \left (x \right )} \,d x\\ \int { \frac {1}{u} \,du} &= \int {\frac {1}{x \ln \left (x \right )} \,d x}\\ \ln \left (u \right )&=\ln \left (\ln \left (x \right )\right )+c_{1}\\ u&={\mathrm e}^{\ln \left (\ln \left (x \right )\right )+c_{1}}\\ &=c_{1} \ln \left (x \right ) \end {align*}

The ode for \(v\) now becomes \begin {align*} v' &= u\\ &=c_{1} \ln \left (x \right ) \end {align*}

Which is now solved for \(v\). Integrating both sides gives \begin {align*} v \left (x \right ) &= \int { c_{1} \ln \left (x \right )\,\mathop {\mathrm {d}x}}\\ &= x \ln \left (x \right ) c_{1} -c_{1} x +c_{2} \end {align*}

Therefore the homogeneous solution is \begin {align*} y_h(x) &= B v\\ &= \left (-1\right ) \left (x \ln \left (x \right ) c_{1} -c_{1} x +c_{2}\right ) \\ &= -x \ln \left (x \right ) c_{1} +c_{1} x -c_{2} \end {align*}

And now the particular solution \(y_p(x)\) will be found. The particular solution \(y_p\) can be found using either the method of undetermined coefficients, or the method of variation of parameters. The method of variation of parameters will be used as it is more general and can be used when the coefficients of the ODE depend on \(x\) as well. Let \begin{equation} \tag{1} y_p(x) = u_1 y_1 + u_2 y_2 \end{equation} Where \(u_1,u_2\) to be determined, and \(y_1,y_2\) are the two basis solutions (the two linearly independent solutions of the homogeneous ODE) found earlier when solving the homogeneous ODE as \begin{align*} y_1 &= -1 \\ y_2 &= -\ln \left (x \right ) x +x \\ \end{align*} In the Variation of parameters \(u_1,u_2\) are found using \begin{align*} \tag{2} u_1 &= -\int \frac {y_2 f(x)}{a W(x)} \\ \tag{3} u_2 &= \int \frac {y_1 f(x)}{a W(x)} \\ \end{align*} Where \(W(x)\) is the Wronskian and \(a\) is the coefficient in front of \(y''\) in the given ODE. The Wronskian is given by \(W= \begin {vmatrix} y_1 & y_{2} \\ y_{1}^{\prime } & y_{2}^{\prime } \end {vmatrix} \). Hence \[ W = \begin {vmatrix} -1 & -\ln \left (x \right ) x +x \\ \frac {d}{dx}\left (-1\right ) & \frac {d}{dx}\left (-\ln \left (x \right ) x +x\right ) \end {vmatrix} \] Which gives \[ W = \begin {vmatrix} -1 & -\ln \left (x \right ) x +x \\ 0 & -\ln \left (x \right ) \end {vmatrix} \] Therefore \[ W = \left (-1\right )\left (-\ln \left (x \right )\right ) - \left (-\ln \left (x \right ) x +x\right )\left (0\right ) \] Which simplifies to \[ W = \ln \left (x \right ) \] Which simplifies to \[ W = \ln \left (x \right ) \] Therefore Eq. (2) becomes \[ u_1 = -\int \frac {\left (-\ln \left (x \right ) x +x \right ) \ln \left (x \right )^{2}}{x \ln \left (x \right )^{2}}\,dx \] Which simplifies to \[ u_1 = - \int \left (-\ln \left (x \right )+1\right )d x \] Hence \[ u_1 = -2 x +\ln \left (x \right ) x \] And Eq. (3) becomes \[ u_2 = \int \frac {-\ln \left (x \right )^{2}}{x \ln \left (x \right )^{2}}\,dx \] Which simplifies to \[ u_2 = \int -\frac {1}{x}d x \] Hence \[ u_2 = -\ln \left (x \right ) \] Therefore the particular solution, from equation (1) is \[ y_p(x) = 2 x -\ln \left (x \right ) x -\ln \left (x \right ) \left (-\ln \left (x \right ) x +x \right ) \] Which simplifies to \[ y_p(x) = x \left (\ln \left (x \right )^{2}-2 \ln \left (x \right )+2\right ) \] Hence the complete solution is \begin {align*} y(x) &= y_h + y_p \\ &= \left (-x \ln \left (x \right ) c_{1} +c_{1} x -c_{2}\right ) + \left (x \left (\ln \left (x \right )^{2}-2 \ln \left (x \right )+2\right )\right )\\ &= x \ln \left (x \right )^{2}-x \left (2+c_{1} \right ) \ln \left (x \right )+x \left (2+c_{1} \right )-c_{2} \end {align*}

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= x \ln \left (x \right )^{2}-x \left (2+c_{1} \right ) \ln \left (x \right )+x \left (2+c_{1} \right )-c_{2} \\ \end{align*}

Verification of solutions

\[ y = x \ln \left (x \right )^{2}-x \left (2+c_{1} \right ) \ln \left (x \right )+x \left (2+c_{1} \right )-c_{2} \] Verified OK.

20.25.3 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & x \ln \left (x \right ) y^{\prime \prime }-y^{\prime }=\ln \left (x \right )^{2} \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 2 \\ {} & {} & y^{\prime \prime } \\ \bullet & {} & \textrm {Make substitution}\hspace {3pt} u =y^{\prime }\hspace {3pt}\textrm {to reduce order of ODE}\hspace {3pt} \\ {} & {} & x \ln \left (x \right ) u^{\prime }\left (x \right )-u \left (x \right )=\ln \left (x \right )^{2} \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & u^{\prime }\left (x \right )=\frac {u \left (x \right )+\ln \left (x \right )^{2}}{x \ln \left (x \right )} \\ \bullet & {} & \textrm {Collect w.r.t.}\hspace {3pt} u \left (x \right )\hspace {3pt}\textrm {and simplify}\hspace {3pt} \\ {} & {} & u^{\prime }\left (x \right )=\frac {u \left (x \right )}{x \ln \left (x \right )}+\frac {\ln \left (x \right )}{x} \\ \bullet & {} & \textrm {Group terms with}\hspace {3pt} u \left (x \right )\hspace {3pt}\textrm {on the lhs of the ODE and the rest on the rhs of the ODE}\hspace {3pt} \\ {} & {} & u^{\prime }\left (x \right )-\frac {u \left (x \right )}{x \ln \left (x \right )}=\frac {\ln \left (x \right )}{x} \\ \bullet & {} & \textrm {The ODE is linear; multiply by an integrating factor}\hspace {3pt} \mu \left (x \right ) \\ {} & {} & \mu \left (x \right ) \left (u^{\prime }\left (x \right )-\frac {u \left (x \right )}{x \ln \left (x \right )}\right )=\frac {\mu \left (x \right ) \ln \left (x \right )}{x} \\ \bullet & {} & \textrm {Assume the lhs of the ODE is the total derivative}\hspace {3pt} \frac {d}{d x}\left (u \left (x \right ) \mu \left (x \right )\right ) \\ {} & {} & \mu \left (x \right ) \left (u^{\prime }\left (x \right )-\frac {u \left (x \right )}{x \ln \left (x \right )}\right )=u^{\prime }\left (x \right ) \mu \left (x \right )+u \left (x \right ) \mu ^{\prime }\left (x \right ) \\ \bullet & {} & \textrm {Isolate}\hspace {3pt} \mu ^{\prime }\left (x \right ) \\ {} & {} & \mu ^{\prime }\left (x \right )=-\frac {\mu \left (x \right )}{x \ln \left (x \right )} \\ \bullet & {} & \textrm {Solve to find the integrating factor}\hspace {3pt} \\ {} & {} & \mu \left (x \right )=\frac {1}{\ln \left (x \right )} \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} x \\ {} & {} & \int \left (\frac {d}{d x}\left (u \left (x \right ) \mu \left (x \right )\right )\right )d x =\int \frac {\mu \left (x \right ) \ln \left (x \right )}{x}d x +c_{1} \\ \bullet & {} & \textrm {Evaluate the integral on the lhs}\hspace {3pt} \\ {} & {} & u \left (x \right ) \mu \left (x \right )=\int \frac {\mu \left (x \right ) \ln \left (x \right )}{x}d x +c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} u \left (x \right ) \\ {} & {} & u \left (x \right )=\frac {\int \frac {\mu \left (x \right ) \ln \left (x \right )}{x}d x +c_{1}}{\mu \left (x \right )} \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} \mu \left (x \right )=\frac {1}{\ln \left (x \right )} \\ {} & {} & u \left (x \right )=\ln \left (x \right ) \left (\int \frac {1}{x}d x +c_{1} \right ) \\ \bullet & {} & \textrm {Evaluate the integrals on the rhs}\hspace {3pt} \\ {} & {} & u \left (x \right )=\ln \left (x \right ) \left (\ln \left (x \right )+c_{1} \right ) \\ \bullet & {} & \textrm {Solve 1st ODE for}\hspace {3pt} u \left (x \right ) \\ {} & {} & u \left (x \right )=\ln \left (x \right ) \left (\ln \left (x \right )+c_{1} \right ) \\ \bullet & {} & \textrm {Make substitution}\hspace {3pt} u =y^{\prime } \\ {} & {} & y^{\prime }=\ln \left (x \right ) \left (\ln \left (x \right )+c_{1} \right ) \\ \bullet & {} & \textrm {Integrate both sides to solve for}\hspace {3pt} y \\ {} & {} & \int y^{\prime }d x =\int \ln \left (x \right ) \left (\ln \left (x \right )+c_{1} \right )d x +c_{2} \\ \bullet & {} & \textrm {Compute integrals}\hspace {3pt} \\ {} & {} & y=x \ln \left (x \right )^{2}-2 \ln \left (x \right ) x +2 x +c_{1} \left (\ln \left (x \right ) x -x \right )+c_{2} \end {array} \]

Maple trace

`Methods for second order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying high order exact linear fully integrable 
-> Calling odsolve with the ODE`, diff(_b(_a), _a) = (ln(_a)^2+_b(_a))/(ln(_a)*_a), _b(_a)`   *** Sublevel 2 *** 
   Methods for first order ODEs: 
   --- Trying classification methods --- 
   trying a quadrature 
   trying 1st order linear 
   <- 1st order linear successful 
<- high order exact linear fully integrable successful`
 

Solution by Maple

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

dsolve(x*ln(x)*diff(y(x),x$2)-diff(y(x),x)=ln(x)^2,y(x), singsol=all)
 

\[ y \left (x \right ) = \ln \left (x \right )^{2} x +x \left (c_{1} -2\right ) \ln \left (x \right )+\left (-c_{1} +2\right ) x +c_{2} \]

Solution by Mathematica

Time used: 0.049 (sec). Leaf size: 29

DSolve[x*Log[x]*y''[x]-y'[x]==Log[x]^2,y[x],x,IncludeSingularSolutions -> True]
 

\[ y(x)\to x \log ^2(x)-(-2+c_1) x+(-2+c_1) x \log (x)+c_2 \]