11.21 problem 21

Internal problem ID [11795]

Book: Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section: Chapter 4, Section 4.3. The method of undetermined coefficients. Exercises page 151
Problem number: 21.
ODE order: 2.
ODE degree: 1.

CAS Maple gives this as type [[_2nd_order, _linear, _nonhomogeneous]]

\[ \boxed {y^{\prime \prime }+y=x \sin \left (x \right )} \]

Solution by Maple

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

dsolve(diff(y(x),x$2)+y(x)=x*sin(x),y(x), singsol=all)
 

\[ y \left (x \right ) = \frac {\left (-x^{2}+4 c_{1} \right ) \cos \left (x \right )}{4}+\frac {\sin \left (x \right ) \left (4 c_{2} +x \right )}{4} \]

Solution by Mathematica

Time used: 0.046 (sec). Leaf size: 34

DSolve[y''[x]+y[x]==x*Sin[x],y[x],x,IncludeSingularSolutions -> True]
 

\[ y(x)\to \frac {1}{8} \left (\left (-2 x^2+1+8 c_1\right ) \cos (x)+2 (x+4 c_2) \sin (x)\right ) \]