23.3.83 problem 85

Internal problem ID [5797]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 3. THE DIFFERENTIAL EQUATION IS LINEAR AND OF SECOND ORDER, page 311
Problem number : 85
Date solved : Tuesday, September 30, 2025 at 02:03:28 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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