3.5.57 \(\int \frac {1}{d+e x+f \sqrt {a+\frac {e^2 x^2}{f^2}}} \, dx\) [457]

3.5.57.1 Optimal result
3.5.57.2 Mathematica [B] (verified)
3.5.57.3 Rubi [A] (verified)
3.5.57.4 Maple [B] (verified)
3.5.57.5 Fricas [A] (verification not implemented)
3.5.57.6 Sympy [F]
3.5.57.7 Maxima [F]
3.5.57.8 Giac [B] (verification not implemented)
3.5.57.9 Mupad [F(-1)]

3.5.57.1 Optimal result

Integrand size = 25, antiderivative size = 117 \[ \int \frac {1}{d+e x+f \sqrt {a+\frac {e^2 x^2}{f^2}}} \, dx=-\frac {a f^2}{2 d e \left (e x+f \sqrt {a+\frac {e^2 x^2}{f^2}}\right )}-\frac {a f^2 \log \left (e x+f \sqrt {a+\frac {e^2 x^2}{f^2}}\right )}{2 d^2 e}+\frac {\left (1+\frac {a f^2}{d^2}\right ) \log \left (d+e x+f \sqrt {a+\frac {e^2 x^2}{f^2}}\right )}{2 e} \]

output
-1/2*a*f^2*ln(e*x+f*(a+e^2*x^2/f^2)^(1/2))/d^2/e+1/2*(1+a*f^2/d^2)*ln(d+e* 
x+f*(a+e^2*x^2/f^2)^(1/2))/e-1/2*a*f^2/d/e/(e*x+f*(a+e^2*x^2/f^2)^(1/2))
 
3.5.57.2 Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(337\) vs. \(2(117)=234\).

Time = 0.86 (sec) , antiderivative size = 337, normalized size of antiderivative = 2.88 \[ \int \frac {1}{d+e x+f \sqrt {a+\frac {e^2 x^2}{f^2}}} \, dx=\frac {2 d e^2 x-2 d e f \sqrt {a+\frac {e^2 x^2}{f^2}}-\left (a f^2 \left (e-\sqrt {\frac {e^2}{f^2}} f\right )+d^2 \left (e+\sqrt {\frac {e^2}{f^2}} f\right )\right ) \log \left (-\sqrt {\frac {e^2}{f^2}} x+\sqrt {a+\frac {e^2 x^2}{f^2}}\right )+\sqrt {\frac {e^2}{f^2}} f \left (d^2+a f^2\right ) \log \left (a f+d \left (-\sqrt {\frac {e^2}{f^2}} x+\sqrt {a+\frac {e^2 x^2}{f^2}}\right )\right )+e \left (d^2+a f^2\right ) \log \left (d e \left (a f+d \left (-\sqrt {\frac {e^2}{f^2}} x+\sqrt {a+\frac {e^2 x^2}{f^2}}\right )\right )\right )-\sqrt {\frac {e^2}{f^2}} f \left (d^2+a f^2\right ) \log \left (d+f \left (-\sqrt {\frac {e^2}{f^2}} x+\sqrt {a+\frac {e^2 x^2}{f^2}}\right )\right )+e \left (d^2+a f^2\right ) \log \left (d^2 e \left (d+f \left (-\sqrt {\frac {e^2}{f^2}} x+\sqrt {a+\frac {e^2 x^2}{f^2}}\right )\right )\right )}{4 d^2 e^2} \]

input
Integrate[(d + e*x + f*Sqrt[a + (e^2*x^2)/f^2])^(-1),x]
 
