72.8.22 problem 35

Internal problem ID [14715]
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. Review Exercises for chapter 1. page 136
Problem number : 35
Date solved : Monday, March 31, 2025 at 12:55:03 PM
CAS classification : [_linear]

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

With initial conditions

\begin{align*} y \left (0\right )&=1 \end{align*}

Maple. Time used: 0.030 (sec). Leaf size: 16
ode:=diff(y(t),t) = 2*t*y(t)+3*t*exp(t^2); 
ic:=y(0) = 1; 
dsolve([ode,ic],y(t), singsol=all);
 
\[ y = \left (\frac {3 t^{2}}{2}+1\right ) {\mathrm e}^{t^{2}} \]
Mathematica. Time used: 0.052 (sec). Leaf size: 21
ode=D[y[t],t]== 2*t*y[t]+3*t*Exp[t^2]; 
ic={y[0]==1}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to \frac {1}{2} e^{t^2} \left (3 t^2+2\right ) \]
Sympy. Time used: 0.260 (sec). Leaf size: 15
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-2*t*y(t) - 3*t*exp(t**2) + Derivative(y(t), t),0) 
ics = {y(0): 1} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = \left (\frac {3 t^{2}}{2} + 1\right ) e^{t^{2}} \]