10.1.7 problem 7

Internal problem ID [1104]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Section 2.1. Page 40
Problem number : 7
Date solved : Tuesday, March 04, 2025 at 12:09:05 PM
CAS classification : [_linear]

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

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