4.6.23 problem 23

Internal problem ID [1240]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Miscellaneous problems, end of chapter 2. Page 133
Problem number : 23
Date solved : Tuesday, September 30, 2025 at 04:31:16 AM
CAS classification : [_linear]

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