output
(2*d*e^2*x - 2*d*e*f*Sqrt[a + (e^2*x^2)/f^2] - (a*f^2*(e - Sqrt[e^2/f^2]*f 
) + d^2*(e + Sqrt[e^2/f^2]*f))*Log[-(Sqrt[e^2/f^2]*x) + Sqrt[a + (e^2*x^2) 
/f^2]] + Sqrt[e^2/f^2]*f*(d^2 + a*f^2)*Log[a*f + d*(-(Sqrt[e^2/f^2]*x) + S 
qrt[a + (e^2*x^2)/f^2])] + e*(d^2 + a*f^2)*Log[d*e*(a*f + d*(-(Sqrt[e^2/f^ 
2]*x) + Sqrt[a + (e^2*x^2)/f^2]))] - Sqrt[e^2/f^2]*f*(d^2 + a*f^2)*Log[d + 
 f*(-(Sqrt[e^2/f^2]*x) + Sqrt[a + (e^2*x^2)/f^2])] + e*(d^2 + a*f^2)*Log[d 
^2*e*(d + f*(-(Sqrt[e^2/f^2]*x) + Sqrt[a + (e^2*x^2)/f^2]))])/(4*d^2*e^2)
 
3.5.57.3 Rubi [A] (verified)

Time = 0.28 (sec) , antiderivative size = 111, normalized size of antiderivative = 0.95, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {2542, 1195, 2009}

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 {1}{f \sqrt {a+\frac {e^2 x^2}{f^2}}+d+e x} \, dx\)

\(\Big \downarrow \) 2542

\(\displaystyle \frac {\int \frac {d^2-2 \left (d+e x+f \sqrt {\frac {e^2 x^2}{f^2}+a}\right ) d+a f^2+\left (d+e x+f \sqrt {\frac {e^2 x^2}{f^2}+a}\right )^2}{\left (-\sqrt {\frac {e^2 x^2}{f^2}+a} f-e x\right )^2 \left (d+e x+f \sqrt {\frac {e^2 x^2}{f^2}+a}\right )}d\left (d+e x+f \sqrt {\frac {e^2 x^2}{f^2}+a}\right )}{2 e}\)

\(\Big \downarrow \) 1195

\(\displaystyle \frac {\int \left (\frac {a f^2}{d^2 \left (-\sqrt {\frac {e^2 x^2}{f^2}+a} f-e x\right )}+\frac {a f^2}{d \left (-\sqrt {\frac {e^2 x^2}{f^2}+a} f-e x\right )^2}+\frac {d^2+a f^2}{d^2 \left (d+e x+f \sqrt {\frac {e^2 x^2}{f^2}+a}\right )}\right )d\left (d+e x+f \sqrt {\frac {e^2 x^2}{f^2}+a}\right )}{2 e}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {-\frac {a f^2 \log \left (f \left (-\sqrt {a+\frac {e^2 x^2}{f^2}}\right )-e x\right )}{d^2}+\left (\frac {a f^2}{d^2}+1\right ) \log \left (f \sqrt {a+\frac {e^2 x^2}{f^2}}+d+e x\right )+\frac {a f^2}{d \left (f \left (-\sqrt {a+\frac {e^2 x^2}{f^2}}\right )-e x\right )}}{2 e}\)

input
Int[(d + e*x + f*Sqrt[a + (e^2*x^2)/f^2])^(-1),x]
 
output
((a*f^2)/(d*(-(e*x) - f*Sqrt[a + (e^2*x^2)/f^2])) - (a*f^2*Log[-(e*x) - f* 
Sqrt[a + (e^2*x^2)/f^2]])/d^2 + (1 + (a*f^2)/d^2)*Log[d + e*x + f*Sqrt[a + 
 (e^2*x^2)/f^2]])/(2*e)
 

3.5.57.3.1 Defintions of rubi rules used

rule 1195
Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))^(n_.)*((a_.) + (b_.)*(x 
_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*(f + 
 g*x)^n*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, n}, x 
] && IGtQ[p, 0]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2542
Int[((g_.) + (h_.)*((d_.) + (e_.)*(x_) + (f_.)*Sqrt[(a_) + (c_.)*(x_)^2])^( 
n_))^(p_.), x_Symbol] :> Simp[1/(2*e)   Subst[Int[(g + h*x^n)^p*((d^2 + a*f 
^2 - 2*d*x + x^2)/(d - x)^2), x], x, d + e*x + f*Sqrt[a + c*x^2]], x] /; Fr 
eeQ[{a, c, d, e, f, g, h, n}, x] && EqQ[e^2 - c*f^2, 0] && IntegerQ[p]
 
3.5.57.4 Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(650\) vs. \(2(105)=210\).

