\(\int \frac {e f-e f x^2}{(a d+b d x+a d x^2) \sqrt {a+b x+c x^2+b x^3+a x^4}} \, dx\) [1009]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (warning: unable to verify)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 52, antiderivative size = 88 \[ \int \frac {e f-e f x^2}{\left (a d+b d x+a d x^2\right ) \sqrt {a+b x+c x^2+b x^3+a x^4}} \, dx=\frac {e f \arctan \left (\frac {a b+\left (4 a^2+b^2-2 a c\right ) x+a b x^2}{2 a \sqrt {2 a-c} \sqrt {a+b x+c x^2+b x^3+a x^4}}\right )}{a \sqrt {2 a-c} d} \]

[Out]

e*f*arctan(1/2*(a*b+(4*a^2-2*a*c+b^2)*x+a*b*x^2)/a/(2*a-c)^(1/2)/(a*x^4+b*x^3+c*x^2+b*x+a)^(1/2))/a/d/(2*a-c)^
(1/2)

Rubi [A] (verified)

Time = 0.21 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.019, Rules used = {2109} \[ \int \frac {e f-e f x^2}{\left (a d+b d x+a d x^2\right ) \sqrt {a+b x+c x^2+b x^3+a x^4}} \, dx=\frac {e f \arctan \left (\frac {x \left (4 a^2-2 a c+b^2\right )+a b x^2+a b}{2 a \sqrt {2 a-c} \sqrt {a x^4+a+b x^3+b x+c x^2}}\right )}{a d \sqrt {2 a-c}} \]

[In]

Int[(e*f - e*f*x^2)/((a*d + b*d*x + a*d*x^2)*Sqrt[a + b*x + c*x^2 + b*x^3 + a*x^4]),x]

[Out]

(e*f*ArcTan[(a*b + (4*a^2 + b^2 - 2*a*c)*x + a*b*x^2)/(2*a*Sqrt[2*a - c]*Sqrt[a + b*x + c*x^2 + b*x^3 + a*x^4]
)])/(a*Sqrt[2*a - c]*d)

Rule 2109

Int[((f_) + (g_.)*(x_)^2)/(((d_) + (e_.)*(x_) + (d_.)*(x_)^2)*Sqrt[(a_) + (b_.)*(x_) + (c_.)*(x_)^2 + (b_.)*(x
_)^3 + (a_.)*(x_)^4]), x_Symbol] :> Simp[a*(f/(d*Rt[a^2*(2*a - c), 2]))*ArcTan[(a*b + (4*a^2 + b^2 - 2*a*c)*x
+ a*b*x^2)/(2*Rt[a^2*(2*a - c), 2]*Sqrt[a + b*x + c*x^2 + b*x^3 + a*x^4])], x] /; FreeQ[{a, b, c, d, e, f, g},
 x] && EqQ[b*d - a*e, 0] && EqQ[f + g, 0] && PosQ[a^2*(2*a - c)]

Rubi steps \begin{align*} \text {integral}& = \frac {e f \tan ^{-1}\left (\frac {a b+\left (4 a^2+b^2-2 a c\right ) x+a b x^2}{2 a \sqrt {2 a-c} \sqrt {a+b x+c x^2+b x^3+a x^4}}\right )}{a \sqrt {2 a-c} d} \\ \end{align*}

Mathematica [B] (warning: unable to verify)

Leaf count is larger than twice the leaf count of optimal. \(246\) vs. \(2(88)=176\).

Time = 0.94 (sec) , antiderivative size = 246, normalized size of antiderivative = 2.80 \[ \int \frac {e f-e f x^2}{\left (a d+b d x+a d x^2\right ) \sqrt {a+b x+c x^2+b x^3+a x^4}} \, dx=-\frac {e f \left (-2 \sqrt {-2 a+c} \arctan \left (\frac {b \left (-\sqrt {-2 a+c} x+\sqrt {a+b x+c x^2+b x^3+a x^4}\right )}{2 a \sqrt {2 a-c} \left (1+x^2\right )}\right )+\sqrt {2 a-c} \left (2 \log \left (-\sqrt {-2 a+c} x+\sqrt {a+b x+c x^2+b x^3+a x^4}\right )-\log \left (a b^2 \left (-1+x^2\right )^2+8 a^3 \left (1+x^2\right )^2-4 a^2 c \left (1+x^2\right )^2+b^2 x \left (b+2 c x+b x^2-2 \sqrt {-2 a+c} \sqrt {a+b x+c x^2+b x^3+a x^4}\right )\right )\right )\right )}{2 a \sqrt {-(-2 a+c)^2} d} \]

