78.2.21 problem 6.d

Internal problem ID [20973]
Book : A FIRST COURSE IN DIFFERENTIAL EQUATIONS FOR SCIENTISTS AND ENGINEERS. By Russell Herman. University of North Carolina Wilmington. LibreText. compiled on 06/09/2025
Section : Chapter 2, Second order ODEs. Problems section 2.6
Problem number : 6.d
Date solved : Thursday, October 02, 2025 at 07:00:51 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} 2 y-3 y^{\prime }+y^{\prime \prime }&=\cos \left ({\mathrm e}^{x}\right ) \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 35
ode:=diff(diff(y(x),x),x)-3*diff(y(x),x)+2*y(x) = cos(exp(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{2 x} \left (c_1 -\frac {\operatorname {Ci}\left ({\mathrm e}^{x}\right )}{2}\right )+{\mathrm e}^{x} \left (\operatorname {Si}\left ({\mathrm e}^{x}\right )+\frac {\sin \left ({\mathrm e}^{x}\right )}{2}+c_2 \right )+\frac {\cos \left ({\mathrm e}^{x}\right )}{2} \]
Mathematica. Time used: 0.084 (sec). Leaf size: 57
ode=D[y[x],{x,2}]-3*D[y[x],x]+2*y[x]==Cos[Exp[x]]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{2} \left (-e^{2 x} \operatorname {CosIntegral}\left (e^x\right )+2 e^x \text {Si}\left (e^x\right )+e^x \sin \left (e^x\right )+\cos \left (e^x\right )\right )+c_1 e^x+c_2 e^{2 x} \end{align*}
Sympy. Time used: 4.559 (sec). Leaf size: 39
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*y(x) - cos(exp(x)) - 3*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} - \frac {\operatorname {Ci}{\left (e^{x} \right )}}{2}\right ) e^{2 x} + \left (C_{2} + \frac {\sin {\left (e^{x} \right )}}{2} + \operatorname {Si}{\left (e^{x} \right )}\right ) e^{x} + \frac {\cos {\left (e^{x} \right )}}{2} \]