20.7.3 problem Problem 27

Internal problem ID [3718]
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.3, The Method of Undetermined Coefficients. page 525
Problem number : Problem 27
Date solved : Monday, January 27, 2025 at 07:55:53 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+4 y&=8 \sin \left (2 x \right ) \end{align*}

Solution by Maple

Time used: 0.003 (sec). Leaf size: 21

dsolve(diff(y(x),x$2)+4*y(x)=8*sin(2*x),y(x), singsol=all)
 
\[ y \left (x \right ) = \left (c_{1} -2 x \right ) \cos \left (2 x \right )+\sin \left (2 x \right ) c_{2} \]

Solution by Mathematica

Time used: 0.031 (sec). Leaf size: 29

DSolve[D[y[x],{x,2}]+4*y[x]==8*Sin[2*x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \sin (x) \cos (x)+(-2 x+c_1) \cos (2 x)+c_2 \sin (2 x) \]