70.17.14 problem 23

Internal problem ID [18986]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 4. Second order linear equations. Section 4.7 (Variation of parameters). Problems at page 280
Problem number : 23
Date solved : Thursday, October 02, 2025 at 03:36:40 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} t y^{\prime \prime }-\left (t +1\right ) y^{\prime }+y&={\mathrm e}^{2 t} t^{2} \end{align*}
Maple. Time used: 0.006 (sec). Leaf size: 23
ode:=t*diff(diff(y(t),t),t)-(t+1)*diff(y(t),t)+y(t) = t^2*exp(2*t); 
dsolve(ode,y(t), singsol=all);
 
\[ y = \left (t +1\right ) c_2 +{\mathrm e}^{t} c_1 +\frac {\left (t -1\right ) {\mathrm e}^{2 t}}{2} \]
Mathematica. Time used: 0.37 (sec). Leaf size: 204
ode=t*D[y[t],{t,2}]-(t+1)*D[y[t],t]+y[t]==t^2*Exp[2*t]; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\begin{align*} y(t)&\to \sqrt {t} \exp \left (\frac {1}{2} \left (2 \int _1^t\frac {K[1]-1}{2 K[1]}dK[1]+t+1\right )\right ) \left (\int _1^t-\exp \left (\frac {3 K[3]}{2}+\int _1^{K[3]}\frac {K[1]-1}{2 K[1]}dK[1]-\frac {1}{2}\right ) \sqrt {K[3]} \int _1^{K[3]}\exp \left (-2 \int _1^{K[2]}\frac {K[1]-1}{2 K[1]}dK[1]\right )dK[2]dK[3]+\int _1^t\exp \left (-2 \int _1^{K[2]}\frac {K[1]-1}{2 K[1]}dK[1]\right )dK[2] \left (\int _1^t\exp \left (\frac {3 K[4]}{2}+\int _1^{K[4]}\frac {K[1]-1}{2 K[1]}dK[1]-\frac {1}{2}\right ) \sqrt {K[4]}dK[4]+c_2\right )+c_1\right ) \end{align*}
Sympy
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-t**2*exp(2*t) + t*Derivative(y(t), (t, 2)) - (t + 1)*Derivative(y(t), t) + y(t),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(t), t) - (-t**2*exp(2*t) + t*Derivative(y(t), (t, 2)) + y(t))/(t + 1) cannot be solved by the factorable group method