15.11.19 problem 19

Internal problem ID [3129]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 19, page 86
Problem number : 19
Date solved : Tuesday, March 04, 2025 at 04:02:03 PM
CAS classification : [[_3rd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime \prime }-2 y^{\prime \prime }+y^{\prime }-2 y&=x \,{\mathrm e}^{2 x} \end{align*}

Maple. Time used: 0.008 (sec). Leaf size: 31
ode:=diff(diff(diff(y(x),x),x),x)-2*diff(diff(y(x),x),x)+diff(y(x),x)-2*y(x) = x*exp(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (5 x^{2}+50 c_3 -8 x \right ) {\mathrm e}^{2 x}}{50}+\cos \left (x \right ) c_{1} +c_2 \sin \left (x \right ) \]
Mathematica. Time used: 0.09 (sec). Leaf size: 39
ode=D[y[x],{x,3}]-2*D[y[x],{x,2}]+D[y[x],x]-2*y[x]==x*Exp[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{250} e^{2 x} \left (25 x^2-40 x+22+250 c_3\right )+c_1 \cos (x)+c_2 \sin (x) \]
Sympy. Time used: 0.226 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*exp(2*x) - 2*y(x) + Derivative(y(x), x) - 2*Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 3)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{2} \sin {\left (x \right )} + C_{3} \cos {\left (x \right )} + \left (C_{1} + \frac {x^{2}}{10} - \frac {4 x}{25}\right ) e^{2 x} \]