85.49.7 problem 2 (a)

Internal problem ID [22808]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter 4. Linear differential equations. A Exercises at page 194
Problem number : 2 (a)
Date solved : Thursday, October 02, 2025 at 09:14:48 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+16 y&=5 \sin \left (x \right ) \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=0 \\ y^{\prime }\left (0\right )&=0 \\ \end{align*}
Maple. Time used: 0.015 (sec). Leaf size: 15
ode:=diff(diff(y(x),x),x)+16*y(x) = 5*sin(x); 
ic:=[y(0) = 0, D(y)(0) = 0]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = -\frac {\sin \left (4 x \right )}{12}+\frac {\sin \left (x \right )}{3} \]
Mathematica. Time used: 0.011 (sec). Leaf size: 20
ode=D[y[x],{x,2}]+16*y[x]==5*Sin[x]; 
ic={y[0]==0,Derivative[1][y][0] ==0}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{12} (4 \sin (x)-\sin (4 x)) \end{align*}
Sympy. Time used: 0.066 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(16*y(x) - 5*sin(x) + Derivative(y(x), (x, 2)),0) 
ics = {y(0): 0, Subs(Derivative(y(x), x), x, 0): 0} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {\sin {\left (x \right )}}{3} - \frac {\sin {\left (4 x \right )}}{12} \]