20.9.21 problem Problem 21

Internal problem ID [3765]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 8, Linear differential equations of order n. Section 8.7, The Variation of Parameters Method. page 556
Problem number : Problem 21
Date solved : Tuesday, March 04, 2025 at 05:15:01 PM
CAS classification : [[_3rd_order, _linear, _nonhomogeneous]]

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

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