5.8 problem 8

5.8.1 Solving as second order change of variable on y method 2 ode
5.8.2 Solving as second order ode non constant coeff transformation on B ode

Internal problem ID [5829]
Internal file name [OUTPUT/5077_Sunday_June_05_2022_03_20_43_PM_69128330/index.tex]

Book: Ordinary differential equations and calculus of variations. Makarets and Reshetnyak. Wold Scientific. Singapore. 1995
Section: Chapter 2. Linear homogeneous equations. Section 2.3.4 problems. page 104
Problem number: 8.
ODE order: 2.
ODE degree: 1.

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

Maple gives the following as the ode type

[[_2nd_order, _with_linear_symmetries]]

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

5.8.1 Solving as second order change of variable on y method 2 ode

This is second order non-homogeneous ODE. In standard form the ODE is \[ A y''(x) + B y'(x) + C y(x) = f(x) \] Where \(A=x^{2} \left (\ln \left (x \right )-1\right ), B=-x, C=1, f(x)=x \left (\ln \left (x \right )-1\right )^{2}\). Let the solution be \[ y = y_h + y_p \] Where \(y_h\) is the solution to the homogeneous ODE \( A y''(x) + B y'(x) + C y(x) = 0\), and \(y_p\) is a particular solution to the non-homogeneous ODE \(A y''(x) + B y'(x) + C y(x) = f(x)\). Solving for \(y_h\) from \[ x^{2} \left (\ln \left (x \right )-1\right ) y^{\prime \prime }-y^{\prime } x +y = 0 \] In normal form the ode \begin {align*} x^{2} \left (\ln \left (x \right )-1\right ) y^{\prime \prime }-y^{\prime } x +y&=0 \tag {1} \end {align*}

Becomes \begin {align*} y^{\prime \prime }+p \left (x \right ) y^{\prime }+q \left (x \right ) y&=0 \tag {2} \end {align*}

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

Applying change of variables on the depndent variable \(y = v \left (x \right ) x^{n}\) to (2) gives the following ode where the dependent variables is \(v \left (x \right )\) and not \(y\). \begin {align*} v^{\prime \prime }\left (x \right )+\left (\frac {2 n}{x}+p \right ) v^{\prime }\left (x \right )+\left (\frac {n \left (n -1\right )}{x^{2}}+\frac {n p}{x}+q \right ) v \left (x \right )&=0 \tag {3} \end {align*}

Let the coefficient of \(v \left (x \right )\) above be zero. Hence \begin {align*} \frac {n \left (n -1\right )}{x^{2}}+\frac {n p}{x}+q&=0 \tag {4} \end {align*}

Substituting the earlier values found for \(p \left (x \right )\) and \(q \left (x \right )\) into (4) gives \begin {align*} \frac {n \left (n -1\right )}{x^{2}}-\frac {n}{x^{2} \left (\ln \left (x \right )-1\right )}+\frac {1}{x^{2} \left (\ln \left (x \right )-1\right )}&=0 \tag {5} \end {align*}

Solving (5) for \(n\) gives \begin {align*} n&=1 \tag {6} \end {align*}

Substituting this value in (3) gives \begin {align*} v^{\prime \prime }\left (x \right )+\left (\frac {2}{x}-\frac {1}{x \left (\ln \left (x \right )-1\right )}\right ) v^{\prime }\left (x \right )&=0 \\ v^{\prime \prime }\left (x \right )+\left (\frac {2}{x}-\frac {1}{x \left (\ln \left (x \right )-1\right )}\right ) v^{\prime }\left (x \right )&=0 \tag {7} \\ \end {align*}

Using the substitution \begin {align*} u \left (x \right ) = v^{\prime }\left (x \right ) \end {align*}

Then (7) becomes \begin {align*} u^{\prime }\left (x \right )+\left (\frac {2}{x}-\frac {1}{x \left (\ln \left (x \right )-1\right )}\right ) u \left (x \right ) = 0 \tag {8} \\ \end {align*}

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

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

Which simplifies to \[ u \left (x \right ) = c_{1} \left (\frac {\ln \left (x \right )}{x^{2}}-\frac {1}{x^{2}}\right ) \] Now that \(u \left (x \right )\) is known, then \begin {align*} v^{\prime }\left (x \right )&= u \left (x \right )\\ v \left (x \right )&= \int u \left (x \right )d x +c_{2}\\ &= -\frac {c_{1} \ln \left (x \right )}{x}+c_{2} \end {align*}

Hence \begin {align*} y&= v \left (x \right ) x^{n}\\ &= \left (-\frac {c_{1} \ln \left (x \right )}{x}+c_{2} \right ) x\\ &= -c_{1} \ln \left (x \right )+c_{2} x\\ \end {align*}

Now the particular solution to this ODE is found \[ x^{2} \left (\ln \left (x \right )-1\right ) y^{\prime \prime }-y^{\prime } x +y = x \left (\ln \left (x \right )-1\right )^{2} \] 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 &= x \\ y_2 &= \ln \left (x \right ) \\ \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} x & \ln \left (x \right ) \\ \frac {d}{dx}\left (x\right ) & \frac {d}{dx}\left (\ln \left (x \right )\right ) \end {vmatrix} \] Which gives \[ W = \begin {vmatrix} x & \ln \left (x \right ) \\ 1 & \frac {1}{x} \end {vmatrix} \] Therefore \[ W = \left (x\right )\left (\frac {1}{x}\right ) - \left (\ln \left (x \right )\right )\left (1\right ) \] Which simplifies to \[ W = 1-\ln \left (x \right ) \] Which simplifies to \[ W = 1-\ln \left (x \right ) \] Therefore Eq. (2) becomes \[ u_1 = -\int \frac {\ln \left (x \right ) x \left (\ln \left (x \right )-1\right )^{2}}{x^{2} \left (\ln \left (x \right )-1\right ) \left (1-\ln \left (x \right )\right )}\,dx \] Which simplifies to \[ u_1 = - \int -\frac {\ln \left (x \right )}{x}d x \] Hence \[ u_1 = \frac {\ln \left (x \right )^{2}}{2} \] And Eq. (3) becomes \[ u_2 = \int \frac {x^{2} \left (\ln \left (x \right )-1\right )^{2}}{x^{2} \left (\ln \left (x \right )-1\right ) \left (1-\ln \left (x \right )\right )}\,dx \] Which simplifies to \[ u_2 = \int \left (-1\right )d x \] Hence \[ u_2 = -x \] Therefore the particular solution, from equation (1) is \[ y_p(x) = \frac {\ln \left (x \right )^{2} x}{2}-\ln \left (x \right ) x \] Therefore the general solution is \begin{align*} y &= y_h + y_p \\ &= \left (\left (-\frac {c_{1} \ln \left (x \right )}{x}+c_{2} \right ) x\right ) + \left (\frac {\ln \left (x \right )^{2} x}{2}-\ln \left (x \right ) x\right ) \\ &= \frac {\ln \left (x \right )^{2} x}{2}-\ln \left (x \right ) x +\left (-\frac {c_{1} \ln \left (x \right )}{x}+c_{2} \right ) x \\ \end{align*} Which simplifies to \[ y = \frac {\ln \left (x \right )^{2} x}{2}+\left (-x -c_{1} \right ) \ln \left (x \right )+c_{2} x \]

