### 3.498 $$\int \frac{(d+e x)^4}{a+c x^2} \, dx$$

Optimal. Leaf size=123 $\frac{\left (a^2 e^4-6 a c d^2 e^2+c^2 d^4\right ) \tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right )}{\sqrt{a} c^{5/2}}+\frac{2 d e \left (c d^2-a e^2\right ) \log \left (a+c x^2\right )}{c^2}+\frac{e^2 x \left (6 c d^2-a e^2\right )}{c^2}+\frac{2 d e^3 x^2}{c}+\frac{e^4 x^3}{3 c}$

[Out]

(e^2*(6*c*d^2 - a*e^2)*x)/c^2 + (2*d*e^3*x^2)/c + (e^4*x^3)/(3*c) + ((c^2*d^4 - 6*a*c*d^2*e^2 + a^2*e^4)*ArcTa
n[(Sqrt[c]*x)/Sqrt[a]])/(Sqrt[a]*c^(5/2)) + (2*d*e*(c*d^2 - a*e^2)*Log[a + c*x^2])/c^2

________________________________________________________________________________________

Rubi [A]  time = 0.0968408, antiderivative size = 123, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 17, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.235, Rules used = {702, 635, 205, 260} $\frac{\left (a^2 e^4-6 a c d^2 e^2+c^2 d^4\right ) \tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right )}{\sqrt{a} c^{5/2}}+\frac{2 d e \left (c d^2-a e^2\right ) \log \left (a+c x^2\right )}{c^2}+\frac{e^2 x \left (6 c d^2-a e^2\right )}{c^2}+\frac{2 d e^3 x^2}{c}+\frac{e^4 x^3}{3 c}$

Antiderivative was successfully veriﬁed.

[In]

Int[(d + e*x)^4/(a + c*x^2),x]

[Out]

(e^2*(6*c*d^2 - a*e^2)*x)/c^2 + (2*d*e^3*x^2)/c + (e^4*x^3)/(3*c) + ((c^2*d^4 - 6*a*c*d^2*e^2 + a^2*e^4)*ArcTa
n[(Sqrt[c]*x)/Sqrt[a]])/(Sqrt[a]*c^(5/2)) + (2*d*e*(c*d^2 - a*e^2)*Log[a + c*x^2])/c^2

Rule 702

Int[((d_) + (e_.)*(x_))^(m_)/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[PolynomialDivide[(d + e*x)^m, a + c*x^2,
x], x] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[m, 1] && (NeQ[d, 0] || GtQ[m, 2])

Rule 635

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[-(a*c)]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rubi steps

\begin{align*} \int \frac{(d+e x)^4}{a+c x^2} \, dx &=\int \left (\frac{e^2 \left (6 c d^2-a e^2\right )}{c^2}+\frac{4 d e^3 x}{c}+\frac{e^4 x^2}{c}+\frac{c^2 d^4-6 a c d^2 e^2+a^2 e^4+4 c d e \left (c d^2-a e^2\right ) x}{c^2 \left (a+c x^2\right )}\right ) \, dx\\ &=\frac{e^2 \left (6 c d^2-a e^2\right ) x}{c^2}+\frac{2 d e^3 x^2}{c}+\frac{e^4 x^3}{3 c}+\frac{\int \frac{c^2 d^4-6 a c d^2 e^2+a^2 e^4+4 c d e \left (c d^2-a e^2\right ) x}{a+c x^2} \, dx}{c^2}\\ &=\frac{e^2 \left (6 c d^2-a e^2\right ) x}{c^2}+\frac{2 d e^3 x^2}{c}+\frac{e^4 x^3}{3 c}+\frac{\left (4 d e \left (c d^2-a e^2\right )\right ) \int \frac{x}{a+c x^2} \, dx}{c}+\frac{\left (c^2 d^4-6 a c d^2 e^2+a^2 e^4\right ) \int \frac{1}{a+c x^2} \, dx}{c^2}\\ &=\frac{e^2 \left (6 c d^2-a e^2\right ) x}{c^2}+\frac{2 d e^3 x^2}{c}+\frac{e^4 x^3}{3 c}+\frac{\left (c^2 d^4-6 a c d^2 e^2+a^2 e^4\right ) \tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right )}{\sqrt{a} c^{5/2}}+\frac{2 d e \left (c d^2-a e^2\right ) \log \left (a+c x^2\right )}{c^2}\\ \end{align*}

Mathematica [A]  time = 0.0872038, size = 111, normalized size = 0.9 $\frac{\left (a^2 e^4-6 a c d^2 e^2+c^2 d^4\right ) \tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right )}{\sqrt{a} c^{5/2}}+\frac{e \left (6 \left (c d^3-a d e^2\right ) \log \left (a+c x^2\right )-3 a e^3 x+c e x \left (18 d^2+6 d e x+e^2 x^2\right )\right )}{3 c^2}$

Antiderivative was successfully veriﬁed.

