17.22 problem 572

Internal problem ID [15341]

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: 572.
ODE order: 2.
ODE degree: 1.

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

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

Solution by Maple

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

dsolve(diff(y(x),x$2)+4*y(x)=exp(x)+4*sin(2*x)+2*cos(x)^2-1,y(x), singsol=all)
 

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

Solution by Mathematica

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

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

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