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

Optimal. Leaf size=149 $\frac{\left (-3 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 )}{2 a^{3/2} c^{5/2}}-\frac{3 e^2 x \left (c d^2-a e^2\right )}{2 a c^2}+\frac{2 d e^3 \log \left (a+c x^2\right )}{c^2}-\frac{d e^3 x^2}{2 a c}-\frac{(d+e x)^3 (a e-c d x)}{2 a c \left (a+c x^2\right )}$

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.120247, antiderivative size = 149, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 17, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.294, Rules used = {739, 801, 635, 205, 260} $\frac{\left (-3 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 )}{2 a^{3/2} c^{5/2}}-\frac{3 e^2 x \left (c d^2-a e^2\right )}{2 a c^2}+\frac{2 d e^3 \log \left (a+c x^2\right )}{c^2}-\frac{d e^3 x^2}{2 a c}-\frac{(d+e x)^3 (a e-c d x)}{2 a c \left (a+c x^2\right )}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

Rule 739

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((d + e*x)^(m - 1)*(a*e - c*d*x)*(a
+ c*x^2)^(p + 1))/(2*a*c*(p + 1)), x] + Dist[1/((p + 1)*(-2*a*c)), Int[(d + e*x)^(m - 2)*Simp[a*e^2*(m - 1) -
c*d^2*(2*p + 3) - d*c*e*(m + 2*p + 2)*x, x]*(a + c*x^2)^(p + 1), x], x] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^
2 + a*e^2, 0] && LtQ[p, -1] && GtQ[m, 1] && IntQuadraticQ[a, 0, c, d, e, m, p, x]

Rule 801

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(
(d + e*x)^m*(f + g*x))/(a + c*x^2), x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[c*d^2 + a*e^2, 0] && Integer
Q[m]

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}{\left (a+c x^2\right )^2} \, dx &=-\frac{(a e-c d x) (d+e x)^3}{2 a c \left (a+c x^2\right )}+\frac{\int \frac{(d+e x)^2 \left (c d^2+3 a e^2-2 c d e x\right )}{a+c x^2} \, dx}{2 a c}\\ &=-\frac{(a e-c d x) (d+e x)^3}{2 a c \left (a+c x^2\right )}+\frac{\int \left (-3 e^2 \left (d^2-\frac{a e^2}{c}\right )-2 d e^3 x+\frac{c^2 d^4+6 a c d^2 e^2-3 a^2 e^4+8 a c d e^3 x}{c \left (a+c x^2\right )}\right ) \, dx}{2 a c}\\ &=-\frac{3 e^2 \left (c d^2-a e^2\right ) x}{2 a c^2}-\frac{d e^3 x^2}{2 a c}-\frac{(a e-c d x) (d+e x)^3}{2 a c \left (a+c x^2\right )}+\frac{\int \frac{c^2 d^4+6 a c d^2 e^2-3 a^2 e^4+8 a c d e^3 x}{a+c x^2} \, dx}{2 a c^2}\\ &=-\frac{3 e^2 \left (c d^2-a e^2\right ) x}{2 a c^2}-\frac{d e^3 x^2}{2 a c}-\frac{(a e-c d x) (d+e x)^3}{2 a c \left (a+c x^2\right )}+\frac{\left (4 d e^3\right ) \int \frac{x}{a+c x^2} \, dx}{c}+\frac{\left (c^2 d^4+6 a c d^2 e^2-3 a^2 e^4\right ) \int \frac{1}{a+c x^2} \, dx}{2 a c^2}\\ &=-\frac{3 e^2 \left (c d^2-a e^2\right ) x}{2 a c^2}-\frac{d e^3 x^2}{2 a c}-\frac{(a e-c d x) (d+e x)^3}{2 a c \left (a+c x^2\right )}+\frac{\left (c^2 d^4+6 a c d^2 e^2-3 a^2 e^4\right ) \tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right )}{2 a^{3/2} c^{5/2}}+\frac{2 d e^3 \log \left (a+c x^2\right )}{c^2}\\ \end{align*}

