89.21.12 problem 14

Internal problem ID [24784]
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 : 14
Date solved : Thursday, October 02, 2025 at 10:47:59 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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