Internal problem ID [6861]
Book: Elementary differential equations. Rainville, Bedient, Bedient. Prentice Hall. NJ. 8th
edition. 1997.
Section: CHAPTER 8. Nonhomogeneous Equations: Undetermined Coefficients. Exercises Page
142
Problem number: 1.
ODE order: 2.
ODE degree: 1.
CAS Maple gives this as type [[_2nd_order, _linear, _nonhomogeneous]]
\[ \boxed {y^{\prime \prime }+y=-\cos \left (x \right )} \]
✓ Solution by Maple
Time used: 0.015 (sec). Leaf size: 18
dsolve(diff(y(x),x$2)+y(x)=-cos(x),y(x), singsol=all)
\[ y \left (x \right ) = \sin \left (x \right ) c_{2} +\cos \left (x \right ) c_{1} -\frac {\sin \left (x \right ) x}{2} \]
✓ Solution by Mathematica
Time used: 0.026 (sec). Leaf size: 27
DSolve[y''[x]+y[x]==-Cos[x],y[x],x,IncludeSingularSolutions -> True]
\[ y(x)\to \left (-\frac {1}{2}+c_1\right ) \cos (x)-\frac {1}{2} (x-2 c_2) \sin (x) \]