31.3.2 problem 10.4.8 (b)

Internal problem ID [7696]
Book : Basic Training in Mathematics. By R. Shankar. Plenum Press. NY. 1995
Section : Chapter 10, Differential equations. Section 10.4, ODEs with variable Coefficients. Second order and Homogeneous. page 318
Problem number : 10.4.8 (b)
Date solved : Tuesday, September 30, 2025 at 04:56:11 PM
CAS classification : [[_2nd_order, _exact, _linear, _homogeneous]]

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