77.2.8 problem 8

Internal problem ID [20339]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter II. Equations of first order and first degree. Exercise II (A) at page 8
Problem number : 8
Date solved : Thursday, October 02, 2025 at 05:44:11 PM
CAS classification : [_linear]

\begin{align*} \left (-x^{2}+1\right ) y^{\prime }-2 y x&=-x^{3}+x \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 27
ode:=(-x^2+1)*diff(y(x),x)-2*x*y(x) = -x^3+x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {x^{4}-2 x^{2}+4 c_1 +1}{4 x^{2}-4} \]
Mathematica. Time used: 0.02 (sec). Leaf size: 29
ode=(1-x^2)*D[y[x],x]-2*x*y[x]==x-x^3; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {x^4-2 x^2+4 c_1}{4 \left (x^2-1\right )} \end{align*}
Sympy. Time used: 0.178 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**3 - 2*x*y(x) - x + (1 - x**2)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} + \frac {x^{4}}{4} - \frac {x^{2}}{2}}{x^{2} - 1} \]