38.4.7 problem 7

Internal problem ID [6493]
Book : Engineering Mathematics. By K. A. Stroud. 5th edition. Industrial press Inc. NY. 2001
Section : Program 25. Second order differential equations. Further problems 25. page 1094
Problem number : 7
Date solved : Monday, January 27, 2025 at 02:08:18 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

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

dsolve(diff(y(x),x$2)+4*diff(y(x),x)+4*y(x)=2*cos(x)^2,y(x), singsol=all)
 
\[ y = \frac {1}{4}+\left (c_1 x +c_2 \right ) {\mathrm e}^{-2 x}+\frac {\sin \left (2 x \right )}{8} \]

Solution by Mathematica

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

DSolve[D[y[x],{x,2}]+4*D[y[x],x]+4*y[x]==2*Cos[x]^2,y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \frac {1}{8} \left (\sin (2 x)+8 e^{-2 x} (c_2 x+c_1)+2\right ) \]