24.1.11 problem 2(e)

Internal problem ID [4200]
Book : Elementary Differential equations, Chaundy, 1969
Section : Exercises 3, page 60
Problem number : 2(e)
Date solved : Sunday, March 30, 2025 at 02:42:28 AM
CAS classification : [_linear]

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

Maple. Time used: 0.001 (sec). Leaf size: 19
ode:=(x^3+x)*diff(y(x),x)+y(x) = x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\sqrt {x^{2}+1}\, c_1 -1}{x} \]
Mathematica. Time used: 0.039 (sec). Leaf size: 23
ode=(x^3+x)*D[y[x],x]+y[x]==x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {-1+c_1 \sqrt {x^2+1}}{x} \]
Sympy. Time used: 3.737 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x + (x**3 + x)*Derivative(y(x), x) + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} \sqrt {x^{2} + 1} - 1}{x} \]