72.13.2 problem 1 (b)

Internal problem ID [19610]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 3. Second order linear equations. Section 18. The Method of Undetermined Coefficients. Problems at page 132
Problem number : 1 (b)
Date solved : Thursday, October 02, 2025 at 04:40:37 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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