76.17.10 problem 19

Internal problem ID [17625]
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 : 19
Date solved : Monday, March 31, 2025 at 04:22:56 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-2 y^{\prime }+y&=\frac {{\mathrm e}^{t}}{t^{2}+1} \end{align*}

Maple. Time used: 0.006 (sec). Leaf size: 24
ode:=diff(diff(y(t),t),t)-2*diff(y(t),t)+y(t) = exp(t)/(t^2+1); 
dsolve(ode,y(t), singsol=all);
 
\[ y = {\mathrm e}^{t} \left (c_2 +t c_1 -\frac {\ln \left (t^{2}+1\right )}{2}+\arctan \left (t \right ) t \right ) \]
Mathematica. Time used: 0.035 (sec). Leaf size: 35
ode=D[y[t],{t,2}]-2*D[y[t],t]+y[t]==Exp[t]/(1+t^2); 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to \frac {1}{2} e^t \left (2 t \arctan (t)-\log \left (t^2+1\right )+2 (c_2 t+c_1)\right ) \]
Sympy
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(y(t) - 2*Derivative(y(t), t) + Derivative(y(t), (t, 2)) - exp(t)/(t**2 + 1),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(t), t) - (t**2*y(t) + t**2*Derivative(y(t), (t, 2)) + y(t) - exp(t) + Derivative(y(t), (t, 2)))/(2*(t**2 + 1)) cannot be solved by the factorable group method