[In]

Integrate[(d + e*x)^4/(a + c*x^2),x]

[Out]

((c^2*d^4 - 6*a*c*d^2*e^2 + a^2*e^4)*ArcTan[(Sqrt[c]*x)/Sqrt[a]])/(Sqrt[a]*c^(5/2)) + (e*(-3*a*e^3*x + c*e*x*(
18*d^2 + 6*d*e*x + e^2*x^2) + 6*(c*d^3 - a*d*e^2)*Log[a + c*x^2]))/(3*c^2)

________________________________________________________________________________________

Maple [A]  time = 0.048, size = 150, normalized size = 1.2 \begin{align*}{\frac{{e}^{4}{x}^{3}}{3\,c}}+2\,{\frac{d{e}^{3}{x}^{2}}{c}}-{\frac{{e}^{4}ax}{{c}^{2}}}+6\,{\frac{{d}^{2}{e}^{2}x}{c}}-2\,{\frac{\ln \left ( c{x}^{2}+a \right ) ad{e}^{3}}{{c}^{2}}}+2\,{\frac{\ln \left ( c{x}^{2}+a \right ){d}^{3}e}{c}}+{\frac{{a}^{2}{e}^{4}}{{c}^{2}}\arctan \left ({cx{\frac{1}{\sqrt{ac}}}} \right ){\frac{1}{\sqrt{ac}}}}-6\,{\frac{a{d}^{2}{e}^{2}}{c\sqrt{ac}}\arctan \left ({\frac{cx}{\sqrt{ac}}} \right ) }+{{d}^{4}\arctan \left ({cx{\frac{1}{\sqrt{ac}}}} \right ){\frac{1}{\sqrt{ac}}}} \end{align*}

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

[In]

int((e*x+d)^4/(c*x^2+a),x)

[Out]

1/3*e^4*x^3/c+2*d*e^3*x^2/c-e^4/c^2*a*x+6*e^2/c*d^2*x-2/c^2*ln(c*x^2+a)*a*d*e^3+2/c*ln(c*x^2+a)*d^3*e+1/c^2/(a
*c)^(1/2)*arctan(x*c/(a*c)^(1/2))*a^2*e^4-6/c/(a*c)^(1/2)*arctan(x*c/(a*c)^(1/2))*a*d^2*e^2+1/(a*c)^(1/2)*arct
an(x*c/(a*c)^(1/2))*d^4

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

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

[In]

