3.250 problem 1255

3.250.1 Solving as second order integrable as is ode
3.250.2 Solving as type second_order_integrable_as_is (not using ABC version)
3.250.3 Solving as exact linear second order ode ode
3.250.4 Maple step by step solution

Internal problem ID [9583]
Internal file name [OUTPUT/8524_Monday_June_06_2022_03_37_49_AM_25085979/index.tex]

Book: Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section: Chapter 2, linear second order
Problem number: 1255.
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"

Maple gives the following as the ode type

[[_2nd_order, _exact, _linear, _homogeneous]]

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

3.250.1 Solving as second order integrable as is ode

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

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

The integrating factor \(\mu \) is \begin{align*} \mu &= {\mathrm e}^{\int \frac {a -2 x +1}{x \left (x -1\right )}d x} \\ &= {\mathrm e}^{\left (-a -1\right ) \ln \left (x \right )+\left (a -1\right ) \ln \left (x -1\right )} \\ \end{align*} Which simplifies to \[ \mu = x^{-a -1} \left (x -1\right )^{a -1} \] 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 \left (x -1\right )}\right ) \\ \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}} \left (x^{-a -1} \left (x -1\right )^{a -1} y\right ) &= \left (x^{-a -1} \left (x -1\right )^{a -1}\right ) \left (\frac {c_{1}}{x \left (x -1\right )}\right )\\ \mathrm {d} \left (x^{-a -1} \left (x -1\right )^{a -1} y\right ) &= \left (c_{1} x^{-2-a} \left (x -1\right )^{-2+a}\right )\, \mathrm {d} x \end {align*}

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

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

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

Summary

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

Verification of solutions

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

3.250.2 Solving as type second_order_integrable_as_is (not using ABC version)

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

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

The integrating factor \(\mu \) is \begin{align*} \mu &= {\mathrm e}^{\int \frac {a -2 x +1}{x \left (x -1\right )}d x} \\ &= {\mathrm e}^{\left (-a -1\right ) \ln \left (x \right )+\left (a -1\right ) \ln \left (x -1\right )} \\ \end{align*} Which simplifies to \[ \mu = x^{-a -1} \left (x -1\right )^{a -1} \] 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 \left (x -1\right )}\right ) \\ \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}} \left (x^{-a -1} \left (x -1\right )^{a -1} y\right ) &= \left (x^{-a -1} \left (x -1\right )^{a -1}\right ) \left (\frac {c_{1}}{x \left (x -1\right )}\right )\\ \mathrm {d} \left (x^{-a -1} \left (x -1\right )^{a -1} y\right ) &= \left (c_{1} x^{-2-a} \left (x -1\right )^{-2+a}\right )\, \mathrm {d} x \end {align*}

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

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

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

Summary

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

Verification of solutions

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

3.250.3 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}-x\\ q(x) &= a\\ r(x) &= -2\\ s(x) &= 0 \end {align*}

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

Therefore (1) becomes \begin {align*} 2- \left (0\right ) + \left (-2\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 -2 x +1\right ) y+\left (x^{2}-x \right ) y^{\prime }&=c_{1} \end {align*}

We now have a first order ode to solve which is \begin {align*} \left (a -2 x +1\right ) y+\left (x^{2}-x \right ) 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 -2 x +1}{x \left (x -1\right )}\\ q(x) &=\frac {c_{1}}{x \left (x -1\right )} \end {align*}

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

The integrating factor \(\mu \) is \begin{align*} \mu &= {\mathrm e}^{\int \frac {a -2 x +1}{x \left (x -1\right )}d x} \\ &= {\mathrm e}^{\left (-a -1\right ) \ln \left (x \right )+\left (a -1\right ) \ln \left (x -1\right )} \\ \end{align*} Which simplifies to \[ \mu = x^{-a -1} \left (x -1\right )^{a -1} \] 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 \left (x -1\right )}\right ) \\ \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}} \left (x^{-a -1} \left (x -1\right )^{a -1} y\right ) &= \left (x^{-a -1} \left (x -1\right )^{a -1}\right ) \left (\frac {c_{1}}{x \left (x -1\right )}\right )\\ \mathrm {d} \left (x^{-a -1} \left (x -1\right )^{a -1} y\right ) &= \left (c_{1} x^{-2-a} \left (x -1\right )^{-2+a}\right )\, \mathrm {d} x \end {align*}

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

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

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

