72.7.4 problem 4

Internal problem ID [14674]
Book : DIFFERENTIAL EQUATIONS by Paul Blanchard, Robert L. Devaney, Glen R. Hall. 4th edition. Brooks/Cole. Boston, USA. 2012
Section : Chapter 1. First-Order Differential Equations. Exercises section 1.9 page 133
Problem number : 4
Date solved : Monday, March 31, 2025 at 12:52:26 PM
CAS classification : [_linear]

\begin{align*} y^{\prime }&=-2 t y+4 \,{\mathrm e}^{-t^{2}} \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 16
ode:=diff(y(t),t) = -2*t*y(t)+4*exp(-t^2); 
dsolve(ode,y(t), singsol=all);
 
\[ y = \left (4 t +c_1 \right ) {\mathrm e}^{-t^{2}} \]
Mathematica. Time used: 0.056 (sec). Leaf size: 19
ode=D[y[t],t]==-2*t*y[t]+4*Exp[-t^2]; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to e^{-t^2} (4 t+c_1) \]
Sympy. Time used: 0.229 (sec). Leaf size: 12
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(2*t*y(t) + Derivative(y(t), t) - 4*exp(-t**2),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = \left (C_{1} + 4 t\right ) e^{- t^{2}} \]