10.1.10 problem 10

Internal problem ID [1107]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Section 2.1. Page 40
Problem number : 10
Date solved : Saturday, March 29, 2025 at 10:39:12 PM
CAS classification : [_linear]

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

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