### 3.370 $$\int \frac{(d+e x)^m (2+x+3 x^2-5 x^3+4 x^4)}{3+2 x+5 x^2} \, dx$$

Optimal. Leaf size=255 $\frac{\left (100 d^2+165 d e+81 e^2\right ) (d+e x)^{m+1}}{125 e^3 (m+1)}-\frac{(40 d+33 e) (d+e x)^{m+2}}{25 e^3 (m+2)}+\frac{4 (d+e x)^{m+3}}{5 e^3 (m+3)}-\frac{\left (-423 \sqrt{14}+6412 i\right ) (d+e x)^{m+1} \, _2F_1\left (1,m+1;m+2;\frac{5 (d+e x)}{5 d+i \sqrt{14} e-e}\right )}{3500 (m+1) \left (5 i d-\left (\sqrt{14}+i\right ) e\right )}-\frac{\left (423 \sqrt{14}+6412 i\right ) (d+e x)^{m+1} \, _2F_1\left (1,m+1;m+2;\frac{5 (d+e x)}{5 d-\left (1+i \sqrt{14}\right ) e}\right )}{3500 (m+1) \left (5 i d-\left (-\sqrt{14}+i\right ) e\right )}$

[Out]

((100*d^2 + 165*d*e + 81*e^2)*(d + e*x)^(1 + m))/(125*e^3*(1 + m)) - ((40*d + 33*e)*(d + e*x)^(2 + m))/(25*e^3
*(2 + m)) + (4*(d + e*x)^(3 + m))/(5*e^3*(3 + m)) - ((6412*I - 423*Sqrt[14])*(d + e*x)^(1 + m)*Hypergeometric2
F1[1, 1 + m, 2 + m, (5*(d + e*x))/(5*d - e + I*Sqrt[14]*e)])/(3500*((5*I)*d - (I + Sqrt[14])*e)*(1 + m)) - ((6
412*I + 423*Sqrt[14])*(d + e*x)^(1 + m)*Hypergeometric2F1[1, 1 + m, 2 + m, (5*(d + e*x))/(5*d - (1 + I*Sqrt[14
])*e)])/(3500*((5*I)*d - (I - Sqrt[14])*e)*(1 + m))

________________________________________________________________________________________

Rubi [A]  time = 0.480741, antiderivative size = 255, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 2, integrand size = 38, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.053, Rules used = {1628, 68} $\frac{\left (100 d^2+165 d e+81 e^2\right ) (d+e x)^{m+1}}{125 e^3 (m+1)}-\frac{(40 d+33 e) (d+e x)^{m+2}}{25 e^3 (m+2)}+\frac{4 (d+e x)^{m+3}}{5 e^3 (m+3)}-\frac{\left (-423 \sqrt{14}+6412 i\right ) (d+e x)^{m+1} \, _2F_1\left (1,m+1;m+2;\frac{5 (d+e x)}{5 d+i \sqrt{14} e-e}\right )}{3500 (m+1) \left (5 i d-\left (\sqrt{14}+i\right ) e\right )}-\frac{\left (423 \sqrt{14}+6412 i\right ) (d+e x)^{m+1} \, _2F_1\left (1,m+1;m+2;\frac{5 (d+e x)}{5 d-\left (1+i \sqrt{14}\right ) e}\right )}{3500 (m+1) \left (5 i d-\left (-\sqrt{14}+i\right ) e\right )}$

Antiderivative was successfully veriﬁed.

[In]

Int[((d + e*x)^m*(2 + x + 3*x^2 - 5*x^3 + 4*x^4))/(3 + 2*x + 5*x^2),x]

[Out]

