89.21.11 problem 13

Internal problem ID [24783]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 10. Nonhomogeneous Equations: Operational methods. Exercises at page 154
Problem number : 13
Date solved : Thursday, October 02, 2025 at 10:47:58 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+16 y&=24 \sin \left (4 x \right ) \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 21
ode:=diff(diff(y(x),x),x)+16*y(x) = 24*sin(4*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (c_1 -3 x \right ) \cos \left (4 x \right )+\sin \left (4 x \right ) c_2 \]
Mathematica. Time used: 0.064 (sec). Leaf size: 31
ode=D[y[x],{x,2}]+16*y[x]== 24*Sin[4*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to (-3 x+c_1) \cos (4 x)+\frac {1}{8} (3+8 c_2) \sin (4 x) \end{align*}
Sympy. Time used: 0.062 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(16*y(x) - 24*sin(4*x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{2} \sin {\left (4 x \right )} + \left (C_{1} - 3 x\right ) \cos {\left (4 x \right )} \]