3.3 problem 1003

Internal problem ID [8581]

Book: Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section: Chapter 2, linear second order
Problem number: 1003.
ODE order: 2.
ODE degree: 1.

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

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

Solution by Maple

Time used: 0.016 (sec). Leaf size: 26

dsolve(diff(diff(y(x),x),x)+y(x)-sin(n*x)=0,y(x), singsol=all)
 

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

Solution by Mathematica

Time used: 0.088 (sec). Leaf size: 29

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

\begin{align*} y(x)\to -\frac {\sin (n x)}{n^2-1}+c_1 \cos (x)+c_2 \sin (x) \\ \end{align*}