30.2.12 problem 12

Internal problem ID [7440]
Book : Fundamentals of Differential Equations. By Nagle, Saff and Snider. 9th edition. Boston. Pearson 2018.
Section : Chapter 2, First order differential equations. Section 2.3, Linear equations. Exercises. page 54
Problem number : 12
Date solved : Tuesday, September 30, 2025 at 04:35:24 PM
CAS classification : [[_linear, `class A`]]

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