85.33.16 problem 16

Internal problem ID [22639]
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 : 16
Date solved : Thursday, October 02, 2025 at 08:57:14 PM
CAS classification : [[_linear, `class A`]]

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