Summary

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

Verification of solutions

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

3.250.4 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left (x^{2}-x \right ) \left (\frac {d}{d x}y^{\prime }\right )+a y^{\prime }-2 y=0 \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 2 \\ {} & {} & \frac {d}{d x}y^{\prime } \\ \bullet & {} & \textrm {Isolate 2nd derivative}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y^{\prime }=\frac {2 y}{x \left (x -1\right )}-\frac {a y^{\prime }}{x \left (x -1\right )} \\ \bullet & {} & \textrm {Group terms with}\hspace {3pt} y\hspace {3pt}\textrm {on the lhs of the ODE and the rest on the rhs of the ODE; ODE is linear}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y^{\prime }+\frac {a y^{\prime }}{x \left (x -1\right )}-\frac {2 y}{x \left (x -1\right )}=0 \\ \square & {} & \textrm {Check to see if}\hspace {3pt} x_{0}\hspace {3pt}\textrm {is a regular singular point}\hspace {3pt} \\ {} & \circ & \textrm {Define functions}\hspace {3pt} \\ {} & {} & \left [P_{2}\left (x \right )=\frac {a}{x \left (x -1\right )}, P_{3}\left (x \right )=-\frac {2}{x \left (x -1\right )}\right ] \\ {} & \circ & x \cdot P_{2}\left (x \right )\textrm {is analytic at}\hspace {3pt} x =0 \\ {} & {} & \left (x \cdot P_{2}\left (x \right )\right )\bigg | {\mstack {}{_{x \hiderel {=}0}}}=-a \\ {} & \circ & x^{2}\cdot P_{3}\left (x \right )\textrm {is analytic at}\hspace {3pt} x =0 \\ {} & {} & \left (x^{2}\cdot P_{3}\left (x \right )\right )\bigg | {\mstack {}{_{x \hiderel {=}0}}}=0 \\ {} & \circ & x =0\textrm {is a regular singular point}\hspace {3pt} \\ & {} & \textrm {Check to see if}\hspace {3pt} x_{0}\hspace {3pt}\textrm {is a regular singular point}\hspace {3pt} \\ {} & {} & x_{0}=0 \\ \bullet & {} & \textrm {Multiply by denominators}\hspace {3pt} \\ {} & {} & x \left (x -1\right ) \left (\frac {d}{d x}y^{\prime }\right )+a y^{\prime }-2 y=0 \\ \bullet & {} & \textrm {Assume series solution for}\hspace {3pt} y \\ {} & {} & y=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k} x^{k +r} \\ \square & {} & \textrm {Rewrite ODE with series expansions}\hspace {3pt} \\ {} & \circ & \textrm {Convert}\hspace {3pt} y^{\prime }\hspace {3pt}\textrm {to series expansion}\hspace {3pt} \\ {} & {} & y^{\prime }=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k} \left (k +r \right ) x^{k +r -1} \\ {} & \circ & \textrm {Shift index using}\hspace {3pt} k \mathrm {->}k +1 \\ {} & {} & y^{\prime }=\moverset {\infty }{\munderset {k =-1}{\sum }}a_{k +1} \left (k +1+r \right ) x^{k +r} \\ {} & \circ & \textrm {Convert}\hspace {3pt} x^{m}\cdot \left (\frac {d}{d x}y^{\prime }\right )\hspace {3pt}\textrm {to series expansion for}\hspace {3pt} m =1..2 \\ {} & {} & x^{m}\cdot \left (\frac {d}{d x}y^{\prime }\right )=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k} \left (k +r \right ) \left (k +r -1\right ) x^{k +r -2+m} \\ {} & \circ & \textrm {Shift index using}\hspace {3pt} k \mathrm {->}k +2-m \\ {} & {} & x^{m}\cdot \left (\frac {d}{d x}y^{\prime }\right )=\moverset {\infty }{\munderset {k =-2+m}{\sum }}a_{k +2-m} \left (k +2-m +r \right ) \left (k +1-m +r \right ) x^{k +r} \\ & {} & \textrm {Rewrite ODE with series expansions}\hspace {3pt} \\ {} & {} & a_{0} r \left (1-r +a \right ) x^{-1+r}+\left (\moverset {\infty }{\munderset {k =0}{\sum }}\left (a_{k +1} \left (k +1+r \right ) \left (-k -r +a \right )+a_{k} \left (k +1+r \right ) \left (k +r -2\right )\right ) x^{k +r}\right )=0 \\ \bullet & {} & a_{0}\textrm {cannot be 0 by assumption, giving the indicial equation}\hspace {3pt} \\ {} & {} & r \left (1-r +a \right )=0 \\ \bullet & {} & \textrm {Values of r that satisfy the indicial equation}\hspace {3pt} \\ {} & {} & r \in \left \{0, a +1\right \} \\ \bullet & {} & \textrm {Each term in the series must be 0, giving the recursion relation}\hspace {3pt} \\ {} & {} & \left (k +1+r \right ) \left (a_{k +1} \left (-k -r +a \right )+a_{k} \left (k +r -2\right )\right )=0 \\ \bullet & {} & \textrm {Recursion relation that defines series solution to ODE}\hspace {3pt} \\ {} & {} & a_{k +1}=-\frac {a_{k} \left (k +r -2\right )}{-k -r +a} \\ \bullet & {} & \textrm {Recursion relation for}\hspace {3pt} r =0\hspace {3pt}\textrm {; series terminates at}\hspace {3pt} k =2 \\ {} & {} & a_{k +1}=-\frac {a_{k} \left (k -2\right )}{-k +a} \\ \bullet & {} & \textrm {Apply recursion relation for}\hspace {3pt} k =0 \\ {} & {} & a_{1}=\frac {2 a_{0}}{a} \\ \bullet & {} & \textrm {Apply recursion relation for}\hspace {3pt} k =1 \\ {} & {} & a_{2}=\frac {a_{1}}{a -1} \\ \bullet & {} & \textrm {Express in terms of}\hspace {3pt} a_{0} \\ {} & {} & a_{2}=\frac {2 a_{0}}{a \left (a -1\right )} \\ \bullet & {} & \textrm {Terminating series solution of the ODE for}\hspace {3pt} r =0\hspace {3pt}\textrm {. Use reduction of order to find the second linearly independent solution}\hspace {3pt} \\ {} & {} & y=a_{0}\cdot \left (1+\frac {2 x}{a}+\frac {2 x^{2}}{a \left (a -1\right )}\right ) \\ \bullet & {} & \textrm {Recursion relation for}\hspace {3pt} r =a +1 \\ {} & {} & a_{k +1}=-\frac {a_{k} \left (k +a -1\right )}{-k -1} \\ \bullet & {} & \textrm {Solution for}\hspace {3pt} r =a +1 \\ {} & {} & \left [y=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k} x^{k +a +1}, a_{k +1}=-\frac {a_{k} \left (k +a -1\right )}{-k -1}\right ] \\ \bullet & {} & \textrm {Combine solutions and rename parameters}\hspace {3pt} \\ {} & {} & \left [y=b_{0}\cdot \left (1+\frac {2 x}{a}+\frac {2 x^{2}}{a \left (a -1\right )}\right )+\left (\moverset {\infty }{\munderset {k =0}{\sum }}c_{k} x^{k +a +1}\right ), c_{k +1}=-\frac {c_{k} \left (k +a -1\right )}{-k -1}\right ] \end {array} \]

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.0 (sec). Leaf size: 42

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

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

Solution by Mathematica

Time used: 0.592 (sec). Leaf size: 87

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

\[ y(x)\to \frac {\left (a^2+a (2 x-1)+2 (x-1) x\right ) \left (\frac {c_2 x^{a+1} (1-x)^{1-a}}{(a-1) a (a+1) \left (a^2+a (2 x-1)+2 (x-1) x\right )}+c_1\right )}{a^2+3 a+4} \]