72.6.8 problem 2 (h)

Internal problem ID [19462]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 2. First order equations. Section 10 (Linear equations). Problems at page 82
Problem number : 2 (h)
Date solved : Thursday, October 02, 2025 at 04:28:43 PM
CAS classification : [_linear]

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