20.11 problem 646

Internal problem ID [15414]
Internal file name [OUTPUT/15415_Wednesday_May_08_2024_03_58_19_PM_49778489/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: 646.
ODE order: 2.
ODE degree: 1.

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

Maple gives the following as the ode type

[[_2nd_order, _linear, _nonhomogeneous]]

\[ \boxed {\left (x^{4}-x^{3}\right ) y^{\prime \prime }+\left (2 x^{3}-2 x^{2}-x \right ) y^{\prime }-y=\frac {\left (x -1\right )^{2}}{x}} \] Given that one solution of the ode is \begin {align*} y_1 &= \frac {1}{x} \end {align*}

This is second order nonhomogeneous ODE. In standard form the ODE is \[ A y''(x) + B y'(x) + C y(x) = f(x) \] Where \(A=x^{4}-x^{3}, B=2 x^{3}-2 x^{2}-x, C=-1, f(x)=\frac {\left (x -1\right )^{2}}{x}\). 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 inhomogeneous ODE \(A y''(x) + B y'(x) + C y(x) = f(x)\). \(y_h\) is the solution to \[ \left (x^{4}-x^{3}\right ) y^{\prime \prime }+\left (2 x^{3}-2 x^{2}-x \right ) y^{\prime }-y = 0 \] Given one basis solution \(y_{1}\left (x \right )\), then the second basis solution is given by \[ y_{2}\left (x \right ) = y_{1} \left (\int \frac {{\mathrm e}^{-\left (\int p d x \right )}}{y_{1}^{2}}d x \right ) \] Where \(p(x)\) is the coefficient of \(y^{\prime }\) when the ode is written in the normal form \[ y^{\prime \prime }+p \left (x \right ) y^{\prime }+q \left (x \right ) y = f \left (x \right ) \] Looking at the ode to solve shows that \[ p \left (x \right ) = \frac {2 x^{3}-2 x^{2}-x}{x^{4}-x^{3}} \] Therefore \begin{align*} y_{2}\left (x \right ) &= \frac {\int {\mathrm e}^{-\left (\int \frac {2 x^{3}-2 x^{2}-x}{x^{4}-x^{3}}d x \right )} x^{2}d x}{x} \\ y_{2}\left (x \right ) &= \frac {1}{x} \int \frac {{\mathrm e}^{\frac {1}{x}-3 \ln \left (x \right )+\ln \left (x -1\right )}}{\frac {1}{x^{2}}} , dx \\ y_{2}\left (x \right ) &= \frac {\int \frac {\left (x -1\right ) {\mathrm e}^{\frac {1}{x}}}{x}d x}{x} \\ y_{2}\left (x \right ) &= {\mathrm e}^{\frac {1}{x}} \\ \end{align*} Hence the solution is \begin{align*} y &= c_{1} y_{1}\left (x \right )+c_{2} y_{2}\left (x \right ) \\ &= \frac {c_{1}}{x}+c_{2} {\mathrm e}^{\frac {1}{x}} \\ \end{align*} Therefore the homogeneous solution \(y_h\) is \[ y_h = \frac {c_{1}}{x}+c_{2} {\mathrm e}^{\frac {1}{x}} \] 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 &= \frac {1}{x} \\ y_2 &= {\mathrm e}^{\frac {1}{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} \frac {1}{x} & {\mathrm e}^{\frac {1}{x}} \\ \frac {d}{dx}\left (\frac {1}{x}\right ) & \frac {d}{dx}\left ({\mathrm e}^{\frac {1}{x}}\right ) \end {vmatrix} \] Which gives \[ W = \begin {vmatrix} \frac {1}{x} & {\mathrm e}^{\frac {1}{x}} \\ -\frac {1}{x^{2}} & -\frac {{\mathrm e}^{\frac {1}{x}}}{x^{2}} \end {vmatrix} \] Therefore \[ W = \left (\frac {1}{x}\right )\left (-\frac {{\mathrm e}^{\frac {1}{x}}}{x^{2}}\right ) - \left ({\mathrm e}^{\frac {1}{x}}\right )\left (-\frac {1}{x^{2}}\right ) \] Which simplifies to \[ W = \frac {\left (x -1\right ) {\mathrm e}^{\frac {1}{x}}}{x^{3}} \] Which simplifies to \[ W = \frac {\left (x -1\right ) {\mathrm e}^{\frac {1}{x}}}{x^{3}} \] Therefore Eq. (2) becomes \[ u_1 = -\int \frac {\frac {{\mathrm e}^{\frac {1}{x}} \left (x -1\right )^{2}}{x}}{\frac {\left (x^{4}-x^{3}\right ) \left (x -1\right ) {\mathrm e}^{\frac {1}{x}}}{x^{3}}}\,dx \] Which simplifies to \[ u_1 = - \int \frac {1}{x}d x \] Hence \[ u_1 = -\ln \left (x \right ) \] And Eq. (3) becomes \[ u_2 = \int \frac {\frac {\left (x -1\right )^{2}}{x^{2}}}{\frac {\left (x^{4}-x^{3}\right ) \left (x -1\right ) {\mathrm e}^{\frac {1}{x}}}{x^{3}}}\,dx \] Which simplifies to \[ u_2 = \int \frac {{\mathrm e}^{-\frac {1}{x}}}{x^{2}}d x \] Hence \[ u_2 = {\mathrm e}^{-\frac {1}{x}} \] Therefore the particular solution, from equation (1) is \[ y_p(x) = -\frac {\ln \left (x \right )}{x}+{\mathrm e}^{-\frac {1}{x}} {\mathrm e}^{\frac {1}{x}} \] Which simplifies to \[ y_p(x) = \frac {-\ln \left (x \right )+x}{x} \] Therefore the general solution is \begin {align*} y &= y_h + y_p \\ &= \left (\frac {c_{1}}{x}+c_{2} {\mathrm e}^{\frac {1}{x}}\right ) + \left (\frac {-\ln \left (x \right )+x}{x}\right ) \end {align*}

Summary

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

Verification of solutions

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

Maple trace Kovacic algorithm successful

`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)] 
-> Try solving first the homogeneous part of the ODE 
   checking if the LODE has constant coefficients 
   checking if the LODE is of Euler type 
   trying a symmetry of the form [xi=0, eta=F(x)] 
   checking if the LODE is missing y 
   -> Trying a Liouvillian solution using Kovacics algorithm 
      A Liouvillian solution exists 
      Reducible group (found an exponential solution) 
      Reducible group (found another exponential solution) 
   <- Kovacics algorithm successful 
<- solving first the homogeneous part of the ODE successful`
 

Solution by Maple

Time used: 0.0 (sec). Leaf size: 22

dsolve([(x^4-x^3)*diff(y(x),x$2)+(2*x^3-2*x^2-x)*diff(y(x),x)-y(x)=(x-1)^2/x,1/x],singsol=all)
 

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

Solution by Mathematica

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

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

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