49.1.10 problem HW 5 problem 1(b)

Internal problem ID [9992]
Book : Selected problems from homeworks from different courses
Section : Math 2520, summer 2021. Differential Equations and Linear Algebra. Normandale college, Bloomington, Minnesota
Problem number : HW 5 problem 1(b)
Date solved : Tuesday, September 30, 2025 at 06:45:50 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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