85.33.13 problem 13

Internal problem ID [22636]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter two. First order and simple higher order ordinary differential equations. A Exercises at page 65
Problem number : 13
Date solved : Thursday, October 02, 2025 at 08:57:09 PM
CAS classification : [_linear]

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