23.3.75 problem 77

Internal problem ID [5789]
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 : 77
Date solved : Tuesday, September 30, 2025 at 02:03:23 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} 2 y+3 y^{\prime }+y^{\prime \prime }&={\mathrm e}^{x}+\sin \left (x \right ) \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 30
ode:=2*y(x)+3*diff(y(x),x)+diff(diff(y(x),x),x) = exp(x)+sin(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -{\mathrm e}^{-2 x} c_1 +\frac {{\mathrm e}^{x}}{6}-\frac {3 \cos \left (x \right )}{10}+\frac {\sin \left (x \right )}{10}+{\mathrm e}^{-x} c_2 \]
Mathematica. Time used: 0.066 (sec). Leaf size: 40
ode=2*y[x] + 3*D[y[x],x] + D[y[x],{x,2}] == E^x + Sin[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to c_1 e^{-2 x}+c_2 e^{-x}+\frac {1}{30} \left (5 e^x+3 \sin (x)-9 \cos (x)\right ) \end{align*}
Sympy. Time used: 0.147 (sec). Leaf size: 31
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*y(x) - exp(x) - sin(x) + 3*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- 2 x} + C_{2} e^{- x} + \frac {e^{x}}{6} + \frac {\sin {\left (x \right )}}{10} - \frac {3 \cos {\left (x \right )}}{10} \]