[In]

Integrate[(e*f - e*f*x^2)/((a*d + b*d*x + a*d*x^2)*Sqrt[a + b*x + c*x^2 + b*x^3 + a*x^4]),x]

[Out]

-1/2*(e*f*(-2*Sqrt[-2*a + c]*ArcTan[(b*(-(Sqrt[-2*a + c]*x) + Sqrt[a + b*x + c*x^2 + b*x^3 + a*x^4]))/(2*a*Sqr
t[2*a - c]*(1 + x^2))] + Sqrt[2*a - c]*(2*Log[-(Sqrt[-2*a + c]*x) + Sqrt[a + b*x + c*x^2 + b*x^3 + a*x^4]] - L
og[a*b^2*(-1 + x^2)^2 + 8*a^3*(1 + x^2)^2 - 4*a^2*c*(1 + x^2)^2 + b^2*x*(b + 2*c*x + b*x^2 - 2*Sqrt[-2*a + c]*
Sqrt[a + b*x + c*x^2 + b*x^3 + a*x^4])])))/(a*Sqrt[-(-2*a + c)^2]*d)

Maple [A] (verified)

Time = 3.96 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.05

method result size
default \(\frac {e f \ln \left (\frac {2 \sqrt {-2 a +c}\, \sqrt {a \,x^{4}+b \,x^{3}+c \,x^{2}+b x +a}\, a -4 a^{2} x +\left (-b \,x^{2}+2 c x -b \right ) a -b^{2} x}{a \,x^{2}+b x +a}\right )}{d \sqrt {-2 a +c}\, a}\) \(92\)
pseudoelliptic \(\frac {e f \ln \left (\frac {2 \sqrt {-2 a +c}\, \sqrt {a \,x^{4}+b \,x^{3}+c \,x^{2}+b x +a}\, a -4 a^{2} x +\left (-b \,x^{2}+2 c x -b \right ) a -b^{2} x}{a \,x^{2}+b x +a}\right )}{d \sqrt {-2 a +c}\, a}\) \(92\)
elliptic \(\text {Expression too large to display}\) \(254498\)

[In]

int((-e*f*x^2+e*f)/(a*d*x^2+b*d*x+a*d)/(a*x^4+b*x^3+c*x^2+b*x+a)^(1/2),x,method=_RETURNVERBOSE)

[Out]

e*f/d/(-2*a+c)^(1/2)*ln((2*(-2*a+c)^(1/2)*(a*x^4+b*x^3+c*x^2+b*x+a)^(1/2)*a-4*a^2*x+(-b*x^2+2*c*x-b)*a-b^2*x)/
(a*x^2+b*x+a))/a

Fricas [A] (verification not implemented)

none

Time = 2.16 (sec) , antiderivative size = 324, normalized size of antiderivative = 3.68 \[ \int \frac {e f-e f x^2}{\left (a d+b d x+a d x^2\right ) \sqrt {a+b x+c x^2+b x^3+a x^4}} \, dx=\left [-\frac {\sqrt {-2 \, a + c} e f \log \left (\frac {2 \, a b^{3} x^{3} + 2 \, a b^{3} x - {\left (8 \, a^{4} - a^{2} b^{2} - 4 \, a^{3} c\right )} x^{4} - 8 \, a^{4} + a^{2} b^{2} + 4 \, a^{3} c + {\left (16 \, a^{4} + 10 \, a^{2} b^{2} + b^{4} + 8 \, a^{2} c^{2} - 4 \, {\left (6 \, a^{3} + a b^{2}\right )} c\right )} x^{2} - 4 \, {\left (a^{2} b x^{2} + a^{2} b + {\left (4 \, a^{3} + a b^{2} - 2 \, a^{2} c\right )} x\right )} \sqrt {a x^{4} + b x^{3} + c x^{2} + b x + a} \sqrt {-2 \, a + c}}{a^{2} x^{4} + 2 \, a b x^{3} + 2 \, a b x + {\left (2 \, a^{2} + b^{2}\right )} x^{2} + a^{2}}\right )}{2 \, {\left (2 \, a^{2} - a c\right )} d}, -\frac {\sqrt {2 \, a - c} e f \arctan \left (\frac {2 \, \sqrt {a x^{4} + b x^{3} + c x^{2} + b x + a} \sqrt {2 \, a - c} a}{a b x^{2} + a b + {\left (4 \, a^{2} + b^{2} - 2 \, a c\right )} x}\right )}{{\left (2 \, a^{2} - a c\right )} d}\right ] \]

