10.1.14 problem 14

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

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

With initial conditions

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

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