##### 4.10.2 $$(-y(x)+2 x+4) y'(x)-2 y(x)+x+5=0$$

ODE
$(-y(x)+2 x+4) y'(x)-2 y(x)+x+5=0$ ODE Classiﬁcation

[[_homogeneous, class C], _rational, [_Abel, 2nd type, class A]]

Book solution method
Equation linear in the variables, $$y'(x)=f\left ( \frac {X_1}{X_2} \right )$$

Mathematica
cpu = 0.448436 (sec), leaf count = 1601

$\left \{\left \{y(x)\to \frac {3 (x+1)}{-\frac {\sqrt [3]{-\cosh \left (\frac {3 c_1}{4}\right ) x^4-\sinh \left (\frac {3 c_1}{4}\right ) x^4-4 \cosh \left (\frac {3 c_1}{4}\right ) x^3-4 \sinh \left (\frac {3 c_1}{4}\right ) x^3+2 \cosh \left (\frac {3 c_1}{8}\right ) x^2-6 \cosh \left (\frac {3 c_1}{4}\right ) x^2+2 \sinh \left (\frac {3 c_1}{8}\right ) x^2-6 \sinh \left (\frac {3 c_1}{4}\right ) x^2+4 \cosh \left (\frac {3 c_1}{8}\right ) x-4 \cosh \left (\frac {3 c_1}{4}\right ) x+4 \sinh \left (\frac {3 c_1}{8}\right ) x-4 \sinh \left (\frac {3 c_1}{4}\right ) x+2 \cosh \left (\frac {3 c_1}{8}\right )-\cosh \left (\frac {3 c_1}{4}\right )+2 \sinh \left (\frac {3 c_1}{8}\right )-\sinh \left (\frac {3 c_1}{4}\right )+\sqrt {(x+1)^2 \left (x (x+2) \cosh \left (\frac {3 c_1}{16}\right )+\left (x^2+2 x+2\right ) \sinh \left (\frac {3 c_1}{16}\right )\right ){}^3 \left (\cosh \left (\frac {15 c_1}{16}\right )+\sinh \left (\frac {15 c_1}{16}\right )\right )}-1}}{\cosh \left (\frac {3 c_1}{8}\right ) (x+1)^2+\sinh \left (\frac {3 c_1}{8}\right ) (x+1)^2-1}-1+\frac {1}{\sqrt [3]{-\cosh \left (\frac {3 c_1}{4}\right ) x^4-\sinh \left (\frac {3 c_1}{4}\right ) x^4-4 \cosh \left (\frac {3 c_1}{4}\right ) x^3-4 \sinh \left (\frac {3 c_1}{4}\right ) x^3+2 \cosh \left (\frac {3 c_1}{8}\right ) x^2-6 \cosh \left (\frac {3 c_1}{4}\right ) x^2+2 \sinh \left (\frac {3 c_1}{8}\right ) x^2-6 \sinh \left (\frac {3 c_1}{4}\right ) x^2+4 \cosh \left (\frac {3 c_1}{8}\right ) x-4 \cosh \left (\frac {3 c_1}{4}\right ) x+4 \sinh \left (\frac {3 c_1}{8}\right ) x-4 \sinh \left (\frac {3 c_1}{4}\right ) x+2 \cosh \left (\frac {3 c_1}{8}\right )-\cosh \left (\frac {3 c_1}{4}\right )+2 \sinh \left (\frac {3 c_1}{8}\right )-\sinh \left (\frac {3 c_1}{4}\right )+\sqrt {(x+1)^2 \left (x (x+2) \cosh \left (\frac {3 c_1}{16}\right )+\left (x^2+2 x+2\right ) \sinh \left (\frac {3 c_1}{16}\right )\right ){}^3 \left (\cosh \left (\frac {15 c_1}{16}\right )+\sinh \left (\frac {15 c_1}{16}\right )\right )}-1}}}+2 (x+2)\right \},\left \{y(x)\to 2 \left (x+\frac {3 (x+1)}{\frac {\left (1-i \sqrt {3}\right ) \sqrt [3]{-\cosh \left (\frac {3 c_1}{4}\right ) x^4-\sinh \left (\frac {3 c_1}{4}\right ) x^4-4 \cosh \left (\frac {3 c_1}{4}\right ) x^3-4 \sinh \left (\frac {3 c_1}{4}\right ) x^3+2 \cosh \left (\frac {3 c_1}{8}\right ) x^2-6 \cosh \left (\frac {3 c_1}{4}\right ) x^2+2 \sinh \left (\frac {3 c_1}{8}\right ) x^2-6 \sinh \left (\frac {3 c_1}{4}\right ) x^2+4 \cosh \left (\frac {3 c_1}{8}\right ) x-4 \cosh \left (\frac {3 c_1}{4}\right ) x+4 \sinh \left (\frac {3 c_1}{8}\right ) x-4 \sinh \left (\frac {3 c_1}{4}\right ) x+2 \cosh \left (\frac {3 c_1}{8}\right )-\cosh \left (\frac {3 c_1}{4}\right )+2 \sinh \left (\frac {3 c_1}{8}\right )-\sinh \left (\frac {3 c_1}{4}\right )+\sqrt {(x+1)^2 \left (x (x+2) \cosh \left (\frac {3 c_1}{16}\right )+\left (x^2+2 x+2\right ) \sinh \left (\frac {3 c_1}{16}\right )\right ){}^3 \left (\cosh \left (\frac {15 c_1}{16}\right )+\sinh \left (\frac {15 c_1}{16}\right )\right )}-1}}{\cosh \left (\frac {3 c_1}{8}\right ) (x+1)^2+\sinh \left (\frac {3 c_1}{8}\right ) (x+1)^2-1}-2+\frac {-1-i \sqrt {3}}{\sqrt [3]{-\cosh \left (\frac {3 c_1}{4}\right ) x^4-\sinh \left (\frac {3 c_1}{4}\right ) x^4-4 \cosh \left (\frac {3 c_1}{4}\right ) x^3-4 \sinh \left (\frac {3 c_1}{4}\right ) x^3+2 \cosh \left (\frac {3 c_1}{8}\right ) x^2-6 \cosh \left (\frac {3 c_1}{4}\right ) x^2+2 \sinh \left (\frac {3 c_1}{8}\right ) x^2-6 \sinh \left (\frac {3 c_1}{4}\right ) x^2+4 \cosh \left (\frac {3 c_1}{8}\right ) x-4 \cosh \left (\frac {3 c_1}{4}\right ) x+4 \sinh \left (\frac {3 c_1}{8}\right ) x-4 \sinh \left (\frac {3 c_1}{4}\right ) x+2 \cosh \left (\frac {3 c_1}{8}\right )-\cosh \left (\frac {3 c_1}{4}\right )+2 \sinh \left (\frac {3 c_1}{8}\right )-\sinh \left (\frac {3 c_1}{4}\right )+\sqrt {(x+1)^2 \left (x (x+2) \cosh \left (\frac {3 c_1}{16}\right )+\left (x^2+2 x+2\right ) \sinh \left (\frac {3 c_1}{16}\right )\right ){}^3 \left (\cosh \left (\frac {15 c_1}{16}\right )+\sinh \left (\frac {15 c_1}{16}\right )\right )}-1}}}+2\right )\right \},\left \{y(x)\to 2 \left (x+\frac {3 (x+1)}{\frac {\left (1+i \sqrt {3}\right ) \sqrt [3]{-\cosh \left (\frac {3 c_1}{4}\right ) x^4-\sinh \left (\frac {3 c_1}{4}\right ) x^4-4 \cosh \left (\frac {3 c_1}{4}\right ) x^3-4 \sinh \left (\frac {3 c_1}{4}\right ) x^3+2 \cosh \left (\frac {3 c_1}{8}\right ) x^2-6 \cosh \left (\frac {3 c_1}{4}\right ) x^2+2 \sinh \left (\frac {3 c_1}{8}\right ) x^2-6 \sinh \left (\frac {3 c_1}{4}\right ) x^2+4 \cosh \left (\frac {3 c_1}{8}\right ) x-4 \cosh \left (\frac {3 c_1}{4}\right ) x+4 \sinh \left (\frac {3 c_1}{8}\right ) x-4 \sinh \left (\frac {3 c_1}{4}\right ) x+2 \cosh \left (\frac {3 c_1}{8}\right )-\cosh \left (\frac {3 c_1}{4}\right )+2 \sinh \left (\frac {3 c_1}{8}\right )-\sinh \left (\frac {3 c_1}{4}\right )+\sqrt {(x+1)^2 \left (x (x+2) \cosh \left (\frac {3 c_1}{16}\right )+\left (x^2+2 x+2\right ) \sinh \left (\frac {3 c_1}{16}\right )\right ){}^3 \left (\cosh \left (\frac {15 c_1}{16}\right )+\sinh \left (\frac {15 c_1}{16}\right )\right )}-1}}{\cosh \left (\frac {3 c_1}{8}\right ) (x+1)^2+\sinh \left (\frac {3 c_1}{8}\right ) (x+1)^2-1}-2+\frac {i \left (i+\sqrt {3}\right )}{\sqrt [3]{-\cosh \left (\frac {3 c_1}{4}\right ) x^4-\sinh \left (\frac {3 c_1}{4}\right ) x^4-4 \cosh \left (\frac {3 c_1}{4}\right ) x^3-4 \sinh \left (\frac {3 c_1}{4}\right ) x^3+2 \cosh \left (\frac {3 c_1}{8}\right ) x^2-6 \cosh \left (\frac {3 c_1}{4}\right ) x^2+2 \sinh \left (\frac {3 c_1}{8}\right ) x^2-6 \sinh \left (\frac {3 c_1}{4}\right ) x^2+4 \cosh \left (\frac {3 c_1}{8}\right ) x-4 \cosh \left (\frac {3 c_1}{4}\right ) x+4 \sinh \left (\frac {3 c_1}{8}\right ) x-4 \sinh \left (\frac {3 c_1}{4}\right ) x+2 \cosh \left (\frac {3 c_1}{8}\right )-\cosh \left (\frac {3 c_1}{4}\right )+2 \sinh \left (\frac {3 c_1}{8}\right )-\sinh \left (\frac {3 c_1}{4}\right )+\sqrt {(x+1)^2 \left (x (x+2) \cosh \left (\frac {3 c_1}{16}\right )+\left (x^2+2 x+2\right ) \sinh \left (\frac {3 c_1}{16}\right )\right ){}^3 \left (\cosh \left (\frac {15 c_1}{16}\right )+\sinh \left (\frac {15 c_1}{16}\right )\right )}-1}}}+2\right )\right \}\right \}$

