85.1.5 problem 1 (f)

Internal problem ID [22410]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter 1. Differential equations in general. A Exercises at page 12
Problem number : 1 (f)
Date solved : Thursday, October 02, 2025 at 08:38:35 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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