Mathematica [A]  time = 0.0832501, size = 137, normalized size = 0.92 $\frac{a^2 e^3 (4 d+e x)-2 a c d^2 e (2 d+3 e x)+c^2 d^4 x}{2 a c^2 \left (a+c x^2\right )}+\frac{\left (-3 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 )}{2 a^{3/2} c^{5/2}}+\frac{2 d e^3 \log \left (a+c x^2\right )}{c^2}+\frac{e^4 x}{c^2}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.051, size = 192, normalized size = 1.3 \begin{align*}{\frac{{e}^{4}x}{{c}^{2}}}+{\frac{ax{e}^{4}}{2\,{c}^{2} \left ( c{x}^{2}+a \right ) }}-3\,{\frac{x{d}^{2}{e}^{2}}{c \left ( c{x}^{2}+a \right ) }}+{\frac{x{d}^{4}}{ \left ( 2\,c{x}^{2}+2\,a \right ) a}}+2\,{\frac{ad{e}^{3}}{{c}^{2} \left ( c{x}^{2}+a \right ) }}-2\,{\frac{{d}^{3}e}{c \left ( c{x}^{2}+a \right ) }}+2\,{\frac{d{e}^{3}\ln \left ( c{x}^{2}+a \right ) }{{c}^{2}}}-{\frac{3\,a{e}^{4}}{2\,{c}^{2}}\arctan \left ({cx{\frac{1}{\sqrt{ac}}}} \right ){\frac{1}{\sqrt{ac}}}}+3\,{\frac{{d}^{2}{e}^{2}}{c\sqrt{ac}}\arctan \left ({\frac{cx}{\sqrt{ac}}} \right ) }+{\frac{{d}^{4}}{2\,a}\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)^2,x)

[Out]

e^4*x/c^2+1/2/c^2/(c*x^2+a)*x*a*e^4-3/c/(c*x^2+a)*x*d^2*e^2+1/2/(c*x^2+a)*x/a*d^4+2/c^2/(c*x^2+a)*a*d*e^3-2/c/
(c*x^2+a)*d^3*e+2*d*e^3*ln(c*x^2+a)/c^2-3/2/c^2*a/(a*c)^(1/2)*arctan(x*c/(a*c)^(1/2))*e^4+3/c/(a*c)^(1/2)*arct
an(x*c/(a*c)^(1/2))*d^2*e^2+1/2/a/(a*c)^(1/2)*arctan(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)^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

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

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

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [B]  time = 2.71385, size = 403, normalized size = 2.7 \begin{align*} \left (\frac{2 d e^{3}}{c^{2}} - \frac{\sqrt{- a^{3} c^{5}} \left (3 a^{2} e^{4} - 6 a c d^{2} e^{2} - c^{2} d^{4}\right )}{4 a^{3} c^{5}}\right ) \log{\left (x + \frac{- 4 a^{2} c^{2} \left (\frac{2 d e^{3}}{c^{2}} - \frac{\sqrt{- a^{3} c^{5}} \left (3 a^{2} e^{4} - 6 a c d^{2} e^{2} - c^{2} d^{4}\right )}{4 a^{3} c^{5}}\right ) + 8 a^{2} d e^{3}}{3 a^{2} e^{4} - 6 a c d^{2} e^{2} - c^{2} d^{4}} \right )} + \left (\frac{2 d e^{3}}{c^{2}} + \frac{\sqrt{- a^{3} c^{5}} \left (3 a^{2} e^{4} - 6 a c d^{2} e^{2} - c^{2} d^{4}\right )}{4 a^{3} c^{5}}\right ) \log{\left (x + \frac{- 4 a^{2} c^{2} \left (\frac{2 d e^{3}}{c^{2}} + \frac{\sqrt{- a^{3} c^{5}} \left (3 a^{2} e^{4} - 6 a c d^{2} e^{2} - c^{2} d^{4}\right )}{4 a^{3} c^{5}}\right ) + 8 a^{2} d e^{3}}{3 a^{2} e^{4} - 6 a c d^{2} e^{2} - c^{2} d^{4}} \right )} + \frac{4 a^{2} d e^{3} - 4 a c d^{3} e + x \left (a^{2} e^{4} - 6 a c d^{2} e^{2} + c^{2} d^{4}\right )}{2 a^{2} c^{2} + 2 a c^{3} x^{2}} + \frac{e^{4} x}{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)**2,x)

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.30165, size = 177, normalized size = 1.19 \begin{align*} \frac{2 \, d e^{3} \log \left (c x^{2} + a\right )}{c^{2}} + \frac{x e^{4}}{c^{2}} + \frac{{\left (c^{2} d^{4} + 6 \, a c d^{2} e^{2} - 3 \, a^{2} e^{4}\right )} \arctan \left (\frac{c x}{\sqrt{a c}}\right )}{2 \, \sqrt{a c} a c^{2}} - \frac{4 \, a c d^{3} e - 4 \, a^{2} d e^{3} -{\left (c^{2} d^{4} - 6 \, a c d^{2} e^{2} + a^{2} e^{4}\right )} x}{2 \,{\left (c x^{2} + a\right )} a 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)^2,x, algorithm="giac")

[Out]

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