44.6.32 problem 32

Internal problem ID [7176]
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 : Wednesday, March 05, 2025 at 04:20:02 AM
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.014 (sec). Leaf size: 33
ode:=diff(y(x),x)+4*x*y(x) = x^3*exp(x^2); 
ic:=y(0) = -1; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \frac {\left (3 \,{\mathrm e}^{3 x^{2}} x^{2}-{\mathrm e}^{3 x^{2}}-17\right ) {\mathrm e}^{-2 x^{2}}}{18} \]
Mathematica. Time used: 0.094 (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]
 
\[ y(x)\to \frac {1}{18} e^{-2 x^2} \left (e^{3 x^2} \left (3 x^2-1\right )-17\right ) \]
Sympy. Time used: 0.420 (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} \]