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

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [B] (verification not implemented)
Sympy [F]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 41, antiderivative size = 68 \[ \int \frac {e-f x}{(e+f x) \sqrt {d e^2 x+c f^2 x^2+d f^2 x^3}} \, dx=\frac {2 \arctan \left (\frac {\sqrt {f} \sqrt {2 d e-c f} x}{\sqrt {d e^2 x+c f^2 x^2+d f^2 x^3}}\right )}{\sqrt {f} \sqrt {2 d e-c f}} \] Output:

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

Mathematica [A] (verified)

Time = 0.88 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.82 \[ \int \frac {e-f x}{(e+f x) \sqrt {d e^2 x+c f^2 x^2+d f^2 x^3}} \, dx=\frac {2 \sqrt {x} \sqrt {d e^2+c f^2 x+d f^2 x^2} \arctan \left (\frac {\sqrt {f} \sqrt {2 d e-c f} \sqrt {x}}{\sqrt {d e^2+c f^2 x+d f^2 x^2}}\right )}{\sqrt {f} \sqrt {2 d e-c f} \sqrt {x \left (c f^2 x+d \left (e^2+f^2 x^2\right )\right )}} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 1.03 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.84, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.098, Rules used = {2467, 2035, 2212, 218}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {e-f x}{(e+f x) \sqrt {c f^2 x^2+d e^2 x+d f^2 x^3}} \, dx\)

\(\Big \downarrow \) 2467

\(\displaystyle \frac {\sqrt {x} \sqrt {c f^2 x+d e^2+d f^2 x^2} \int \frac {e-f x}{\sqrt {x} (e+f x) \sqrt {d e^2+d f^2 x^2+c f^2 x}}dx}{\sqrt {c f^2 x^2+d e^2 x+d f^2 x^3}}\)

\(\Big \downarrow \) 2035

\(\displaystyle \frac {2 \sqrt {x} \sqrt {c f^2 x+d e^2+d f^2 x^2} \int \frac {e-f x}{(e+f x) \sqrt {d e^2+d f^2 x^2+c f^2 x}}d\sqrt {x}}{\sqrt {c f^2 x^2+d e^2 x+d f^2 x^3}}\)

\(\Big \downarrow \) 2212

\(\displaystyle \frac {2 e \sqrt {x} \sqrt {c f^2 x+d e^2+d f^2 x^2} \int \frac {1}{f (2 d e-c f) x e+e}d\frac {\sqrt {x}}{\sqrt {d e^2+d f^2 x^2+c f^2 x}}}{\sqrt {c f^2 x^2+d e^2 x+d f^2 x^3}}\)

\(\Big \downarrow \) 218

\(\displaystyle \frac {2 \sqrt {x} \sqrt {c f^2 x+d e^2+d f^2 x^2} \arctan \left (\frac {\sqrt {f} \sqrt {x} \sqrt {2 d e-c f}}{\sqrt {c f^2 x+d e^2+d f^2 x^2}}\right )}{\sqrt {f} \sqrt {2 d e-c f} \sqrt {c f^2 x^2+d e^2 x+d f^2 x^3}}\)

Input:

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

Output:

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

Defintions of rubi rules used

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

rule 2035
Int[(Fx_)*(x_)^(m_), x_Symbol] :> With[{k = Denominator[m]}, Simp[k   Subst 
[Int[x^(k*(m + 1) - 1)*SubstPower[Fx, x, k], x], x, x^(1/k)], x]] /; Fracti 
onQ[m] && AlgebraicFunctionQ[Fx, x]
 

rule 2212
Int[((A_) + (B_.)*(x_)^2)/(((d_) + (e_.)*(x_)^2)*Sqrt[(a_) + (b_.)*(x_)^2 + 
 (c_.)*(x_)^4]), x_Symbol] :> Simp[A   Subst[Int[1/(d - (b*d - 2*a*e)*x^2), 
 x], x, x/Sqrt[a + b*x^2 + c*x^4]], x] /; FreeQ[{a, b, c, d, e, A, B}, x] & 
& EqQ[c*d^2 - a*e^2, 0] && EqQ[B*d + A*e, 0]
 

rule 2467
Int[(Fx_.)*(Px_)^(p_), x_Symbol] :> With[{r = Expon[Px, x, Min]}, Simp[Px^F 
racPart[p]/(x^(r*FracPart[p])*ExpandToSum[Px/x^r, x]^FracPart[p])   Int[x^( 
p*r)*ExpandToSum[Px/x^r, x]^p*Fx, x], x] /; IGtQ[r, 0]] /; FreeQ[p, x] && P 
olyQ[Px, x] &&  !IntegerQ[p] &&  !MonomialQ[Px, x] &&  !PolyQ[Fx, x]
 
