\(\int \frac {(a+b \log (c (d+\frac {e}{\sqrt {x}})^n))^2}{x^2} \, dx\) [433]

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

Optimal result

Integrand size = 24, antiderivative size = 195 \[ \int \frac {\left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2}{x^2} \, dx=-\frac {b^2 n^2 \left (d+\frac {e}{\sqrt {x}}\right )^2}{2 e^2}-\frac {4 a b d n}{e \sqrt {x}}+\frac {4 b^2 d n^2}{e \sqrt {x}}-\frac {4 b^2 d n \left (d+\frac {e}{\sqrt {x}}\right ) \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )}{e^2}+\frac {b n \left (d+\frac {e}{\sqrt {x}}\right )^2 \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )}{e^2}+\frac {2 d \left (d+\frac {e}{\sqrt {x}}\right ) \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2}{e^2}-\frac {\left (d+\frac {e}{\sqrt {x}}\right )^2 \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2}{e^2} \] Output:

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

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.

Time = 0.31 (sec) , antiderivative size = 298, normalized size of antiderivative = 1.53 \[ \int \frac {\left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2}{x^2} \, dx=-\frac {2 \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2+\frac {b n \left (4 a d e \sqrt {x}-4 b d e n \sqrt {x}+b n \left (e \left (e-2 d \sqrt {x}\right )+2 d^2 x \log \left (d+\frac {e}{\sqrt {x}}\right )\right )+4 b d \left (e+d \sqrt {x}\right ) \sqrt {x} \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )-2 e^2 \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )-4 d^2 x \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right ) \log \left (e+d \sqrt {x}\right )-4 d^2 x \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right ) \log \left (-\frac {e}{d \sqrt {x}}\right )-4 b d^2 n x \operatorname {PolyLog}\left (2,1+\frac {e}{d \sqrt {x}}\right )+2 b d^2 n x \left (\log \left (e+d \sqrt {x}\right ) \left (\log \left (e+d \sqrt {x}\right )-2 \log \left (-\frac {d \sqrt {x}}{e}\right )\right )-2 \operatorname {PolyLog}\left (2,1+\frac {d \sqrt {x}}{e}\right )\right )\right )}{e^2}}{2 x} \] Input:

Integrate[(a + b*Log[c*(d + e/Sqrt[x])^n])^2/x^2,x]
 

Output:

-1/2*(2*(a + b*Log[c*(d + e/Sqrt[x])^n])^2 + (b*n*(4*a*d*e*Sqrt[x] - 4*b*d 
*e*n*Sqrt[x] + b*n*(e*(e - 2*d*Sqrt[x]) + 2*d^2*x*Log[d + e/Sqrt[x]]) + 4* 
b*d*(e + d*Sqrt[x])*Sqrt[x]*Log[c*(d + e/Sqrt[x])^n] - 2*e^2*(a + b*Log[c* 
(d + e/Sqrt[x])^n]) - 4*d^2*x*(a + b*Log[c*(d + e/Sqrt[x])^n])*Log[e + d*S 
qrt[x]] - 4*d^2*x*(a + b*Log[c*(d + e/Sqrt[x])^n])*Log[-(e/(d*Sqrt[x]))] - 
 4*b*d^2*n*x*PolyLog[2, 1 + e/(d*Sqrt[x])] + 2*b*d^2*n*x*(Log[e + d*Sqrt[x 
]]*(Log[e + d*Sqrt[x]] - 2*Log[-((d*Sqrt[x])/e)]) - 2*PolyLog[2, 1 + (d*Sq 
rt[x])/e])))/e^2)/x
 

Rubi [A] (verified)

Time = 0.72 (sec) , antiderivative size = 202, normalized size of antiderivative = 1.04, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {2904, 2848, 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 {\left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2}{x^2} \, dx\)

\(\Big \downarrow \) 2904

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

\(\Big \downarrow \) 2848

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

\(\Big \downarrow \) 2009

\(\displaystyle -2 \left (-\frac {b n \left (d+\frac {e}{\sqrt {x}}\right )^2 \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )}{2 e^2}+\frac {\left (d+\frac {e}{\sqrt {x}}\right )^2 \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2}{2 e^2}-\frac {d \left (d+\frac {e}{\sqrt {x}}\right ) \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2}{e^2}+\frac {2 a b d n}{e \sqrt {x}}+\frac {2 b^2 d n \left (d+\frac {e}{\sqrt {x}}\right ) \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )}{e^2}+\frac {b^2 n^2 \left (d+\frac {e}{\sqrt {x}}\right )^2}{4 e^2}-\frac {2 b^2 d n^2}{e \sqrt {x}}\right )\)

