8.11.3 problem 3

Internal problem ID [2596]
Book : Differential equations and their applications, 4th ed., M. Braun
Section : Chapter 2. Second order differential equations. Section 2.5. Method of judicious guessing. Excercises page 164
Problem number : 3
Date solved : Tuesday, September 30, 2025 at 05:47:36 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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