24.1.8 problem 2(b)

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

\begin{align*} x y^{\prime }-y&=x^{3} \end{align*}

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