70.17.15 problem 24

Internal problem ID [18987]
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 : 24
Date solved : Thursday, October 02, 2025 at 03:36:41 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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