35.7.20 problem 25

Internal problem ID [6202]
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 : Wednesday, March 05, 2025 at 12:24:34 AM
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.005 (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 (x -1\right )}{x} \]
Mathematica. Time used: 0.045 (sec). Leaf size: 24
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]
 
\[ y(x)\to \frac {c_1 (x-2)^2+c_2 (x-1)}{x} \]
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