28.2.38 problem 38

Internal problem ID [4481]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 4. Linear Differential Equations. Page 183
Problem number : 38
Date solved : Monday, January 27, 2025 at 09:20:52 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+4 y&=4 \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)=4*sin(2*x),y(x), singsol=all)
 
\[ y \left (x \right ) = \left (-x +c_{1} \right ) \cos \left (2 x \right )+\sin \left (2 x \right ) c_{2} \]

Solution by Mathematica

Time used: 0.030 (sec). Leaf size: 31

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