72.7.11 problem 11

Internal problem ID [14681]
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 : 11
Date solved : Monday, March 31, 2025 at 12:52:44 PM
CAS classification : [_linear]

\begin{align*} y^{\prime }-\frac {2 y}{t}&=2 t^{2} \end{align*}

With initial conditions

\begin{align*} y \left (-2\right )&=4 \end{align*}

Maple. Time used: 0.017 (sec). Leaf size: 15
ode:=diff(y(t),t)-2*y(t)/t = 2*t^2; 
ic:=y(-2) = 4; 
dsolve([ode,ic],y(t), singsol=all);
 
\[ y = 2 t^{3}+5 t^{2} \]
Mathematica. Time used: 0.029 (sec). Leaf size: 14
ode=D[y[t],t]-2*y[t]/t==2*t^2; 
ic={y[-2]==4}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to t^2 (2 t+5) \]
Sympy. Time used: 0.241 (sec). Leaf size: 10
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-2*t**2 + Derivative(y(t), t) - 2*y(t)/t,0) 
ics = {y(-2): 4} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = t^{2} \left (2 t + 5\right ) \]