3.161 problem 1165

3.161.1 Solving as second order integrable as is ode
3.161.2 Solving as second order ode non constant coeff transformation on B ode
3.161.3 Solving as type second_order_integrable_as_is (not using ABC version)
3.161.4 Solving as exact linear second order ode ode

Internal problem ID [9494]
Internal file name [OUTPUT/8434_Monday_June_06_2022_03_03_57_AM_40734079/index.tex]

Book: Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section: Chapter 2, linear second order
Problem number: 1165.
ODE order: 2.
ODE degree: 1.

The type(s) of ODE detected by this program : "exact linear second order ode", "second_order_integrable_as_is", "second_order_ode_non_constant_coeff_transformation_on_B"

Maple gives the following as the ode type

[[_2nd_order, _exact, _linear, _homogeneous]]

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

3.161.1 Solving as second order integrable as is ode

Integrating both sides of the ODE w.r.t \(x\) gives \begin {align*} \int \left (x^{2} y^{\prime \prime }+\left (x +a \right ) y^{\prime }-y\right )d x &= 0 \\ \left (a -x \right ) y+x^{2} y^{\prime } = c_{1} \end {align*}

Which is now solved for \(y\).

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

Where here \begin {align*} p(x) &=\frac {a -x}{x^{2}}\\ q(x) &=\frac {c_{1}}{x^{2}} \end {align*}

Hence the ode is \begin {align*} y^{\prime }+\frac {\left (a -x \right ) y}{x^{2}} = \frac {c_{1}}{x^{2}} \end {align*}

The integrating factor \(\mu \) is \begin{align*} \mu &= {\mathrm e}^{\int \frac {a -x}{x^{2}}d x} \\ &= {\mathrm e}^{-\ln \left (x \right )-\frac {a}{x}} \\ \end{align*} Which simplifies to \[ \mu = \frac {{\mathrm e}^{-\frac {a}{x}}}{x} \] The ode becomes \begin {align*} \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}}\left ( \mu y\right ) &= \left (\mu \right ) \left (\frac {c_{1}}{x^{2}}\right ) \\ \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}} \left (\frac {{\mathrm e}^{-\frac {a}{x}} y}{x}\right ) &= \left (\frac {{\mathrm e}^{-\frac {a}{x}}}{x}\right ) \left (\frac {c_{1}}{x^{2}}\right )\\ \mathrm {d} \left (\frac {{\mathrm e}^{-\frac {a}{x}} y}{x}\right ) &= \left (\frac {c_{1} {\mathrm e}^{-\frac {a}{x}}}{x^{3}}\right )\, \mathrm {d} x \end {align*}

Integrating gives \begin {align*} \frac {{\mathrm e}^{-\frac {a}{x}} y}{x} &= \int {\frac {c_{1} {\mathrm e}^{-\frac {a}{x}}}{x^{3}}\,\mathrm {d} x}\\ \frac {{\mathrm e}^{-\frac {a}{x}} y}{x} &= \frac {\left (x +a \right ) c_{1} {\mathrm e}^{-\frac {a}{x}}}{x \,a^{2}} + c_{2} \end {align*}

Dividing both sides by the integrating factor \(\mu =\frac {{\mathrm e}^{-\frac {a}{x}}}{x}\) results in \begin {align*} y &= \frac {{\mathrm e}^{\frac {a}{x}} \left (x +a \right ) c_{1} {\mathrm e}^{-\frac {a}{x}}}{a^{2}}+c_{2} x \,{\mathrm e}^{\frac {a}{x}} \end {align*}

which simplifies to \begin {align*} y &= \frac {c_{2} x \,{\mathrm e}^{\frac {a}{x}} a^{2}+c_{1} \left (x +a \right )}{a^{2}} \end {align*}

Summary

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

Verification of solutions

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

3.161.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}\\ B &= x +a\\ C &= -1\\ F &= 0 \end {align*}

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

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

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

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

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

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

