20.9.19 problem Problem 19

Internal problem ID [3763]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 8, Linear differential equations of order n. Section 8.7, The Variation of Parameters Method. page 556
Problem number : Problem 19
Date solved : Sunday, March 30, 2025 at 02:07:40 AM
CAS classification : [[_3rd_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.006 (sec). Leaf size: 22
ode:=diff(diff(diff(y(x),x),x),x)-3*diff(diff(y(x),x),x)+3*diff(y(x),x)-y(x) = 2/x^2*exp(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{x} \left (c_3 \,x^{2}-2 \ln \left (x \right ) x +c_2 x +c_1 \right ) \]
Mathematica. Time used: 0.373 (sec). Leaf size: 627
ode=D[y[x],{x,3}]-6*D[y[x],{x,2}]+3*D[y[x],x]-y[x]==2*x^(-2)*Exp[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} \text {Solution too large to show}\end{align*}

Sympy. Time used: 0.269 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-y(x) + 3*Derivative(y(x), x) - 3*Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 3)) - 2*exp(x)/x**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} + x \left (C_{2} + C_{3} x - 2 \log {\left (x \right )}\right )\right ) e^{x} \]