75.16.75 problem 548

Internal problem ID [16977]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Chapter 2 (Higher order ODEs). Section 15.3 Nonhomogeneous linear equations with constant coefficients. Trial and error method. Exercises page 132
Problem number : 548
Date solved : Monday, March 31, 2025 at 03:36:57 PM
CAS classification : [[_3rd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime \prime }-3 y^{\prime \prime }+3 y^{\prime }-y&={\mathrm e}^{x} \cos \left (2 x \right ) \end{align*}

Maple. Time used: 0.005 (sec). Leaf size: 29
ode:=diff(diff(diff(y(x),x),x),x)-3*diff(diff(y(x),x),x)+3*diff(y(x),x)-y(x) = exp(x)*cos(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {{\mathrm e}^{x} \left (-8 c_3 \,x^{2}-8 c_2 x +\sin \left (2 x \right )-8 c_1 -2 x \right )}{8} \]
Mathematica. Time used: 0.05 (sec). Leaf size: 80
ode=D[y[x],{x,3}]-3*D[y[x],{x,2}]+3*D[y[x],x]-y[x]==Exp[x]*Cos[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^x \left (x^2 \int _1^x\frac {1}{2} \cos (2 K[3])dK[3]+x \int _1^x-\cos (2 K[2]) K[2]dK[2]+\int _1^x\frac {1}{2} \cos (2 K[1]) K[1]^2dK[1]+c_3 x^2+c_2 x+c_1\right ) \]
Sympy. Time used: 0.300 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-y(x) - exp(x)*cos(2*x) + 3*Derivative(y(x), x) - 3*Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 3)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} + x \left (C_{2} + C_{3} x\right ) - \frac {\sin {\left (2 x \right )}}{8}\right ) e^{x} \]