29.7.20 problem 25

Internal problem ID [7337]
Book : Mathematical Methods in the Physical Sciences. third edition. Mary L. Boas. John Wiley. 2006
Section : Chapter 8, Ordinary differential equations. Section 7. Other second-Order equations. page 435
Problem number : 25
Date solved : Tuesday, September 30, 2025 at 04:29:12 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using reduction of order method given that one solution is

\begin{align*} y&=x \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 19
ode:=x^2*(2-x)*diff(diff(y(x),x),x)+2*x*diff(y(x),x)-2*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {c_1 \,x^{2}+c_2 \left (-1+x \right )}{x} \]
Mathematica. Time used: 0.117 (sec). Leaf size: 94
ode=x^2*(2-x)*D[y[x],{x,2}]+2*x*D[y[x],x]-2*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \exp \left (\int _1^x\frac {K[1]+1}{(K[1]-2) K[1]}dK[1]-\frac {1}{2} \int _1^x-\frac {2}{(K[2]-2) K[2]}dK[2]\right ) \left (c_2 \int _1^x\exp \left (-2 \int _1^{K[3]}\frac {K[1]+1}{(K[1]-2) K[1]}dK[1]\right )dK[3]+c_1\right ) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*(2 - x)*Derivative(y(x), (x, 2)) + 2*x*Derivative(y(x), x) - 2*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
False