integrate((e*x+d)^4/(c*x^2+a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.01712, size = 595, normalized size = 4.84 \begin{align*} \left [\frac{2 \, a c^{2} e^{4} x^{3} + 12 \, a c^{2} d e^{3} x^{2} - 3 \,{\left (c^{2} d^{4} - 6 \, a c d^{2} e^{2} + a^{2} e^{4}\right )} \sqrt{-a c} \log \left (\frac{c x^{2} - 2 \, \sqrt{-a c} x - a}{c x^{2} + a}\right ) + 6 \,{\left (6 \, a c^{2} d^{2} e^{2} - a^{2} c e^{4}\right )} x + 12 \,{\left (a c^{2} d^{3} e - a^{2} c d e^{3}\right )} \log \left (c x^{2} + a\right )}{6 \, a c^{3}}, \frac{a c^{2} e^{4} x^{3} + 6 \, a c^{2} d e^{3} x^{2} + 3 \,{\left (c^{2} d^{4} - 6 \, a c d^{2} e^{2} + a^{2} e^{4}\right )} \sqrt{a c} \arctan \left (\frac{\sqrt{a c} x}{a}\right ) + 3 \,{\left (6 \, a c^{2} d^{2} e^{2} - a^{2} c e^{4}\right )} x + 6 \,{\left (a c^{2} d^{3} e - a^{2} c d e^{3}\right )} \log \left (c x^{2} + a\right )}{3 \, a c^{3}}\right ] \end{align*}

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

[In]

integrate((e*x+d)^4/(c*x^2+a),x, algorithm="fricas")

[Out]

[1/6*(2*a*c^2*e^4*x^3 + 12*a*c^2*d*e^3*x^2 - 3*(c^2*d^4 - 6*a*c*d^2*e^2 + a^2*e^4)*sqrt(-a*c)*log((c*x^2 - 2*s
qrt(-a*c)*x - a)/(c*x^2 + a)) + 6*(6*a*c^2*d^2*e^2 - a^2*c*e^4)*x + 12*(a*c^2*d^3*e - a^2*c*d*e^3)*log(c*x^2 +
a))/(a*c^3), 1/3*(a*c^2*e^4*x^3 + 6*a*c^2*d*e^3*x^2 + 3*(c^2*d^4 - 6*a*c*d^2*e^2 + a^2*e^4)*sqrt(a*c)*arctan(
sqrt(a*c)*x/a) + 3*(6*a*c^2*d^2*e^2 - a^2*c*e^4)*x + 6*(a*c^2*d^3*e - a^2*c*d*e^3)*log(c*x^2 + a))/(a*c^3)]

________________________________________________________________________________________

Sympy [B]  time = 1.24195, size = 401, normalized size = 3.26 \begin{align*} \left (- \frac{2 d e \left (a e^{2} - c d^{2}\right )}{c^{2}} - \frac{\sqrt{- a c^{5}} \left (a^{2} e^{4} - 6 a c d^{2} e^{2} + c^{2} d^{4}\right )}{2 a c^{5}}\right ) \log{\left (x + \frac{4 a^{2} d e^{3} + 2 a c^{2} \left (- \frac{2 d e \left (a e^{2} - c d^{2}\right )}{c^{2}} - \frac{\sqrt{- a c^{5}} \left (a^{2} e^{4} - 6 a c d^{2} e^{2} + c^{2} d^{4}\right )}{2 a c^{5}}\right ) - 4 a c d^{3} e}{a^{2} e^{4} - 6 a c d^{2} e^{2} + c^{2} d^{4}} \right )} + \left (- \frac{2 d e \left (a e^{2} - c d^{2}\right )}{c^{2}} + \frac{\sqrt{- a c^{5}} \left (a^{2} e^{4} - 6 a c d^{2} e^{2} + c^{2} d^{4}\right )}{2 a c^{5}}\right ) \log{\left (x + \frac{4 a^{2} d e^{3} + 2 a c^{2} \left (- \frac{2 d e \left (a e^{2} - c d^{2}\right )}{c^{2}} + \frac{\sqrt{- a c^{5}} \left (a^{2} e^{4} - 6 a c d^{2} e^{2} + c^{2} d^{4}\right )}{2 a c^{5}}\right ) - 4 a c d^{3} e}{a^{2} e^{4} - 6 a c d^{2} e^{2} + c^{2} d^{4}} \right )} + \frac{2 d e^{3} x^{2}}{c} + \frac{e^{4} x^{3}}{3 c} - \frac{x \left (a e^{4} - 6 c d^{2} e^{2}\right )}{c^{2}} \end{align*}

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

[In]

integrate((e*x+d)**4/(c*x**2+a),x)

[Out]

(-2*d*e*(a*e**2 - c*d**2)/c**2 - sqrt(-a*c**5)*(a**2*e**4 - 6*a*c*d**2*e**2 + c**2*d**4)/(2*a*c**5))*log(x + (
4*a**2*d*e**3 + 2*a*c**2*(-2*d*e*(a*e**2 - c*d**2)/c**2 - sqrt(-a*c**5)*(a**2*e**4 - 6*a*c*d**2*e**2 + c**2*d*
*4)/(2*a*c**5)) - 4*a*c*d**3*e)/(a**2*e**4 - 6*a*c*d**2*e**2 + c**2*d**4)) + (-2*d*e*(a*e**2 - c*d**2)/c**2 +
sqrt(-a*c**5)*(a**2*e**4 - 6*a*c*d**2*e**2 + c**2*d**4)/(2*a*c**5))*log(x + (4*a**2*d*e**3 + 2*a*c**2*(-2*d*e*
(a*e**2 - c*d**2)/c**2 + sqrt(-a*c**5)*(a**2*e**4 - 6*a*c*d**2*e**2 + c**2*d**4)/(2*a*c**5)) - 4*a*c*d**3*e)/(
a**2*e**4 - 6*a*c*d**2*e**2 + c**2*d**4)) + 2*d*e**3*x**2/c + e**4*x**3/(3*c) - x*(a*e**4 - 6*c*d**2*e**2)/c**
2

________________________________________________________________________________________

Giac [A]  time = 1.25517, size = 153, normalized size = 1.24 \begin{align*} \frac{2 \,{\left (c d^{3} e - a d e^{3}\right )} \log \left (c x^{2} + a\right )}{c^{2}} + \frac{{\left (c^{2} d^{4} - 6 \, a c d^{2} e^{2} + a^{2} e^{4}\right )} \arctan \left (\frac{c x}{\sqrt{a c}}\right )}{\sqrt{a c} c^{2}} + \frac{c^{2} x^{3} e^{4} + 6 \, c^{2} d x^{2} e^{3} + 18 \, c^{2} d^{2} x e^{2} - 3 \, a c x e^{4}}{3 \, c^{3}} \end{align*}

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

[In]

integrate((e*x+d)^4/(c*x^2+a),x, algorithm="giac")

[Out]

2*(c*d^3*e - a*d*e^3)*log(c*x^2 + a)/c^2 + (c^2*d^4 - 6*a*c*d^2*e^2 + a^2*e^4)*arctan(c*x/sqrt(a*c))/(sqrt(a*c
)*c^2) + 1/3*(c^2*x^3*e^4 + 6*c^2*d*x^2*e^3 + 18*c^2*d^2*x*e^2 - 3*a*c*x*e^4)/c^3