62.25.4 problem Ex 4

Internal problem ID [12857]
Book : An elementary treatise on differential equations by Abraham Cohen. DC heath publishers. 1906
Section : Chapter VII, Linear differential equations with constant coefficients. Article 48. Page 103
Problem number : Ex 4
Date solved : Wednesday, March 05, 2025 at 08:48:31 PM
CAS classification : [[_3rd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime \prime }-4 y^{\prime \prime }+5 y^{\prime }-2 y&=x \end{align*}

Maple. Time used: 0.007 (sec). Leaf size: 23
ode:=diff(diff(diff(y(x),x),x),x)-4*diff(diff(y(x),x),x)+5*diff(y(x),x)-2*y(x) = x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {5}{4}+{\mathrm e}^{2 x} c_{2} +\left (x c_3 +c_{1} \right ) {\mathrm e}^{x}-\frac {x}{2} \]
Mathematica. Time used: 0.005 (sec). Leaf size: 35
ode=D[y[x],{x,3}]-4*D[y[x],{x,2}]+5*D[y[x],x]-2*y[x]==x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to c_1 e^x+x \left (-\frac {1}{2}+c_2 e^x\right )+c_3 e^{2 x}-\frac {5}{4} \]
Sympy. Time used: 0.190 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x - 2*y(x) + 5*Derivative(y(x), x) - 4*Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 3)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{3} e^{2 x} - \frac {x}{2} + \left (C_{1} + C_{2} x\right ) e^{x} - \frac {5}{4} \]