[In]

integrate((-e*f*x^2+e*f)/(a*d*x^2+b*d*x+a*d)/(a*x^4+b*x^3+c*x^2+b*x+a)^(1/2),x, algorithm="fricas")

[Out]

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

Sympy [F]

\[ \int \frac {e f-e f x^2}{\left (a d+b d x+a d x^2\right ) \sqrt {a+b x+c x^2+b x^3+a x^4}} \, dx=- \frac {e f \left (\int \frac {x^{2}}{a x^{2} \sqrt {a x^{4} + a + b x^{3} + b x + c x^{2}} + a \sqrt {a x^{4} + a + b x^{3} + b x + c x^{2}} + b x \sqrt {a x^{4} + a + b x^{3} + b x + c x^{2}}}\, dx + \int \left (- \frac {1}{a x^{2} \sqrt {a x^{4} + a + b x^{3} + b x + c x^{2}} + a \sqrt {a x^{4} + a + b x^{3} + b x + c x^{2}} + b x \sqrt {a x^{4} + a + b x^{3} + b x + c x^{2}}}\right )\, dx\right )}{d} \]

[In]

integrate((-e*f*x**2+e*f)/(a*d*x**2+b*d*x+a*d)/(a*x**4+b*x**3+c*x**2+b*x+a)**(1/2),x)

[Out]

-e*f*(Integral(x**2/(a*x**2*sqrt(a*x**4 + a + b*x**3 + b*x + c*x**2) + a*sqrt(a*x**4 + a + b*x**3 + b*x + c*x*
*2) + b*x*sqrt(a*x**4 + a + b*x**3 + b*x + c*x**2)), x) + Integral(-1/(a*x**2*sqrt(a*x**4 + a + b*x**3 + b*x +
 c*x**2) + a*sqrt(a*x**4 + a + b*x**3 + b*x + c*x**2) + b*x*sqrt(a*x**4 + a + b*x**3 + b*x + c*x**2)), x))/d

Maxima [F]

\[ \int \frac {e f-e f x^2}{\left (a d+b d x+a d x^2\right ) \sqrt {a+b x+c x^2+b x^3+a x^4}} \, dx=\int { -\frac {e f x^{2} - e f}{\sqrt {a x^{4} + b x^{3} + c x^{2} + b x + a} {\left (a d x^{2} + b d x + a d\right )}} \,d x } \]

[In]

integrate((-e*f*x^2+e*f)/(a*d*x^2+b*d*x+a*d)/(a*x^4+b*x^3+c*x^2+b*x+a)^(1/2),x, algorithm="maxima")

[Out]

-integrate((e*f*x^2 - e*f)/(sqrt(a*x^4 + b*x^3 + c*x^2 + b*x + a)*(a*d*x^2 + b*d*x + a*d)), x)

Giac [F]

\[ \int \frac {e f-e f x^2}{\left (a d+b d x+a d x^2\right ) \sqrt {a+b x+c x^2+b x^3+a x^4}} \, dx=\int { -\frac {e f x^{2} - e f}{\sqrt {a x^{4} + b x^{3} + c x^{2} + b x + a} {\left (a d x^{2} + b d x + a d\right )}} \,d x } \]

[In]

integrate((-e*f*x^2+e*f)/(a*d*x^2+b*d*x+a*d)/(a*x^4+b*x^3+c*x^2+b*x+a)^(1/2),x, algorithm="giac")

[Out]

integrate(-(e*f*x^2 - e*f)/(sqrt(a*x^4 + b*x^3 + c*x^2 + b*x + a)*(a*d*x^2 + b*d*x + a*d)), x)

Mupad [F(-1)]

Timed out. \[ \int \frac {e f-e f x^2}{\left (a d+b d x+a d x^2\right ) \sqrt {a+b x+c x^2+b x^3+a x^4}} \, dx=\int \frac {e\,f-e\,f\,x^2}{\left (a\,d\,x^2+b\,d\,x+a\,d\right )\,\sqrt {a\,x^4+b\,x^3+c\,x^2+b\,x+a}} \,d x \]

[In]

int((e*f - e*f*x^2)/((a*d + b*d*x + a*d*x^2)*(a + b*x + a*x^4 + b*x^3 + c*x^2)^(1/2)),x)

[Out]

int((e*f - e*f*x^2)/((a*d + b*d*x + a*d*x^2)*(a + b*x + a*x^4 + b*x^3 + c*x^2)^(1/2)), x)