Maple
cpu = 0.254 (sec), leaf count = 184

$\left [y \left (x \right ) = 2+\frac {\left (1+x \right ) \left (-\textit {\_C1}^{2}-\textit {\_C1}^{2} \left (-\frac {\left (27 \textit {\_C1} \left (1+x \right )+3 \sqrt {3}\, \sqrt {27 \textit {\_C1}^{2} \left (1+x \right )^{2}-1}\right )^{\frac {1}{3}}}{6 \textit {\_C1} \left (1+x \right )}-\frac {1}{2 \textit {\_C1} \left (1+x \right ) \left (27 \textit {\_C1} \left (1+x \right )+3 \sqrt {3}\, \sqrt {27 \textit {\_C1}^{2} \left (1+x \right )^{2}-1}\right )^{\frac {1}{3}}}+\frac {i \sqrt {3}\, \left (\frac {\left (27 \textit {\_C1} \left (1+x \right )+3 \sqrt {3}\, \sqrt {27 \textit {\_C1}^{2} \left (1+x \right )^{2}-1}\right )^{\frac {1}{3}}}{3 \textit {\_C1} \left (1+x \right )}-\frac {1}{\textit {\_C1} \left (1+x \right ) \left (27 \textit {\_C1} \left (1+x \right )+3 \sqrt {3}\, \sqrt {27 \textit {\_C1}^{2} \left (1+x \right )^{2}-1}\right )^{\frac {1}{3}}}\right )}{2}\right )\right )}{\textit {\_C1}^{2}}\right ]$ Mathematica raw input

