17.24 problem 574

Internal problem ID [15343]

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

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

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

Solution by Maple

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

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

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

Solution by Mathematica

Time used: 0.103 (sec). Leaf size: 36

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

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