Input:

Int[(a + b*Log[c*(d + e/Sqrt[x])^n])^2/x^2,x]
 

Output:

-2*((b^2*n^2*(d + e/Sqrt[x])^2)/(4*e^2) + (2*a*b*d*n)/(e*Sqrt[x]) - (2*b^2 
*d*n^2)/(e*Sqrt[x]) + (2*b^2*d*n*(d + e/Sqrt[x])*Log[c*(d + e/Sqrt[x])^n]) 
/e^2 - (b*n*(d + e/Sqrt[x])^2*(a + b*Log[c*(d + e/Sqrt[x])^n]))/(2*e^2) - 
(d*(d + e/Sqrt[x])*(a + b*Log[c*(d + e/Sqrt[x])^n])^2)/e^2 + ((d + e/Sqrt[ 
x])^2*(a + b*Log[c*(d + e/Sqrt[x])^n])^2)/(2*e^2))
 

Defintions of rubi rules used

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

rule 2848
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)*((f_.) + (g_. 
)*(x_))^(q_.), x_Symbol] :> Int[ExpandIntegrand[(f + g*x)^q*(a + b*Log[c*(d 
 + e*x)^n])^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && NeQ[e*f - 
 d*g, 0] && IGtQ[q, 0]
 

rule 2904
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m 
_.), x_Symbol] :> Simp[1/n   Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a + b*L 
og[c*(d + e*x)^p])^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, e, m, n, p, q}, 
 x] && IntegerQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0] || IGtQ[q, 0]) & 
&  !(EqQ[q, 1] && ILtQ[n, 0] && IGtQ[m, 0])
 
Maple [F]

\[\int \frac {{\left (a +b \ln \left (c \left (d +\frac {e}{\sqrt {x}}\right )^{n}\right )\right )}^{2}}{x^{2}}d x\]

Input:

int((a+b*ln(c*(d+e/x^(1/2))^n))^2/x^2,x)
 

Output:

int((a+b*ln(c*(d+e/x^(1/2))^n))^2/x^2,x)
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 235, normalized size of antiderivative = 1.21 \[ \int \frac {\left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2}{x^2} \, dx=-\frac {b^{2} e^{2} n^{2} + 2 \, b^{2} e^{2} \log \left (c\right )^{2} - 2 \, a b e^{2} n + 2 \, a^{2} e^{2} - 2 \, {\left (b^{2} d^{2} n^{2} x - b^{2} e^{2} n^{2}\right )} \log \left (\frac {d x + e \sqrt {x}}{x}\right )^{2} - 2 \, {\left (b^{2} e^{2} n - 2 \, a b e^{2}\right )} \log \left (c\right ) + 2 \, {\left (2 \, b^{2} d e n^{2} \sqrt {x} - b^{2} e^{2} n^{2} + 2 \, a b e^{2} n + {\left (3 \, b^{2} d^{2} n^{2} - 2 \, a b d^{2} n\right )} x - 2 \, {\left (b^{2} d^{2} n x - b^{2} e^{2} n\right )} \log \left (c\right )\right )} \log \left (\frac {d x + e \sqrt {x}}{x}\right ) - 2 \, {\left (3 \, b^{2} d e n^{2} - 2 \, b^{2} d e n \log \left (c\right ) - 2 \, a b d e n\right )} \sqrt {x}}{2 \, e^{2} x} \] Input:

integrate((a+b*log(c*(d+e/x^(1/2))^n))^2/x^2,x, algorithm="fricas")
 

Output:

-1/2*(b^2*e^2*n^2 + 2*b^2*e^2*log(c)^2 - 2*a*b*e^2*n + 2*a^2*e^2 - 2*(b^2* 
d^2*n^2*x - b^2*e^2*n^2)*log((d*x + e*sqrt(x))/x)^2 - 2*(b^2*e^2*n - 2*a*b 
*e^2)*log(c) + 2*(2*b^2*d*e*n^2*sqrt(x) - b^2*e^2*n^2 + 2*a*b*e^2*n + (3*b 
^2*d^2*n^2 - 2*a*b*d^2*n)*x - 2*(b^2*d^2*n*x - b^2*e^2*n)*log(c))*log((d*x 
 + e*sqrt(x))/x) - 2*(3*b^2*d*e*n^2 - 2*b^2*d*e*n*log(c) - 2*a*b*d*e*n)*sq 
rt(x))/(e^2*x)
 