Time = 0.06 (sec) , antiderivative size = 651, normalized size of antiderivative = 5.56

method result size
default \(-\frac {f \left (\frac {\sqrt {\frac {4 e^{2} \left (x +\frac {-a \,f^{2}+d^{2}}{2 e d}\right )^{2}}{f^{2}}+\frac {4 e \left (a \,f^{2}-d^{2}\right ) \left (x +\frac {-a \,f^{2}+d^{2}}{2 e d}\right )}{d \,f^{2}}+\frac {a^{2} f^{4}+2 a \,d^{2} f^{2}+d^{4}}{d^{2} f^{2}}}}{2}+\frac {e \left (a \,f^{2}-d^{2}\right ) \ln \left (\frac {\frac {e \left (a \,f^{2}-d^{2}\right )}{2 d \,f^{2}}+\frac {e^{2} \left (x +\frac {-a \,f^{2}+d^{2}}{2 e d}\right )}{f^{2}}}{\sqrt {\frac {e^{2}}{f^{2}}}}+\sqrt {\frac {e^{2} \left (x +\frac {-a \,f^{2}+d^{2}}{2 e d}\right )^{2}}{f^{2}}+\frac {e \left (a \,f^{2}-d^{2}\right ) \left (x +\frac {-a \,f^{2}+d^{2}}{2 e d}\right )}{d \,f^{2}}+\frac {a^{2} f^{4}+2 a \,d^{2} f^{2}+d^{4}}{4 d^{2} f^{2}}}\right )}{2 d \,f^{2} \sqrt {\frac {e^{2}}{f^{2}}}}-\frac {\left (a^{2} f^{4}+2 a \,d^{2} f^{2}+d^{4}\right ) \ln \left (\frac {\frac {a^{2} f^{4}+2 a \,d^{2} f^{2}+d^{4}}{2 d^{2} f^{2}}+\frac {e \left (a \,f^{2}-d^{2}\right ) \left (x +\frac {-a \,f^{2}+d^{2}}{2 e d}\right )}{d \,f^{2}}+\frac {\sqrt {\frac {a^{2} f^{4}+2 a \,d^{2} f^{2}+d^{4}}{d^{2} f^{2}}}\, \sqrt {\frac {4 e^{2} \left (x +\frac {-a \,f^{2}+d^{2}}{2 e d}\right )^{2}}{f^{2}}+\frac {4 e \left (a \,f^{2}-d^{2}\right ) \left (x +\frac {-a \,f^{2}+d^{2}}{2 e d}\right )}{d \,f^{2}}+\frac {a^{2} f^{4}+2 a \,d^{2} f^{2}+d^{4}}{d^{2} f^{2}}}}{2}}{x +\frac {-a \,f^{2}+d^{2}}{2 e d}}\right )}{2 d^{2} f^{2} \sqrt {\frac {a^{2} f^{4}+2 a \,d^{2} f^{2}+d^{4}}{d^{2} f^{2}}}}\right )}{2 e d}+\frac {\ln \left (a \,f^{2}-2 e d x -d^{2}\right )}{2 e}-e \left (-\frac {x}{2 e d}+\frac {\left (-a \,f^{2}+d^{2}\right ) \ln \left (-a \,f^{2}+2 e d x +d^{2}\right )}{4 e^{2} d^{2}}\right )\) \(651\)

input
int(1/(d+e*x+f*(a+e^2*x^2/f^2)^(1/2)),x,method=_RETURNVERBOSE)
 
