20.12.15 problem Problem 34

Internal problem ID [3809]
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.10, Chapter review. page 575
Problem number : Problem 34
Date solved : Monday, January 27, 2025 at 08:02:48 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

Time used: 0.004 (sec). Leaf size: 23

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

Solution by Mathematica

Time used: 0.020 (sec). Leaf size: 30

DSolve[D[y[x],{x,2}]+y[x]==4*Cos[x]*3*Exp[x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \frac {12}{5} e^x (2 \sin (x)+\cos (x))+c_1 \cos (x)+c_2 \sin (x) \]