73.16.6 problem 24.1 (f)

Internal problem ID [15447]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 24. Variation of parameters. Additional exercises page 444
Problem number : 24.1 (f)
Date solved : Monday, March 31, 2025 at 01:38:03 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

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