Internal problem ID [12532]
Book: DIFFERENTIAL and INTEGRAL CALCULUS. VOL I. by N. PISKUNOV. MIR
PUBLISHERS, Moscow 1969.
Section: Chapter 8. Differential equations. Exercises page 595
Problem number: 163.
ODE order: 2.
ODE degree: 1.
CAS Maple gives this as type [[_2nd_order, _linear, _nonhomogeneous]]
\[ \boxed {y^{\prime \prime }+y n^{2}=h \sin \left (r x \right )} \] With initial conditions \begin {align*} [y \left (0\right ) = a, y^{\prime }\left (0\right ) = c] \end {align*}
✓ Solution by Maple
Time used: 0.047 (sec). Leaf size: 60
dsolve([diff(y(x),x$2)+n^2*y(x)=h*sin(r*x),y(0) = a, D(y)(0) = c],y(x), singsol=all)
\[ y \left (x \right ) = -\frac {\sin \left (x n \right ) \left (-n^{2} c +c \,r^{2}+h r \right )}{n^{3}-n \,r^{2}}+\cos \left (x n \right ) a +\frac {h \sin \left (r x \right )}{n^{2}-r^{2}} \]
✓ Solution by Mathematica
Time used: 0.066 (sec). Leaf size: 63
DSolve[{y''[x]+n^2*y[x]==h*Sin[r*x],{y[0]==a,y'[0]==c}},y[x],x,IncludeSingularSolutions -> True]
\[ y(x)\to \frac {a n \left (n^2-r^2\right ) \cos (n x)+\sin (n x) \left (c n^2-c r^2-h r\right )+h n \sin (r x)}{n^3-n r^2} \]