7.11.61 problem 64

Internal problem ID [382]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 2. Linear Equations of Higher Order. Section 2.5 (Nonhomogeneous equations and undetermined coefficients). Problems at page 161
Problem number : 64
Date solved : Wednesday, February 05, 2025 at 03:26:35 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

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

dsolve(diff(y(x),x$2)+y(x)=2*sin(x),y(x), singsol=all)
 
\[ y = \left (-x +c_1 \right ) \cos \left (x \right )+\sin \left (x \right ) \left (1+c_2 \right ) \]

Solution by Mathematica

Time used: 0.028 (sec). Leaf size: 27

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