DSolve[5 + x - 2*y[x] + (4 + 2*x - y[x])*y'[x] == 0,y[x],x]

Mathematica raw output

{{y[x] -> 2*(2 + x) + (3*(1 + x))/(-1 + (-1 + 2*Cosh[(3*C[1])/8] + 4*x*Cosh[(3*C
[1])/8] + 2*x^2*Cosh[(3*C[1])/8] - Cosh[(3*C[1])/4] - 4*x*Cosh[(3*C[1])/4] - 6*x
^2*Cosh[(3*C[1])/4] - 4*x^3*Cosh[(3*C[1])/4] - x^4*Cosh[(3*C[1])/4] + 2*Sinh[(3*
C[1])/8] + 4*x*Sinh[(3*C[1])/8] + 2*x^2*Sinh[(3*C[1])/8] - Sinh[(3*C[1])/4] - 4*
x*Sinh[(3*C[1])/4] - 6*x^2*Sinh[(3*C[1])/4] - 4*x^3*Sinh[(3*C[1])/4] - x^4*Sinh[
(3*C[1])/4] + Sqrt[(1 + x)^2*(x*(2 + x)*Cosh[(3*C[1])/16] + (2 + 2*x + x^2)*Sinh
[(3*C[1])/16])^3*(Cosh[(15*C[1])/16] + Sinh[(15*C[1])/16])])^(-1/3) - (-1 + 2*Co
sh[(3*C[1])/8] + 4*x*Cosh[(3*C[1])/8] + 2*x^2*Cosh[(3*C[1])/8] - Cosh[(3*C[1])/4
] - 4*x*Cosh[(3*C[1])/4] - 6*x^2*Cosh[(3*C[1])/4] - 4*x^3*Cosh[(3*C[1])/4] - x^4
*Cosh[(3*C[1])/4] + 2*Sinh[(3*C[1])/8] + 4*x*Sinh[(3*C[1])/8] + 2*x^2*Sinh[(3*C[
1])/8] - Sinh[(3*C[1])/4] - 4*x*Sinh[(3*C[1])/4] - 6*x^2*Sinh[(3*C[1])/4] - 4*x^
3*Sinh[(3*C[1])/4] - x^4*Sinh[(3*C[1])/4] + Sqrt[(1 + x)^2*(x*(2 + x)*Cosh[(3*C[
1])/16] + (2 + 2*x + x^2)*Sinh[(3*C[1])/16])^3*(Cosh[(15*C[1])/16] + Sinh[(15*C[
1])/16])])^(1/3)/(-1 + (1 + x)^2*Cosh[(3*C[1])/8] + (1 + x)^2*Sinh[(3*C[1])/8]))
}, {y[x] -> 2*(2 + x + (3*(1 + x))/(-2 + (-1 - I*Sqrt[3])/(-1 + 2*Cosh[(3*C[1])/
8] + 4*x*Cosh[(3*C[1])/8] + 2*x^2*Cosh[(3*C[1])/8] - Cosh[(3*C[1])/4] - 4*x*Cosh
[(3*C[1])/4] - 6*x^2*Cosh[(3*C[1])/4] - 4*x^3*Cosh[(3*C[1])/4] - x^4*Cosh[(3*C[1
])/4] + 2*Sinh[(3*C[1])/8] + 4*x*Sinh[(3*C[1])/8] + 2*x^2*Sinh[(3*C[1])/8] - Sin
h[(3*C[1])/4] - 4*x*Sinh[(3*C[1])/4] - 6*x^2*Sinh[(3*C[1])/4] - 4*x^3*Sinh[(3*C[
1])/4] - x^4*Sinh[(3*C[1])/4] + Sqrt[(1 + x)^2*(x*(2 + x)*Cosh[(3*C[1])/16] + (2
 + 2*x + x^2)*Sinh[(3*C[1])/16])^3*(Cosh[(15*C[1])/16] + Sinh[(15*C[1])/16])])^(
1/3) + ((1 - I*Sqrt[3])*(-1 + 2*Cosh[(3*C[1])/8] + 4*x*Cosh[(3*C[1])/8] + 2*x^2*
Cosh[(3*C[1])/8] - Cosh[(3*C[1])/4] - 4*x*Cosh[(3*C[1])/4] - 6*x^2*Cosh[(3*C[1])
/4] - 4*x^3*Cosh[(3*C[1])/4] - x^4*Cosh[(3*C[1])/4] + 2*Sinh[(3*C[1])/8] + 4*x*S
inh[(3*C[1])/8] + 2*x^2*Sinh[(3*C[1])/8] - Sinh[(3*C[1])/4] - 4*x*Sinh[(3*C[1])/
4] - 6*x^2*Sinh[(3*C[1])/4] - 4*x^3*Sinh[(3*C[1])/4] - x^4*Sinh[(3*C[1])/4] + Sq
rt[(1 + x)^2*(x*(2 + x)*Cosh[(3*C[1])/16] + (2 + 2*x + x^2)*Sinh[(3*C[1])/16])^3
*(Cosh[(15*C[1])/16] + Sinh[(15*C[1])/16])])^(1/3))/(-1 + (1 + x)^2*Cosh[(3*C[1]
)/8] + (1 + x)^2*Sinh[(3*C[1])/8])))}, {y[x] -> 2*(2 + x + (3*(1 + x))/(-2 + (I*
(I + Sqrt[3]))/(-1 + 2*Cosh[(3*C[1])/8] + 4*x*Cosh[(3*C[1])/8] + 2*x^2*Cosh[(3*C
[1])/8] - Cosh[(3*C[1])/4] - 4*x*Cosh[(3*C[1])/4] - 6*x^2*Cosh[(3*C[1])/4] - 4*x
^3*Cosh[(3*C[1])/4] - x^4*Cosh[(3*C[1])/4] + 2*Sinh[(3*C[1])/8] + 4*x*Sinh[(3*C[
1])/8] + 2*x^2*Sinh[(3*C[1])/8] - Sinh[(3*C[1])/4] - 4*x*Sinh[(3*C[1])/4] - 6*x^
2*Sinh[(3*C[1])/4] - 4*x^3*Sinh[(3*C[1])/4] - x^4*Sinh[(3*C[1])/4] + Sqrt[(1 + x
)^2*(x*(2 + x)*Cosh[(3*C[1])/16] + (2 + 2*x + x^2)*Sinh[(3*C[1])/16])^3*(Cosh[(1
5*C[1])/16] + Sinh[(15*C[1])/16])])^(1/3) + ((1 + I*Sqrt[3])*(-1 + 2*Cosh[(3*C[1
])/8] + 4*x*Cosh[(3*C[1])/8] + 2*x^2*Cosh[(3*C[1])/8] - Cosh[(3*C[1])/4] - 4*x*C
osh[(3*C[1])/4] - 6*x^2*Cosh[(3*C[1])/4] - 4*x^3*Cosh[(3*C[1])/4] - x^4*Cosh[(3*
C[1])/4] + 2*Sinh[(3*C[1])/8] + 4*x*Sinh[(3*C[1])/8] + 2*x^2*Sinh[(3*C[1])/8] -
Sinh[(3*C[1])/4] - 4*x*Sinh[(3*C[1])/4] - 6*x^2*Sinh[(3*C[1])/4] - 4*x^3*Sinh[(3
*C[1])/4] - x^4*Sinh[(3*C[1])/4] + Sqrt[(1 + x)^2*(x*(2 + x)*Cosh[(3*C[1])/16] +
 (2 + 2*x + x^2)*Sinh[(3*C[1])/16])^3*(Cosh[(15*C[1])/16] + Sinh[(15*C[1])/16])]
)^(1/3))/(-1 + (1 + x)^2*Cosh[(3*C[1])/8] + (1 + x)^2*Sinh[(3*C[1])/8])))}}

Maple raw input

dsolve((4+2*x-y(x))*diff(y(x),x)+5+x-2*y(x) = 0, y(x))

Maple raw output

[y(x) = 2+(1+x)*(-_C1^2-_C1^2*(-1/6/_C1/(1+x)*(27*_C1*(1+x)+3*3^(1/2)*(27*_C1^2*
(1+x)^2-1)^(1/2))^(1/3)-1/2/_C1/(1+x)/(27*_C1*(1+x)+3*3^(1/2)*(27*_C1^2*(1+x)^2-
1)^(1/2))^(1/3)+1/2*I*3^(1/2)*(1/3/_C1/(1+x)*(27*_C1*(1+x)+3*3^(1/2)*(27*_C1^2*(
1+x)^2-1)^(1/2))^(1/3)-1/_C1/(1+x)/(27*_C1*(1+x)+3*3^(1/2)*(27*_C1^2*(1+x)^2-1)^
(1/2))^(1/3))))/_C1^2]