78.6.8 problem 2 (h)

Internal problem ID [18097]
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, March 13, 2025 at 11:36:05 AM
CAS classification : [_linear]

\begin{align*} y^{\prime }-2 x y&=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.05 (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]
 
\[ y(x)\to e^{x^2} \left (3 x^2+c_1\right ) \]
Sympy. Time used: 0.248 (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}} \]