Therefore the solution is \begin {align*} y(x) &= B v\\ &= \left (x +a\right ) \left (-\frac {x c_{1} {\mathrm e}^{\frac {a}{x}}}{\left (x +a \right ) a^{2}}+c_{2}\right ) \\ &= \frac {-x c_{1} {\mathrm e}^{\frac {a}{x}}+c_{2} \left (x +a \right ) a^{2}}{a^{2}} \end {align*}

Summary

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

Verification of solutions

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

3.161.3 Solving as type second_order_integrable_as_is (not using ABC version)

Writing the ode as \[ x^{2} y^{\prime \prime }+\left (x +a \right ) y^{\prime }-y = 0 \] Integrating both sides of the ODE w.r.t \(x\) gives \begin {align*} \int \left (x^{2} y^{\prime \prime }+\left (x +a \right ) y^{\prime }-y\right )d x &= 0 \\ x^{2} y^{\prime }-y x +y a = c_{1} \end {align*}

Which is now solved for \(y\).

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

Where here \begin {align*} p(x) &=\frac {a -x}{x^{2}}\\ q(x) &=\frac {c_{1}}{x^{2}} \end {align*}

Hence the ode is \begin {align*} y^{\prime }+\frac {\left (a -x \right ) y}{x^{2}} = \frac {c_{1}}{x^{2}} \end {align*}

The integrating factor \(\mu \) is \begin{align*} \mu &= {\mathrm e}^{\int \frac {a -x}{x^{2}}d x} \\ &= {\mathrm e}^{-\ln \left (x \right )-\frac {a}{x}} \\ \end{align*} Which simplifies to \[ \mu = \frac {{\mathrm e}^{-\frac {a}{x}}}{x} \] The ode becomes \begin {align*} \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}}\left ( \mu y\right ) &= \left (\mu \right ) \left (\frac {c_{1}}{x^{2}}\right ) \\ \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}} \left (\frac {{\mathrm e}^{-\frac {a}{x}} y}{x}\right ) &= \left (\frac {{\mathrm e}^{-\frac {a}{x}}}{x}\right ) \left (\frac {c_{1}}{x^{2}}\right )\\ \mathrm {d} \left (\frac {{\mathrm e}^{-\frac {a}{x}} y}{x}\right ) &= \left (\frac {c_{1} {\mathrm e}^{-\frac {a}{x}}}{x^{3}}\right )\, \mathrm {d} x \end {align*}

Integrating gives \begin {align*} \frac {{\mathrm e}^{-\frac {a}{x}} y}{x} &= \int {\frac {c_{1} {\mathrm e}^{-\frac {a}{x}}}{x^{3}}\,\mathrm {d} x}\\ \frac {{\mathrm e}^{-\frac {a}{x}} y}{x} &= \frac {\left (x +a \right ) c_{1} {\mathrm e}^{-\frac {a}{x}}}{x \,a^{2}} + c_{2} \end {align*}

Dividing both sides by the integrating factor \(\mu =\frac {{\mathrm e}^{-\frac {a}{x}}}{x}\) results in \begin {align*} y &= \frac {{\mathrm e}^{\frac {a}{x}} \left (x +a \right ) c_{1} {\mathrm e}^{-\frac {a}{x}}}{a^{2}}+c_{2} x \,{\mathrm e}^{\frac {a}{x}} \end {align*}

which simplifies to \begin {align*} y &= \frac {c_{2} x \,{\mathrm e}^{\frac {a}{x}} a^{2}+c_{1} \left (x +a \right )}{a^{2}} \end {align*}

Summary

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

Verification of solutions

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

3.161.4 Solving as exact linear second order ode ode

An ode of the form \begin {align*} p \left (x \right ) y^{\prime \prime }+q \left (x \right ) y^{\prime }+r \left (x \right ) y&=s \left (x \right ) \end {align*}

is exact if \begin {align*} p''(x) - q'(x) + r(x) &= 0 \tag {1} \end {align*}

For the given ode we have \begin {align*} p(x) &= x^{2}\\ q(x) &= x +a\\ r(x) &= -1\\ s(x) &= 0 \end {align*}