((100*d^2 + 165*d*e + 81*e^2)*(d + e*x)^(1 + m))/(125*e^3*(1 + m)) - ((40*d + 33*e)*(d + e*x)^(2 + m))/(25*e^3
*(2 + m)) + (4*(d + e*x)^(3 + m))/(5*e^3*(3 + m)) - ((6412*I - 423*Sqrt[14])*(d + e*x)^(1 + m)*Hypergeometric2
F1[1, 1 + m, 2 + m, (5*(d + e*x))/(5*d - e + I*Sqrt[14]*e)])/(3500*((5*I)*d - (I + Sqrt[14])*e)*(1 + m)) - ((6
412*I + 423*Sqrt[14])*(d + e*x)^(1 + m)*Hypergeometric2F1[1, 1 + m, 2 + m, (5*(d + e*x))/(5*d - (1 + I*Sqrt[14
])*e)])/(3500*((5*I)*d - (I - Sqrt[14])*e)*(1 + m))

Rule 1628

Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegra
nd[(d + e*x)^m*Pq*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 68

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((b*c - a*d)^n*(a + b*x)^(m + 1)*Hype
rgeometric2F1[-n, m + 1, m + 2, -((d*(a + b*x))/(b*c - a*d))])/(b^(n + 1)*(m + 1)), x] /; FreeQ[{a, b, c, d, m
}, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] && IntegerQ[n]

Rubi steps

\begin{align*} \int \frac{(d+e x)^m \left (2+x+3 x^2-5 x^3+4 x^4\right )}{3+2 x+5 x^2} \, dx &=\int \left (\frac{\left (100 d^2+165 d e+81 e^2\right ) (d+e x)^m}{125 e^2}+\frac{\left (\frac{458}{125}+\frac{423 i}{125 \sqrt{14}}\right ) (d+e x)^m}{2-2 i \sqrt{14}+10 x}+\frac{\left (\frac{458}{125}-\frac{423 i}{125 \sqrt{14}}\right ) (d+e x)^m}{2+2 i \sqrt{14}+10 x}+\frac{(-40 d-33 e) (d+e x)^{1+m}}{25 e^2}+\frac{4 (d+e x)^{2+m}}{5 e^2}\right ) \, dx\\ &=\frac{\left (100 d^2+165 d e+81 e^2\right ) (d+e x)^{1+m}}{125 e^3 (1+m)}-\frac{(40 d+33 e) (d+e x)^{2+m}}{25 e^3 (2+m)}+\frac{4 (d+e x)^{3+m}}{5 e^3 (3+m)}+\frac{\left (6412-423 i \sqrt{14}\right ) \int \frac{(d+e x)^m}{2+2 i \sqrt{14}+10 x} \, dx}{1750}+\frac{\left (6412+423 i \sqrt{14}\right ) \int \frac{(d+e x)^m}{2-2 i \sqrt{14}+10 x} \, dx}{1750}\\ &=\frac{\left (100 d^2+165 d e+81 e^2\right ) (d+e x)^{1+m}}{125 e^3 (1+m)}-\frac{(40 d+33 e) (d+e x)^{2+m}}{25 e^3 (2+m)}+\frac{4 (d+e x)^{3+m}}{5 e^3 (3+m)}-\frac{\left (6412 i-423 \sqrt{14}\right ) (d+e x)^{1+m} \, _2F_1\left (1,1+m;2+m;\frac{5 (d+e x)}{5 d-e+i \sqrt{14} e}\right )}{3500 \left (5 i d-\left (i+\sqrt{14}\right ) e\right ) (1+m)}-\frac{\left (6412 i+423 \sqrt{14}\right ) (d+e x)^{1+m} \, _2F_1\left (1,1+m;2+m;\frac{5 (d+e x)}{5 d-\left (1+i \sqrt{14}\right ) e}\right )}{3500 \left (5 i d-\left (i-\sqrt{14}\right ) e\right ) (1+m)}\\ \end{align*}

