14.8.11 problem Problem 11

Internal problem ID [3744]
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.4, Complex-Valued Trial Solutions. page 529
Problem number : Problem 11
Date solved : Tuesday, September 30, 2025 at 06:56:38 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+16 y&=34 \,{\mathrm e}^{x}+16 \cos \left (4 x \right )-8 \sin \left (4 x \right ) \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 31
ode:=diff(diff(y(x),x),x)+16*y(x) = 34*exp(x)+16*cos(4*x)-8*sin(4*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (8 x +4 c_2 -1\right ) \sin \left (4 x \right )}{4}+\left (x +c_1 \right ) \cos \left (4 x \right )+2 \,{\mathrm e}^{x} \]
Mathematica. Time used: 0.385 (sec). Leaf size: 37
ode=D[y[x],{x,2}]+16*y[x]==34*Exp[x]+16*Cos[4*x]-8*Sin[4*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to 2 e^x+\left (x+\frac {1}{4}+c_1\right ) \cos (4 x)+\left (2 x-\frac {1}{8}+c_2\right ) \sin (4 x) \end{align*}
Sympy. Time used: 0.064 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(16*y(x) - 34*exp(x) + 8*sin(4*x) - 16*cos(4*x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} + x\right ) \cos {\left (4 x \right )} + \left (C_{2} + 2 x\right ) \sin {\left (4 x \right )} + 2 e^{x} \]