Hence \begin {align*} p''(x) &= 2\\ q'(x) &= 1 \end {align*}

Therefore (1) becomes \begin {align*} 2- \left (1\right ) + \left (-1\right )&=0 \end {align*}

Hence the ode is exact. Since we now know the ode is exact, it can be written as \begin {align*} \left (p \left (x \right ) y^{\prime }+\left (q \left (x \right )-p^{\prime }\left (x \right )\right ) y\right )' &= s(x) \end {align*}

Integrating gives \begin {align*} p \left (x \right ) y^{\prime }+\left (q \left (x \right )-p^{\prime }\left (x \right )\right ) y&=\int {s \left (x \right )\, dx} \end {align*}

Substituting the above values for \(p,q,r,s\) gives \begin {align*} \left (a -x \right ) y+x^{2} y^{\prime }&=c_{1} \end {align*}

We now have a first order ode to solve which is \begin {align*} \left (a -x \right ) y+x^{2} y^{\prime } = c_{1} \end {align*}

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

Where here \begin {align*} p(x) &=\frac {a -x}{x^{2}}\\ q(x) &=\frac {c_{1}}{x^{2}} \end {align*}

Hence the ode is \begin {align*} y^{\prime }+\frac {\left (a -x \right ) y}{x^{2}} = \frac {c_{1}}{x^{2}} \end {align*}

The integrating factor \(\mu \) is \begin{align*} \mu &= {\mathrm e}^{\int \frac {a -x}{x^{2}}d x} \\ &= {\mathrm e}^{-\ln \left (x \right )-\frac {a}{x}} \\ \end{align*} Which simplifies to \[ \mu = \frac {{\mathrm e}^{-\frac {a}{x}}}{x} \] The ode becomes \begin {align*} \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}}\left ( \mu y\right ) &= \left (\mu \right ) \left (\frac {c_{1}}{x^{2}}\right ) \\ \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}} \left (\frac {{\mathrm e}^{-\frac {a}{x}} y}{x}\right ) &= \left (\frac {{\mathrm e}^{-\frac {a}{x}}}{x}\right ) \left (\frac {c_{1}}{x^{2}}\right )\\ \mathrm {d} \left (\frac {{\mathrm e}^{-\frac {a}{x}} y}{x}\right ) &= \left (\frac {c_{1} {\mathrm e}^{-\frac {a}{x}}}{x^{3}}\right )\, \mathrm {d} x \end {align*}

Integrating gives \begin {align*} \frac {{\mathrm e}^{-\frac {a}{x}} y}{x} &= \int {\frac {c_{1} {\mathrm e}^{-\frac {a}{x}}}{x^{3}}\,\mathrm {d} x}\\ \frac {{\mathrm e}^{-\frac {a}{x}} y}{x} &= \frac {\left (x +a \right ) c_{1} {\mathrm e}^{-\frac {a}{x}}}{x \,a^{2}} + c_{2} \end {align*}

Dividing both sides by the integrating factor \(\mu =\frac {{\mathrm e}^{-\frac {a}{x}}}{x}\) results in \begin {align*} y &= \frac {{\mathrm e}^{\frac {a}{x}} \left (x +a \right ) c_{1} {\mathrm e}^{-\frac {a}{x}}}{a^{2}}+c_{2} x \,{\mathrm e}^{\frac {a}{x}} \end {align*}

which simplifies to \begin {align*} y &= \frac {c_{2} x \,{\mathrm e}^{\frac {a}{x}} a^{2}+c_{1} \left (x +a \right )}{a^{2}} \end {align*}

Summary

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

Verification of solutions

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

Maple trace

`Methods for second order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
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)] 
<- linear_1 successful`
 

Solution by Maple

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

dsolve(x^2*diff(diff(y(x),x),x)+(x+a)*diff(y(x),x)-y(x)=0,y(x), singsol=all)
 

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

Solution by Mathematica

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

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

\[ y(x)\to \frac {c_2 (a+x)}{a^2}+c_1 x e^{a/x} \]