output
-1/2*f/e/d*(1/2*(4*e^2*(x+1/2*(-a*f^2+d^2)/e/d)^2/f^2+4*e*(a*f^2-d^2)/d/f^ 
2*(x+1/2*(-a*f^2+d^2)/e/d)+(a^2*f^4+2*a*d^2*f^2+d^4)/d^2/f^2)^(1/2)+1/2*e* 
(a*f^2-d^2)/d/f^2*ln((1/2*e*(a*f^2-d^2)/d/f^2+e^2/f^2*(x+1/2*(-a*f^2+d^2)/ 
e/d))/(e^2/f^2)^(1/2)+(e^2*(x+1/2*(-a*f^2+d^2)/e/d)^2/f^2+e*(a*f^2-d^2)/d/ 
f^2*(x+1/2*(-a*f^2+d^2)/e/d)+1/4*(a^2*f^4+2*a*d^2*f^2+d^4)/d^2/f^2)^(1/2)) 
/(e^2/f^2)^(1/2)-1/2*(a^2*f^4+2*a*d^2*f^2+d^4)/d^2/f^2/((a^2*f^4+2*a*d^2*f 
^2+d^4)/d^2/f^2)^(1/2)*ln((1/2*(a^2*f^4+2*a*d^2*f^2+d^4)/d^2/f^2+e*(a*f^2- 
d^2)/d/f^2*(x+1/2*(-a*f^2+d^2)/e/d)+1/2*((a^2*f^4+2*a*d^2*f^2+d^4)/d^2/f^2 
)^(1/2)*(4*e^2*(x+1/2*(-a*f^2+d^2)/e/d)^2/f^2+4*e*(a*f^2-d^2)/d/f^2*(x+1/2 
*(-a*f^2+d^2)/e/d)+(a^2*f^4+2*a*d^2*f^2+d^4)/d^2/f^2)^(1/2))/(x+1/2*(-a*f^ 
2+d^2)/e/d)))+1/2*ln(a*f^2-2*d*e*x-d^2)/e-e*(-1/2/e/d*x+1/4*(-a*f^2+d^2)/e 
^2/d^2*ln(-a*f^2+2*d*e*x+d^2))
 
3.5.57.5 Fricas [A] (verification not implemented)

Time = 0.36 (sec) , antiderivative size = 187, normalized size of antiderivative = 1.60 \[ \int \frac {1}{d+e x+f \sqrt {a+\frac {e^2 x^2}{f^2}}} \, dx=\frac {2 \, d e x - 2 \, d f \sqrt {\frac {e^{2} x^{2} + a f^{2}}{f^{2}}} + {\left (a f^{2} + d^{2}\right )} \log \left (a f^{2} - d e x + d f \sqrt {\frac {e^{2} x^{2} + a f^{2}}{f^{2}}}\right ) + {\left (a f^{2} + d^{2}\right )} \log \left (-a f^{2} + 2 \, d e x + d^{2}\right ) - {\left (a f^{2} + d^{2}\right )} \log \left (-e x + f \sqrt {\frac {e^{2} x^{2} + a f^{2}}{f^{2}}} - d\right ) + {\left (a f^{2} - d^{2}\right )} \log \left (-e x + f \sqrt {\frac {e^{2} x^{2} + a f^{2}}{f^{2}}}\right )}{4 \, d^{2} e} \]

input
integrate(1/(d+e*x+f*(a+e^2*x^2/f^2)^(1/2)),x, algorithm="fricas")
 
output
1/4*(2*d*e*x - 2*d*f*sqrt((e^2*x^2 + a*f^2)/f^2) + (a*f^2 + d^2)*log(a*f^2 
 - d*e*x + d*f*sqrt((e^2*x^2 + a*f^2)/f^2)) + (a*f^2 + d^2)*log(-a*f^2 + 2 
*d*e*x + d^2) - (a*f^2 + d^2)*log(-e*x + f*sqrt((e^2*x^2 + a*f^2)/f^2) - d 
) + (a*f^2 - d^2)*log(-e*x + f*sqrt((e^2*x^2 + a*f^2)/f^2)))/(d^2*e)
 
3.5.57.6 Sympy [F]

\[ \int \frac {1}{d+e x+f \sqrt {a+\frac {e^2 x^2}{f^2}}} \, dx=\int \frac {1}{d + e x + f \sqrt {a + \frac {e^{2} x^{2}}{f^{2}}}}\, dx \]

input
integrate(1/(d+e*x+f*(a+e**2*x**2/f**2)**(1/2)),x)
 
output
Integral(1/(d + e*x + f*sqrt(a + e**2*x**2/f**2)), x)
 
3.5.57.7 Maxima [F]

