14.8.1 problem Problem 1

Internal problem ID [3734]
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 1
Date solved : Tuesday, September 30, 2025 at 06:56:30 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-16 y&=20 \cos \left (4 x \right ) \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 23
ode:=diff(diff(y(x),x),x)-16*y(x) = 20*cos(4*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-4 x} c_2 +{\mathrm e}^{4 x} c_1 -\frac {5 \cos \left (4 x \right )}{8} \]
Mathematica. Time used: 0.011 (sec). Leaf size: 30
ode=D[y[x],{x,2}]-16*y[x]==20*Cos[4*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {5}{8} \cos (4 x)+c_1 e^{4 x}+c_2 e^{-4 x} \end{align*}
Sympy. Time used: 0.061 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-16*y(x) - 20*cos(4*x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- 4 x} + C_{2} e^{4 x} - \frac {5 \cos {\left (4 x \right )}}{8} \]