17.31 problem 581

Internal problem ID [15350]

Book: A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section: Chapter 2 (Higher order ODE’s). Section 15.3 Nonhomogeneous linear equations with constant coefficients. Superposition principle. Exercises page 137
Problem number: 581.
ODE order: 2.
ODE degree: 1.

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

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

Solution by Maple

Time used: 0.015 (sec). Leaf size: 42

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

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

Solution by Mathematica

Time used: 2.943 (sec). Leaf size: 59

DSolve[y''[x]+y'[x]+y[x]+1==Sin[x]+x+x^2,y[x],x,IncludeSingularSolutions -> True]
 

\[ y(x)\to x^2-x-\cos (x)+c_2 e^{-x/2} \cos \left (\frac {\sqrt {3} x}{2}\right )+c_1 e^{-x/2} \sin \left (\frac {\sqrt {3} x}{2}\right )-2 \]