\[ \int \frac {1}{d+e x+f \sqrt {a+\frac {e^2 x^2}{f^2}}} \, dx=\int { \frac {1}{e x + \sqrt {\frac {e^{2} x^{2}}{f^{2}} + a} f + d} \,d x } \]

input
integrate(1/(d+e*x+f*(a+e^2*x^2/f^2)^(1/2)),x, algorithm="maxima")
 
output
integrate(1/(e*x + sqrt(e^2*x^2/f^2 + a)*f + d), x)
 
3.5.57.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 299 vs. \(2 (105) = 210\).

Time = 0.50 (sec) , antiderivative size = 299, normalized size of antiderivative = 2.56 \[ \int \frac {1}{d+e x+f \sqrt {a+\frac {e^2 x^2}{f^2}}} \, dx=\frac {x}{2 \, d} + \frac {{\left (a f^{2} + d^{2}\right )} \log \left ({\left | -a f^{2} + 2 \, d e x + d^{2} \right |}\right )}{4 \, d^{2} e} - \frac {\sqrt {e^{2} x^{2} + a f^{2}} {\left | f \right |}}{2 \, d e f} + \frac {{\left (a f^{2} {\left | f \right |} - d^{2} {\left | f \right |}\right )} \log \left ({\left | -x {\left | e \right |} + \sqrt {e^{2} x^{2} + a f^{2}} \right |}\right )}{4 \, d^{2} f {\left | e \right |}} - \frac {{\left (a^{2} e^{2} f^{4} {\left | f \right |} + 2 \, a d^{2} e^{2} f^{2} {\left | f \right |} + d^{4} e^{2} {\left | f \right |}\right )} \log \left (\frac {{\left | a e f^{2} - d^{2} e - 2 \, {\left (x {\left | e \right |} - \sqrt {e^{2} x^{2} + a f^{2}}\right )} d {\left | e \right |} - {\left | a e f^{2} + d^{2} e \right |} \right |}}{{\left | a e f^{2} - d^{2} e - 2 \, {\left (x {\left | e \right |} - \sqrt {e^{2} x^{2} + a f^{2}}\right )} d {\left | e \right |} + {\left | a e f^{2} + d^{2} e \right |} \right |}}\right )}{4 \, d^{2} e f {\left | a e f^{2} + d^{2} e \right |} {\left | e \right |}} \]

input
integrate(1/(d+e*x+f*(a+e^2*x^2/f^2)^(1/2)),x, algorithm="giac")
 
output
1/2*x/d + 1/4*(a*f^2 + d^2)*log(abs(-a*f^2 + 2*d*e*x + d^2))/(d^2*e) - 1/2 
*sqrt(e^2*x^2 + a*f^2)*abs(f)/(d*e*f) + 1/4*(a*f^2*abs(f) - d^2*abs(f))*lo 
g(abs(-x*abs(e) + sqrt(e^2*x^2 + a*f^2)))/(d^2*f*abs(e)) - 1/4*(a^2*e^2*f^ 
4*abs(f) + 2*a*d^2*e^2*f^2*abs(f) + d^4*e^2*abs(f))*log(abs(a*e*f^2 - d^2* 
e - 2*(x*abs(e) - sqrt(e^2*x^2 + a*f^2))*d*abs(e) - abs(a*e*f^2 + d^2*e))/ 
abs(a*e*f^2 - d^2*e - 2*(x*abs(e) - sqrt(e^2*x^2 + a*f^2))*d*abs(e) + abs( 
a*e*f^2 + d^2*e)))/(d^2*e*f*abs(a*e*f^2 + d^2*e)*abs(e))
 
3.5.57.9 Mupad [F(-1)]

Timed out. \[ \int \frac {1}{d+e x+f \sqrt {a+\frac {e^2 x^2}{f^2}}} \, dx=\int \frac {1}{d+e\,x+f\,\sqrt {a+\frac {e^2\,x^2}{f^2}}} \,d x \]

input
int(1/(d + e*x + f*(a + (e^2*x^2)/f^2)^(1/2)),x)
 
output
int(1/(d + e*x + f*(a + (e^2*x^2)/f^2)^(1/2)), x)