Mathematica [A]  time = 0.672754, size = 221, normalized size = 0.87 $\frac{(d+e x)^{m+1} \left (\frac{28 \left (100 d^2+165 d e+81 e^2\right )}{e^3 (m+1)}+\frac{2800 (d+e x)^2}{e^3 (m+3)}-\frac{140 (40 d+33 e) (d+e x)}{e^3 (m+2)}-\frac{\left (423 \sqrt{14}+6412 i\right ) \, _2F_1\left (1,m+1;m+2;\frac{5 (d+e x)}{5 d+\left (-1-i \sqrt{14}\right ) e}\right )}{(m+1) \left (5 i d+\left (\sqrt{14}-i\right ) e\right )}-\frac{\left (423 \sqrt{14}-6412 i\right ) \, _2F_1\left (1,m+1;m+2;\frac{5 (d+e x)}{5 d+i \left (i+\sqrt{14}\right ) e}\right )}{(m+1) \left (\left (\sqrt{14}+i\right ) e-5 i d\right )}\right )}{3500}$

Antiderivative was successfully veriﬁed.

[In]

Integrate[((d + e*x)^m*(2 + x + 3*x^2 - 5*x^3 + 4*x^4))/(3 + 2*x + 5*x^2),x]

[Out]

((d + e*x)^(1 + m)*((28*(100*d^2 + 165*d*e + 81*e^2))/(e^3*(1 + m)) - (140*(40*d + 33*e)*(d + e*x))/(e^3*(2 +
m)) + (2800*(d + e*x)^2)/(e^3*(3 + m)) - ((6412*I + 423*Sqrt[14])*Hypergeometric2F1[1, 1 + m, 2 + m, (5*(d + e
*x))/(5*d + (-1 - I*Sqrt[14])*e)])/(((5*I)*d + (-I + Sqrt[14])*e)*(1 + m)) - ((-6412*I + 423*Sqrt[14])*Hyperge
ometric2F1[1, 1 + m, 2 + m, (5*(d + e*x))/(5*d + I*(I + Sqrt[14])*e)])/(((-5*I)*d + (I + Sqrt[14])*e)*(1 + m))
))/3500

________________________________________________________________________________________

Maple [F]  time = 3.62, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( ex+d \right ) ^{m} \left ( 4\,{x}^{4}-5\,{x}^{3}+3\,{x}^{2}+x+2 \right ) }{5\,{x}^{2}+2\,x+3}}\, dx \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)^m*(4*x^4-5*x^3+3*x^2+x+2)/(5*x^2+2*x+3),x)

[Out]

int((e*x+d)^m*(4*x^4-5*x^3+3*x^2+x+2)/(5*x^2+2*x+3),x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (4 \, x^{4} - 5 \, x^{3} + 3 \, x^{2} + x + 2\right )}{\left (e x + d\right )}^{m}}{5 \, x^{2} + 2 \, x + 3}\,{d x} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^m*(4*x^4-5*x^3+3*x^2+x+2)/(5*x^2+2*x+3),x, algorithm="maxima")

[Out]

integrate((4*x^4 - 5*x^3 + 3*x^2 + x + 2)*(e*x + d)^m/(5*x^2 + 2*x + 3), x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{{\left (4 \, x^{4} - 5 \, x^{3} + 3 \, x^{2} + x + 2\right )}{\left (e x + d\right )}^{m}}{5 \, x^{2} + 2 \, x + 3}, x\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^m*(4*x^4-5*x^3+3*x^2+x+2)/(5*x^2+2*x+3),x, algorithm="fricas")

[Out]

integral((4*x^4 - 5*x^3 + 3*x^2 + x + 2)*(e*x + d)^m/(5*x^2 + 2*x + 3), x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)**m*(4*x**4-5*x**3+3*x**2+x+2)/(5*x**2+2*x+3),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (4 \, x^{4} - 5 \, x^{3} + 3 \, x^{2} + x + 2\right )}{\left (e x + d\right )}^{m}}{5 \, x^{2} + 2 \, x + 3}\,{d x} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^m*(4*x^4-5*x^3+3*x^2+x+2)/(5*x^2+2*x+3),x, algorithm="giac")

[Out]

integrate((4*x^4 - 5*x^3 + 3*x^2 + x + 2)*(e*x + d)^m/(5*x^2 + 2*x + 3), x)