Summary

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

Verification of solutions

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

5.8.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 &= x^{2} \left (\ln \left (x \right )-1\right )\\ B &= -x\\ C &= 1\\ F &= x \left (\ln \left (x \right )-1\right )^{2} \end {align*}

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

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

Now by applying \(v'=u\) the above becomes \begin {align*} -\left (\left (\ln \left (x \right )-1\right ) x u^{\prime }\left (x \right )+2 u \left (x \right ) \ln \left (x \right )-3 u \left (x \right )\right ) x^{2} = 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 \left (2 \ln \left (x \right )-3\right )}{x \left (\ln \left (x \right )-1\right )} \end {align*}

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

Which simplifies to \[ u \left (x \right ) = c_{1} \left (\frac {\ln \left (x \right )}{x^{2}}-\frac {1}{x^{2}}\right ) \] The ode for \(v\) now becomes \begin {align*} v' &= u\\ &=c_{1} \left (\frac {\ln \left (x \right )}{x^{2}}-\frac {1}{x^{2}}\right ) \end {align*}

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

Therefore the homogeneous solution is \begin {align*} y_h(x) &= B v\\ &= \left (-x\right ) \left (-\frac {c_{1} \ln \left (x \right )}{x}+c_{2}\right ) \\ &= c_{1} \ln \left (x \right )-c_{2} x \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 &= x \\ y_2 &= \ln \left (x \right ) \\ \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} x & \ln \left (x \right ) \\ \frac {d}{dx}\left (x\right ) & \frac {d}{dx}\left (\ln \left (x \right )\right ) \end {vmatrix} \] Which gives \[ W = \begin {vmatrix} x & \ln \left (x \right ) \\ 1 & \frac {1}{x} \end {vmatrix} \] Therefore \[ W = \left (x\right )\left (\frac {1}{x}\right ) - \left (\ln \left (x \right )\right )\left (1\right ) \] Which simplifies to \[ W = 1-\ln \left (x \right ) \] Which simplifies to \[ W = 1-\ln \left (x \right ) \] Therefore Eq. (2) becomes \[ u_1 = -\int \frac {\ln \left (x \right ) x \left (\ln \left (x \right )-1\right )^{2}}{x^{2} \left (\ln \left (x \right )-1\right ) \left (1-\ln \left (x \right )\right )}\,dx \] Which simplifies to \[ u_1 = - \int -\frac {\ln \left (x \right )}{x}d x \] Hence \[ u_1 = \frac {\ln \left (x \right )^{2}}{2} \] And Eq. (3) becomes \[ u_2 = \int \frac {x^{2} \left (\ln \left (x \right )-1\right )^{2}}{x^{2} \left (\ln \left (x \right )-1\right ) \left (1-\ln \left (x \right )\right )}\,dx \] Which simplifies to \[ u_2 = \int \left (-1\right )d x \] Hence \[ u_2 = -x \] Therefore the particular solution, from equation (1) is \[ y_p(x) = \frac {\ln \left (x \right )^{2} x}{2}-\ln \left (x \right ) x \] Hence the complete solution is \begin {align*} y(x) &= y_h + y_p \\ &= \left (c_{1} \ln \left (x \right )-c_{2} x\right ) + \left (\frac {\ln \left (x \right )^{2} x}{2}-\ln \left (x \right ) x\right )\\ &= \frac {\ln \left (x \right )^{2} x}{2}+\left (-x +c_{1} \right ) \ln \left (x \right )-c_{2} x \end {align*}

Summary

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

Verification of solutions

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

Maple trace

`Methods for second order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying high order exact linear fully integrable 
trying differential order: 2; linear nonhomogeneous with symmetry [0,1] 
trying a double symmetry of the form [xi=0, eta=F(x)] 
trying symmetries linear in x and y(x) 
Try integration with the canonical coordinates of the symmetry [0, x] 
-> Calling odsolve with the ODE`, diff(_b(_a), _a) = (-2*_b(_a)*_a*ln(_a)+ln(_a)^2+3*_b(_a)*_a-2*ln(_a)+1)/(_a^2*(ln(_a)-1)), _b(_a) 
   Methods for first order ODEs: 
   --- Trying classification methods --- 
   trying a quadrature 
   trying 1st order linear 
   <- 1st order linear successful 
<- differential order: 2; canonical coordinates successful`
 

Solution by Maple

Time used: 0.031 (sec). Leaf size: 25

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

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

Solution by Mathematica

Time used: 0.105 (sec). Leaf size: 27

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

\[ y(x)\to \frac {1}{2} x \log ^2(x)+c_1 x-(x+c_2) \log (x) \]