83.2.8 problem 8

Internal problem ID [18983]
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 : Monday, March 31, 2025 at 06:28:24 PM
CAS classification : [_linear]

\begin{align*} \left (-x^{2}+1\right ) y^{\prime }-2 x y&=-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.029 (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]
 
\[ y(x)\to \frac {x^4-2 x^2+4 c_1}{4 \left (x^2-1\right )} \]
Sympy. Time used: 0.288 (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} \]