20.9.16 problem Problem 16

Internal problem ID [3760]
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 16
Date solved : Sunday, March 30, 2025 at 02:07:35 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+2 y^{\prime }+17 y&=\frac {64 \,{\mathrm e}^{-x}}{3+\sin \left (4 x \right )^{2}} \end{align*}

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