16.15 problem 488

Internal problem ID [15258]

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. Trial and error method. Exercises page 132
Problem number: 488.
ODE order: 2.
ODE degree: 1.

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

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

Solution by Maple

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

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

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

Solution by Mathematica

Time used: 0.109 (sec). Leaf size: 44

DSolve[y''[x]+k^2*y[x]==k*Sin[k*x+\[Alpha]],y[x],x,IncludeSingularSolutions -> True]
 

\[ y(x)\to \frac {\sin (\alpha +k x)}{4 k}-\frac {1}{2} x \cos (\alpha +k x)+c_1 \cos (k x)+c_2 \sin (k x) \]