Maple [A] (verified)

Time = 1.56 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.85

method result size
default \(-\frac {2 \arctan \left (\frac {\sqrt {x \left (d \,f^{2} x^{2}+c \,f^{2} x +d \,e^{2}\right )}}{x \sqrt {-f \left (c f -2 d e \right )}}\right )}{\sqrt {-f \left (c f -2 d e \right )}}\) \(58\)
pseudoelliptic \(-\frac {2 \arctan \left (\frac {\sqrt {x \left (d \,f^{2} x^{2}+c \,f^{2} x +d \,e^{2}\right )}}{x \sqrt {-f \left (c f -2 d e \right )}}\right )}{\sqrt {-f \left (c f -2 d e \right )}}\) \(58\)
elliptic \(-\frac {\left (c f +\sqrt {c^{2} f^{2}-4 e^{2} d^{2}}\right ) \sqrt {2}\, \sqrt {\frac {\left (x +\frac {c f +\sqrt {c^{2} f^{2}-4 e^{2} d^{2}}}{2 d f}\right ) d f}{c f +\sqrt {c^{2} f^{2}-4 e^{2} d^{2}}}}\, \sqrt {\frac {x -\frac {-c f +\sqrt {c^{2} f^{2}-4 e^{2} d^{2}}}{2 d f}}{-\frac {c f +\sqrt {c^{2} f^{2}-4 e^{2} d^{2}}}{2 d f}-\frac {-c f +\sqrt {c^{2} f^{2}-4 e^{2} d^{2}}}{2 d f}}}\, \sqrt {-\frac {2 d f x}{c f +\sqrt {c^{2} f^{2}-4 e^{2} d^{2}}}}\, \operatorname {EllipticF}\left (\sqrt {2}\, \sqrt {\frac {\left (x +\frac {c f +\sqrt {c^{2} f^{2}-4 e^{2} d^{2}}}{2 d f}\right ) d f}{c f +\sqrt {c^{2} f^{2}-4 e^{2} d^{2}}}}, \frac {\sqrt {-\frac {2 \left (c f +\sqrt {c^{2} f^{2}-4 e^{2} d^{2}}\right )}{d f \left (-\frac {c f +\sqrt {c^{2} f^{2}-4 e^{2} d^{2}}}{2 d f}-\frac {-c f +\sqrt {c^{2} f^{2}-4 e^{2} d^{2}}}{2 d f}\right )}}}{2}\right )}{d f \sqrt {d \,f^{2} x^{3}+c \,f^{2} x^{2}+d \,e^{2} x}}+\frac {2 e \left (c f +\sqrt {c^{2} f^{2}-4 e^{2} d^{2}}\right ) \sqrt {2}\, \sqrt {\frac {\left (x +\frac {c f +\sqrt {c^{2} f^{2}-4 e^{2} d^{2}}}{2 d f}\right ) d f}{c f +\sqrt {c^{2} f^{2}-4 e^{2} d^{2}}}}\, \sqrt {\frac {x -\frac {-c f +\sqrt {c^{2} f^{2}-4 e^{2} d^{2}}}{2 d f}}{-\frac {c f +\sqrt {c^{2} f^{2}-4 e^{2} d^{2}}}{2 d f}-\frac {-c f +\sqrt {c^{2} f^{2}-4 e^{2} d^{2}}}{2 d f}}}\, \sqrt {-\frac {2 d f x}{c f +\sqrt {c^{2} f^{2}-4 e^{2} d^{2}}}}\, \operatorname {EllipticPi}\left (\sqrt {2}\, \sqrt {\frac {\left (x +\frac {c f +\sqrt {c^{2} f^{2}-4 e^{2} d^{2}}}{2 d f}\right ) d f}{c f +\sqrt {c^{2} f^{2}-4 e^{2} d^{2}}}}, -\frac {c f +\sqrt {c^{2} f^{2}-4 e^{2} d^{2}}}{2 d f \left (-\frac {c f +\sqrt {c^{2} f^{2}-4 e^{2} d^{2}}}{2 d f}+\frac {e}{f}\right )}, \frac {\sqrt {-\frac {2 \left (c f +\sqrt {c^{2} f^{2}-4 e^{2} d^{2}}\right )}{d f \left (-\frac {c f +\sqrt {c^{2} f^{2}-4 e^{2} d^{2}}}{2 d f}-\frac {-c f +\sqrt {c^{2} f^{2}-4 e^{2} d^{2}}}{2 d f}\right )}}}{2}\right )}{f^{2} d \sqrt {d \,f^{2} x^{3}+c \,f^{2} x^{2}+d \,e^{2} x}\, \left (-\frac {c f +\sqrt {c^{2} f^{2}-4 e^{2} d^{2}}}{2 d f}+\frac {e}{f}\right )}\) \(937\)

