10.10.10 problem 10

Internal problem ID [1342]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Chapter 3, Second order linear equations, section 3.6, Variation of Parameters. page 190
Problem number : 10
Date solved : Saturday, March 29, 2025 at 10:52:44 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.007 (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.026 (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