38.6.32 problem 32

Internal problem ID [8462]
Book : A First Course in Differential Equations with Modeling Applications by Dennis G. Zill. 12 ed. Metric version. 2024. Cengage learning.
Section : Chapter 2. First order differential equations. Section 2.3 Linear equations. Exercises 2.3 at page 63
Problem number : 32
Date solved : Tuesday, September 30, 2025 at 05:37:29 PM
CAS classification : [_linear]

\begin{align*} y^{\prime }+4 x y&=x^{3} {\mathrm e}^{x^{2}} \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=-1 \\ \end{align*}
Maple. Time used: 0.034 (sec). Leaf size: 26
ode:=diff(y(x),x)+4*x*y(x) = x^3*exp(x^2); 
ic:=[y(0) = -1]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = -\frac {17 \,{\mathrm e}^{-2 x^{2}}}{18}+\frac {{\mathrm e}^{x^{2}} \left (3 x^{2}-1\right )}{18} \]
Mathematica. Time used: 0.06 (sec). Leaf size: 33
ode=D[y[x],x]+4*x*y[x]==x^3*Exp[x^2]; 
ic={y[0]==-1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{18} e^{-2 x^2} \left (e^{3 x^2} \left (3 x^2-1\right )-17\right ) \end{align*}
Sympy. Time used: 0.219 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**3*exp(x**2) + 4*x*y(x) + Derivative(y(x), x),0) 
ics = {y(0): -1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {x^{2} e^{x^{2}}}{6} - \frac {e^{x^{2}}}{18} - \frac {17 e^{- 2 x^{2}}}{18} \]