Input:

int((-f*x+e)/(f*x+e)/(d*f^2*x^3+c*f^2*x^2+d*e^2*x)^(1/2),x,method=_RETURNV 
ERBOSE)
 

Output:

-2/(-f*(c*f-2*d*e))^(1/2)*arctan((x*(d*f^2*x^2+c*f^2*x+d*e^2))^(1/2)/x/(-f 
*(c*f-2*d*e))^(1/2))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 152 vs. \(2 (58) = 116\).

Time = 0.15 (sec) , antiderivative size = 388, normalized size of antiderivative = 5.71 \[ \int \frac {e-f x}{(e+f x) \sqrt {d e^2 x+c f^2 x^2+d f^2 x^3}} \, dx=\left [-\frac {\sqrt {-2 \, d e f + c f^{2}} \log \left (\frac {d^{2} f^{4} x^{4} + d^{2} e^{4} - 4 \, {\left (3 \, d^{2} e f^{3} - 2 \, c d f^{4}\right )} x^{3} + 2 \, {\left (3 \, d^{2} e^{2} f^{2} - 8 \, c d e f^{3} + 4 \, c^{2} f^{4}\right )} x^{2} + 4 \, \sqrt {d f^{2} x^{3} + c f^{2} x^{2} + d e^{2} x} {\left (d f^{2} x^{2} + d e^{2} - 2 \, {\left (d e f - c f^{2}\right )} x\right )} \sqrt {-2 \, d e f + c f^{2}} - 4 \, {\left (3 \, d^{2} e^{3} f - 2 \, c d e^{2} f^{2}\right )} x}{f^{4} x^{4} + 4 \, e f^{3} x^{3} + 6 \, e^{2} f^{2} x^{2} + 4 \, e^{3} f x + e^{4}}\right )}{2 \, {\left (2 \, d e f - c f^{2}\right )}}, \frac {\arctan \left (-\frac {\sqrt {d f^{2} x^{3} + c f^{2} x^{2} + d e^{2} x} {\left (d f^{2} x^{2} + d e^{2} - 2 \, {\left (d e f - c f^{2}\right )} x\right )} \sqrt {2 \, d e f - c f^{2}}}{2 \, {\left ({\left (2 \, d^{2} e f^{3} - c d f^{4}\right )} x^{3} + {\left (2 \, c d e f^{3} - c^{2} f^{4}\right )} x^{2} + {\left (2 \, d^{2} e^{3} f - c d e^{2} f^{2}\right )} x\right )}}\right )}{\sqrt {2 \, d e f - c f^{2}}}\right ] \] Input:

integrate((-f*x+e)/(f*x+e)/(d*f^2*x^3+c*f^2*x^2+d*e^2*x)^(1/2),x, algorith 
m="fricas")
 

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [F]

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

integrate((-f*x+e)/(f*x+e)/(d*f^2*x^3+c*f^2*x^2+d*e^2*x)^(1/2),x, algorith 
m="maxima")
 

Output:

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

Giac [F]

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

integrate((-f*x+e)/(f*x+e)/(d*f^2*x^3+c*f^2*x^2+d*e^2*x)^(1/2),x, algorith 
m="giac")
 

Output:

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

Mupad [F(-1)]

Timed out. \[ \int \frac {e-f x}{(e+f x) \sqrt {d e^2 x+c f^2 x^2+d f^2 x^3}} \, dx=\text {Hanged} \] Input:

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

Output:

\text{Hanged}
 

Reduce [F]

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

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

Output:

int((sqrt(x)*sqrt(c*f**2*x + d*e**2 + d*f**2*x**2))/(c*e*f**2*x**2 + c*f** 
3*x**3 + d*e**3*x + d*e**2*f*x**2 + d*e*f**2*x**3 + d*f**3*x**4),x)*e - in 
t((sqrt(x)*sqrt(c*f**2*x + d*e**2 + d*f**2*x**2))/(c*e*f**2*x + c*f**3*x** 
2 + d*e**3 + d*e**2*f*x + d*e*f**2*x**2 + d*f**3*x**3),x)*f