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

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

Optimal result

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

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

Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 172, normalized size of antiderivative = 1.13 \[ \int \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2 \, dx=x \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2+\frac {b e n \left (2 a d \sqrt {x}+2 b e n \log \left (d+\frac {e}{\sqrt {x}}\right )+2 b d \sqrt {x} \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )-2 e \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right ) \log \left (e+d \sqrt {x}\right )+b e n \log (x)+b e n \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 )}{d^2} \] Input:

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

Output:

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

Rubi [A] (warning: unable to verify)

Time = 1.18 (sec) , antiderivative size = 151, normalized size of antiderivative = 0.99, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {2901, 2904, 2845, 2858, 27, 2789, 2751, 16, 2779, 2838}

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 \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2 \, dx\)

\(\Big \downarrow \) 2901

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

\(\Big \downarrow \) 2904

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

\(\Big \downarrow \) 2845

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

\(\Big \downarrow \) 2858

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 2789

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

\(\Big \downarrow \) 2751

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

\(\Big \downarrow \) 16

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

\(\Big \downarrow \) 2779

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

\(\Big \downarrow \) 2838

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

Input:

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

Output:

-2*(-1/2*(a + b*Log[c*(d + e/Sqrt[x])^n])^2/x + b*e^2*n*(((b*n*Log[-(e/Sqr 
t[x])])/d - ((d + e/Sqrt[x])*Sqrt[x]*(a + b*Log[c*x^(n/2)]))/(d*e))/d + (- 
((Log[1 - d*(d + e/Sqrt[x])]*(a + b*Log[c*x^(n/2)]))/d) + (b*n*PolyLog[2, 
d*(d + e/Sqrt[x])])/d)/d))
 

Defintions of rubi rules used

rule 16
Int[(c_.)/((a_.) + (b_.)*(x_)), x_Symbol] :> Simp[c*(Log[RemoveContent[a + 
b*x, x]]/b), x] /; FreeQ[{a, b, c}, x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 2751
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_) + (e_.)*(x_)^(r_.))^(q_), x 
_Symbol] :> Simp[x*(d + e*x^r)^(q + 1)*((a + b*Log[c*x^n])/d), x] - Simp[b* 
(n/d)   Int[(d + e*x^r)^(q + 1), x], x] /; FreeQ[{a, b, c, d, e, n, q, r}, 
x] && EqQ[r*(q + 1) + 1, 0]
 

rule 2779
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_)^(r 
_.))), x_Symbol] :> Simp[(-Log[1 + d/(e*x^r)])*((a + b*Log[c*x^n])^p/(d*r)) 
, x] + Simp[b*n*(p/(d*r))   Int[Log[1 + d/(e*x^r)]*((a + b*Log[c*x^n])^(p - 
 1)/x), x], x] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[p, 0]
 

rule 2789
Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_))/ 
(x_), x_Symbol] :> Simp[1/d   Int[(d + e*x)^(q + 1)*((a + b*Log[c*x^n])^p/x 
), x], x] - Simp[e/d   Int[(d + e*x)^q*(a + b*Log[c*x^n])^p, x], x] /; Free 
Q[{a, b, c, d, e, n}, x] && IGtQ[p, 0] && LtQ[q, -1] && IntegerQ[2*q]
 

rule 2838
Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2 
, (-c)*e*x^n]/n, x] /; FreeQ[{c, d, e, n}, x] && EqQ[c*d, 1]
 

rule 2845
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)*((f_.) + (g_. 
)*(x_))^(q_.), x_Symbol] :> Simp[(f + g*x)^(q + 1)*((a + b*Log[c*(d + e*x)^ 
n])^p/(g*(q + 1))), x] - Simp[b*e*n*(p/(g*(q + 1)))   Int[(f + g*x)^(q + 1) 
*((a + b*Log[c*(d + e*x)^n])^(p - 1)/(d + e*x)), x], x] /; FreeQ[{a, b, c, 
d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && GtQ[p, 0] && NeQ[q, -1] && In 
tegersQ[2*p, 2*q] && ( !IGtQ[q, 0] || (EqQ[p, 2] && NeQ[q, 1]))
 

rule 2858
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_ 
.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))^(r_.), x_Symbol] :> Simp[1/e   Subst[In 
t[(g*(x/e))^q*((e*h - d*i)/e + i*(x/e))^r*(a + b*Log[c*x^n])^p, x], x, d + 
e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - 
d*g, 0] && (IGtQ[p, 0] || IGtQ[r, 0]) && IntegerQ[2*r]
 

rule 2901
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_), x_Symbo 
l] :> With[{k = Denominator[n]}, Simp[k   Subst[Int[x^(k - 1)*(a + b*Log[c* 
(d + e*x^(k*n))^p])^q, x], x, x^(1/k)], x]] /; FreeQ[{a, b, c, d, e, p, q}, 
 x] && FractionQ[n]
 

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 {\left (a +b \ln \left (c \left (d +\frac {e}{\sqrt {x}}\right )^{n}\right )\right )}^{2}d x\]

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

\[ \int \left (a+b \log \left (c \left (d+\frac {e}{\sqrt {x}}\right )^n\right )\right )^2 \, dx=\frac {2 \sqrt {x}\, \mathrm {log}\left (\frac {\left (\sqrt {x}\, d +e \right )^{n} c}{x^{\frac {n}{2}}}\right )^{2} b^{2} d e +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 -\left (\int \frac {\sqrt {x}\, \mathrm {log}\left (\frac {\left (\sqrt {x}\, d +e \right )^{n} c}{x^{\frac {n}{2}}}\right )^{2}}{x}d x \right ) b^{2} d e +2 \mathrm {log}\left (\frac {\left (\sqrt {x}\, d +e \right )^{n} c}{x^{\frac {n}{2}}}\right )^{2} b^{2} d^{2} x +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}+4 \,\mathrm {log}\left (\frac {\left (\sqrt {x}\, d +e \right )^{n} c}{x^{\frac {n}{2}}}\right ) b^{2} e^{2} n -4 \,\mathrm {log}\left (\sqrt {x}\right ) a b \,e^{2} n +4 \,\mathrm {log}\left (\sqrt {x}\right ) b^{2} e^{2} n^{2}+2 a^{2} d^{2} x}{2 d^{2}} \] Input:

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

Output:

(2*sqrt(x)*log(((sqrt(x)*d + e)**n*c)/x**(n/2))**2*b**2*d*e + 4*sqrt(x)*lo 
g(((sqrt(x)*d + e)**n*c)/x**(n/2))*b**2*d*e*n + 4*sqrt(x)*a*b*d*e*n - int( 
(sqrt(x)*log(((sqrt(x)*d + e)**n*c)/x**(n/2))**2)/x,x)*b**2*d*e + 2*log((( 
sqrt(x)*d + e)**n*c)/x**(n/2))**2*b**2*d**2*x + 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 
+ 4*log(((sqrt(x)*d + e)**n*c)/x**(n/2))*b**2*e**2*n - 4*log(sqrt(x))*a*b* 
e**2*n + 4*log(sqrt(x))*b**2*e**2*n**2 + 2*a**2*d**2*x)/(2*d**2)