89.26.14 problem 16

Internal problem ID [24881]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 11. Variation of parameters and other methods. Miscellaneous Exercises at page 177
Problem number : 16
Date solved : Thursday, October 02, 2025 at 10:49:01 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+4 y^{\prime }+3 y&=\sin \left ({\mathrm e}^{x}\right ) \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 30
ode:=diff(diff(y(x),x),x)+4*diff(y(x),x)+3*y(x) = sin(exp(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (c_2 \,{\mathrm e}^{2 x}-{\mathrm e}^{x} \sin \left ({\mathrm e}^{x}\right )-\cos \left ({\mathrm e}^{x}\right )+c_1 -1\right ) {\mathrm e}^{-3 x} \]
Mathematica. Time used: 0.047 (sec). Leaf size: 37
ode=D[y[x],{x,2}]+4*D[y[x],x]+3*y[x]== Sin[Exp[x]]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{-3 x} \left (-e^x \sin \left (e^x\right )-\cos \left (e^x\right )+c_2 e^{2 x}+c_1\right ) \end{align*}
Sympy. Time used: 0.599 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(3*y(x) - sin(exp(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} + \left (C_{2} - \cos {\left (e^{x} \right )}\right ) e^{- 2 x} - e^{- x} \sin {\left (e^{x} \right )}\right ) e^{- x} \]