69.1.103 problem 150

Internal problem ID [14177]
Book : DIFFERENTIAL and INTEGRAL CALCULUS. VOL I. by N. PISKUNOV. MIR PUBLISHERS, Moscow 1969.
Section : Chapter 8. Differential equations. Exercises page 595
Problem number : 150
Date solved : Wednesday, March 05, 2025 at 10:37:36 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+y^{\prime }-2 y&=8 \sin \left (2 x \right ) \end{align*}

Maple. Time used: 0.004 (sec). Leaf size: 36
ode:=diff(diff(y(x),x),x)+diff(y(x),x)-2*y(x) = 8*sin(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (\frac {2 \left (-\cos \left (2 x \right )-3 \sin \left (2 x \right )\right ) {\mathrm e}^{2 x}}{5}+{\mathrm e}^{3 x} c_{1} +c_{2} \right ) {\mathrm e}^{-2 x} \]
Mathematica. Time used: 0.019 (sec). Leaf size: 35
ode=D[y[x],{x,2}]+D[y[x],x]-2*y[x]==8*Sin[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to c_1 e^{-2 x}+c_2 e^x-\frac {2}{5} (3 \sin (2 x)+\cos (2 x)) \]
Sympy. Time used: 0.160 (sec). Leaf size: 31
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*y(x) - 8*sin(2*x) + 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 {6 \sin {\left (2 x \right )}}{5} - \frac {2 \cos {\left (2 x \right )}}{5} \]