Sympy [F]

\[ \int \frac {\left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2}{x^2} \, dx=\int \frac {\left (a + b \log {\left (c \left (d + \frac {e}{\sqrt {x}}\right )^{n} \right )}\right )^{2}}{x^{2}}\, dx \] Input:

integrate((a+b*ln(c*(d+e/x**(1/2))**n))**2/x**2,x)
 

Output:

Integral((a + b*log(c*(d + e/sqrt(x))**n))**2/x**2, x)
 

Maxima [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 248, normalized size of antiderivative = 1.27 \[ \int \frac {\left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2}{x^2} \, dx=a b e n {\left (\frac {2 \, d^{2} \log \left (d \sqrt {x} + e\right )}{e^{3}} - \frac {d^{2} \log \left (x\right )}{e^{3}} - \frac {2 \, d \sqrt {x} - e}{e^{2} x}\right )} + \frac {1}{4} \, {\left (4 \, e n {\left (\frac {2 \, d^{2} \log \left (d \sqrt {x} + e\right )}{e^{3}} - \frac {d^{2} \log \left (x\right )}{e^{3}} - \frac {2 \, d \sqrt {x} - e}{e^{2} x}\right )} \log \left (c {\left (d + \frac {e}{\sqrt {x}}\right )}^{n}\right ) - \frac {{\left (4 \, d^{2} x \log \left (d \sqrt {x} + e\right )^{2} + d^{2} x \log \left (x\right )^{2} - 6 \, d^{2} x \log \left (x\right ) - 12 \, d e \sqrt {x} + 2 \, e^{2} - 4 \, {\left (d^{2} x \log \left (x\right ) - 3 \, d^{2} x\right )} \log \left (d \sqrt {x} + e\right )\right )} n^{2}}{e^{2} x}\right )} b^{2} - \frac {b^{2} \log \left (c {\left (d + \frac {e}{\sqrt {x}}\right )}^{n}\right )^{2}}{x} - \frac {2 \, a b \log \left (c {\left (d + \frac {e}{\sqrt {x}}\right )}^{n}\right )}{x} - \frac {a^{2}}{x} \] Input:

integrate((a+b*log(c*(d+e/x^(1/2))^n))^2/x^2,x, algorithm="maxima")
 

Output:

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

Giac [A] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 278, normalized size of antiderivative = 1.43 \[ \int \frac {\left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2}{x^2} \, dx=\frac {2 \, {\left (\frac {2 \, {\left (d \sqrt {x} + e\right )} b^{2} d n^{2}}{e \sqrt {x}} - \frac {{\left (d \sqrt {x} + e\right )}^{2} b^{2} n^{2}}{e x}\right )} \log \left (\frac {d \sqrt {x} + e}{\sqrt {x}}\right )^{2} + 2 \, {\left (\frac {{\left (b^{2} n^{2} - 2 \, b^{2} n \log \left (c\right ) - 2 \, a b n\right )} {\left (d \sqrt {x} + e\right )}^{2}}{e x} - \frac {4 \, {\left (b^{2} d n^{2} - b^{2} d n \log \left (c\right ) - a b d n\right )} {\left (d \sqrt {x} + e\right )}}{e \sqrt {x}}\right )} \log \left (\frac {d \sqrt {x} + e}{\sqrt {x}}\right ) - \frac {{\left (b^{2} n^{2} - 2 \, b^{2} n \log \left (c\right ) + 2 \, b^{2} \log \left (c\right )^{2} - 2 \, a b n + 4 \, a b \log \left (c\right ) + 2 \, a^{2}\right )} {\left (d \sqrt {x} + e\right )}^{2}}{e x} + \frac {4 \, {\left (2 \, b^{2} d n^{2} - 2 \, b^{2} d n \log \left (c\right ) + b^{2} d \log \left (c\right )^{2} - 2 \, a b d n + 2 \, a b d \log \left (c\right ) + a^{2} d\right )} {\left (d \sqrt {x} + e\right )}}{e \sqrt {x}}}{2 \, e} \] Input:

integrate((a+b*log(c*(d+e/x^(1/2))^n))^2/x^2,x, algorithm="giac")
 

Output:

1/2*(2*(2*(d*sqrt(x) + e)*b^2*d*n^2/(e*sqrt(x)) - (d*sqrt(x) + e)^2*b^2*n^ 
2/(e*x))*log((d*sqrt(x) + e)/sqrt(x))^2 + 2*((b^2*n^2 - 2*b^2*n*log(c) - 2 
*a*b*n)*(d*sqrt(x) + e)^2/(e*x) - 4*(b^2*d*n^2 - b^2*d*n*log(c) - a*b*d*n) 
*(d*sqrt(x) + e)/(e*sqrt(x)))*log((d*sqrt(x) + e)/sqrt(x)) - (b^2*n^2 - 2* 
b^2*n*log(c) + 2*b^2*log(c)^2 - 2*a*b*n + 4*a*b*log(c) + 2*a^2)*(d*sqrt(x) 
 + e)^2/(e*x) + 4*(2*b^2*d*n^2 - 2*b^2*d*n*log(c) + b^2*d*log(c)^2 - 2*a*b 
*d*n + 2*a*b*d*log(c) + a^2*d)*(d*sqrt(x) + e)/(e*sqrt(x)))/e
 

Mupad [B] (verification not implemented)

Time = 14.71 (sec) , antiderivative size = 193, normalized size of antiderivative = 0.99 \[ \int \frac {\left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2}{x^2} \, dx=\ln \left (c\,{\left (d+\frac {e}{\sqrt {x}}\right )}^n\right )\,\left (\frac {\frac {2\,b\,d\,\left (2\,a-b\,n\right )}{e}-\frac {4\,a\,b\,d}{e}}{\sqrt {x}}-\frac {b\,\left (2\,a-b\,n\right )}{x}\right )-{\ln \left (c\,{\left (d+\frac {e}{\sqrt {x}}\right )}^n\right )}^2\,\left (\frac {b^2}{x}-\frac {b^2\,d^2}{e^2}\right )+\frac {\frac {d\,\left (2\,a^2-2\,a\,b\,n+b^2\,n^2\right )}{e}-\frac {2\,d\,\left (a^2-b^2\,n^2\right )}{e}}{\sqrt {x}}-\frac {a^2-a\,b\,n+\frac {b^2\,n^2}{2}}{x}-\frac {\ln \left (d+\frac {e}{\sqrt {x}}\right )\,\left (3\,b^2\,d^2\,n^2-2\,a\,b\,d^2\,n\right )}{e^2} \] Input:

int((a + b*log(c*(d + e/x^(1/2))^n))^2/x^2,x)
 

Output:

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

Reduce [B] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 248, normalized size of antiderivative = 1.27 \[ \int \frac {\left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2}{x^2} \, dx=\frac {-4 \sqrt {x}\, \mathrm {log}\left (\frac {\left (\sqrt {x}\, d +e \right )^{n} c}{x^{\frac {n}{2}}}\right ) b^{2} d e n -4 \sqrt {x}\, a b d e n +6 \sqrt {x}\, b^{2} d e \,n^{2}+2 \mathrm {log}\left (\frac {\left (\sqrt {x}\, d +e \right )^{n} c}{x^{\frac {n}{2}}}\right )^{2} b^{2} d^{2} x -2 \mathrm {log}\left (\frac {\left (\sqrt {x}\, d +e \right )^{n} c}{x^{\frac {n}{2}}}\right )^{2} b^{2} e^{2}+4 \,\mathrm {log}\left (\frac {\left (\sqrt {x}\, d +e \right )^{n} c}{x^{\frac {n}{2}}}\right ) a b \,d^{2} x -4 \,\mathrm {log}\left (\frac {\left (\sqrt {x}\, d +e \right )^{n} c}{x^{\frac {n}{2}}}\right ) a b \,e^{2}-6 \,\mathrm {log}\left (\frac {\left (\sqrt {x}\, d +e \right )^{n} c}{x^{\frac {n}{2}}}\right ) b^{2} d^{2} n x +2 \,\mathrm {log}\left (\frac {\left (\sqrt {x}\, d +e \right )^{n} c}{x^{\frac {n}{2}}}\right ) b^{2} e^{2} n -2 a^{2} e^{2}+2 a b \,e^{2} n -b^{2} e^{2} n^{2}}{2 e^{2} x} \] Input:

int((a+b*log(c*(d+e/x^(1/2))^n))^2/x^2,x)
 

Output:

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