63.1.109 problem 156

Internal problem ID [15549]
Book : DIFFERENTIAL and INTEGRAL CALCULUS. VOL I. by N. PISKUNOV. MIR PUBLISHERS, Moscow 1969.
Section : Chapter 8. Differential equations. Exercises page 595
Problem number : 156
Date solved : Thursday, October 02, 2025 at 10:19:47 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-2 y^{\prime }+3 y&=\cos \left (x \right ) {\mathrm e}^{-x} \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 42
ode:=diff(diff(y(x),x),x)-2*diff(y(x),x)+3*y(x) = exp(-x)*cos(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {{\mathrm e}^{-x} \left (41 \left (\sin \left (\sqrt {2}\, x \right ) c_2 +\cos \left (\sqrt {2}\, x \right ) c_1 \right ) {\mathrm e}^{2 x}+5 \cos \left (x \right )-4 \sin \left (x \right )\right )}{41} \]
Mathematica. Time used: 0.49 (sec). Leaf size: 113
ode=D[y[x],{x,2}]-2*D[y[x],x]+3*y[x]==Exp[-x]*Cos[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^x \left (\cos \left (\sqrt {2} x\right ) \int _1^x-\frac {e^{-2 K[2]} \cos (K[2]) \sin \left (\sqrt {2} K[2]\right )}{\sqrt {2}}dK[2]+\sin \left (\sqrt {2} x\right ) \int _1^x\frac {e^{-2 K[1]} \cos (K[1]) \cos \left (\sqrt {2} K[1]\right )}{\sqrt {2}}dK[1]+c_2 \cos \left (\sqrt {2} x\right )+c_1 \sin \left (\sqrt {2} x\right )\right ) \end{align*}
Sympy. Time used: 0.205 (sec). Leaf size: 41
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(3*y(x) - 2*Derivative(y(x), x) + Derivative(y(x), (x, 2)) - exp(-x)*cos(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} \sin {\left (\sqrt {2} x \right )} + C_{2} \cos {\left (\sqrt {2} x \right )}\right ) e^{x} + \frac {\left (- 4 \sin {\left (x \right )} + 5 \cos {\left (x \right )}\right ) e^{- x}}{41} \]