76.17.24 problem 40

Internal problem ID [17631]
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 : 40
Date solved : Thursday, March 13, 2025 at 10:45:38 AM
CAS classification : [[_2nd_order, _exact, _linear, _nonhomogeneous]]

\begin{align*} t y^{\prime \prime }-\left (1+t \right ) y^{\prime }-y&=t^{2} {\mathrm e}^{2 t} \end{align*}

Using reduction of order method given that one solution is

\begin{align*} y&=1+t \end{align*}

Maple. Time used: 0.003 (sec). Leaf size: 51
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 = -\frac {{\mathrm e}^{t} t^{2} \operatorname {Ei}_{1}\left (-t \right )}{8}+\frac {\left (-1+3 t \right ) {\mathrm e}^{2 t}}{8}-{\mathrm e}^{t} t^{2} c_{1} \operatorname {Ei}_{1}\left (t \right )+{\mathrm e}^{t} c_{2} t^{2}+c_{1} \left (t -1\right ) \]
Mathematica. Time used: 0.031 (sec). Leaf size: 31
ode=t*D[y[t],{t,2}]-(1+t)*D[y[t],t]+y[t]==t^2*Exp[2*t]; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to \frac {1}{2} e^{2 t} (t-1)+c_1 e^t-c_2 (t+1) \]
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