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

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

Optimal result

Integrand size = 25, antiderivative size = 405 \[ \int \log \left (d \left (e+f \sqrt {x}\right )\right ) \left (a+b \log \left (c x^n\right )\right )^2 \, dx=\frac {14 b^2 e n^2 \sqrt {x}}{f}+a b n x-3 b^2 n^2 x-\frac {2 b^2 e^2 n^2 \log \left (e+f \sqrt {x}\right )}{f^2}+2 b^2 n^2 x \log \left (d \left (e+f \sqrt {x}\right )\right )-\frac {4 b^2 e^2 n^2 \log \left (e+f \sqrt {x}\right ) \log \left (-\frac {f \sqrt {x}}{e}\right )}{f^2}+b^2 n x \log \left (c x^n\right )-\frac {6 b e n \sqrt {x} \left (a+b \log \left (c x^n\right )\right )}{f}+b n x \left (a+b \log \left (c x^n\right )\right )+\frac {2 b e^2 n \log \left (e+f \sqrt {x}\right ) \left (a+b \log \left (c x^n\right )\right )}{f^2}-2 b n x \log \left (d \left (e+f \sqrt {x}\right )\right ) \left (a+b \log \left (c x^n\right )\right )+\frac {e \sqrt {x} \left (a+b \log \left (c x^n\right )\right )^2}{f}-\frac {1}{2} x \left (a+b \log \left (c x^n\right )\right )^2+x \log \left (d \left (e+f \sqrt {x}\right )\right ) \left (a+b \log \left (c x^n\right )\right )^2-\frac {e^2 \log \left (1+\frac {f \sqrt {x}}{e}\right ) \left (a+b \log \left (c x^n\right )\right )^2}{f^2}-\frac {4 b^2 e^2 n^2 \operatorname {PolyLog}\left (2,1+\frac {f \sqrt {x}}{e}\right )}{f^2}-\frac {4 b e^2 n \left (a+b \log \left (c x^n\right )\right ) \operatorname {PolyLog}\left (2,-\frac {f \sqrt {x}}{e}\right )}{f^2}+\frac {8 b^2 e^2 n^2 \operatorname {PolyLog}\left (3,-\frac {f \sqrt {x}}{e}\right )}{f^2} \] Output:

14*b^2*e*n^2*x^(1/2)/f+a*b*n*x-3*b^2*n^2*x-2*b^2*e^2*n^2*ln(e+f*x^(1/2))/f 
^2+2*b^2*n^2*x*ln(d*(e+f*x^(1/2)))-4*b^2*e^2*n^2*ln(e+f*x^(1/2))*ln(-f*x^( 
1/2)/e)/f^2+b^2*n*x*ln(c*x^n)-6*b*e*n*x^(1/2)*(a+b*ln(c*x^n))/f+b*n*x*(a+b 
*ln(c*x^n))+2*b*e^2*n*ln(e+f*x^(1/2))*(a+b*ln(c*x^n))/f^2-2*b*n*x*ln(d*(e+ 
f*x^(1/2)))*(a+b*ln(c*x^n))+e*x^(1/2)*(a+b*ln(c*x^n))^2/f-1/2*x*(a+b*ln(c* 
x^n))^2+x*ln(d*(e+f*x^(1/2)))*(a+b*ln(c*x^n))^2-e^2*ln(1+f*x^(1/2)/e)*(a+b 
*ln(c*x^n))^2/f^2-4*b^2*e^2*n^2*polylog(2,1+f*x^(1/2)/e)/f^2-4*b*e^2*n*(a+ 
b*ln(c*x^n))*polylog(2,-f*x^(1/2)/e)/f^2+8*b^2*e^2*n^2*polylog(3,-f*x^(1/2 
)/e)/f^2
 

Mathematica [A] (verified)

Time = 0.47 (sec) , antiderivative size = 718, normalized size of antiderivative = 1.77 \[ \int \log \left (d \left (e+f \sqrt {x}\right )\right ) \left (a+b \log \left (c x^n\right )\right )^2 \, dx=-\frac {-2 a^2 e f \sqrt {x}+12 a b e f n \sqrt {x}-28 b^2 e f n^2 \sqrt {x}+a^2 f^2 x-4 a b f^2 n x+6 b^2 f^2 n^2 x+2 a^2 e^2 \log \left (e+f \sqrt {x}\right )-4 a b e^2 n \log \left (e+f \sqrt {x}\right )+4 b^2 e^2 n^2 \log \left (e+f \sqrt {x}\right )-2 a^2 f^2 x \log \left (d \left (e+f \sqrt {x}\right )\right )+4 a b f^2 n x \log \left (d \left (e+f \sqrt {x}\right )\right )-4 b^2 f^2 n^2 x \log \left (d \left (e+f \sqrt {x}\right )\right )-4 a b e^2 n \log \left (e+f \sqrt {x}\right ) \log (x)+4 b^2 e^2 n^2 \log \left (e+f \sqrt {x}\right ) \log (x)+4 a b e^2 n \log \left (1+\frac {f \sqrt {x}}{e}\right ) \log (x)-4 b^2 e^2 n^2 \log \left (1+\frac {f \sqrt {x}}{e}\right ) \log (x)+2 b^2 e^2 n^2 \log \left (e+f \sqrt {x}\right ) \log ^2(x)-2 b^2 e^2 n^2 \log \left (1+\frac {f \sqrt {x}}{e}\right ) \log ^2(x)-4 a b e f \sqrt {x} \log \left (c x^n\right )+12 b^2 e f n \sqrt {x} \log \left (c x^n\right )+2 a b f^2 x \log \left (c x^n\right )-4 b^2 f^2 n x \log \left (c x^n\right )+4 a b e^2 \log \left (e+f \sqrt {x}\right ) \log \left (c x^n\right )-4 b^2 e^2 n \log \left (e+f \sqrt {x}\right ) \log \left (c x^n\right )-4 a b f^2 x \log \left (d \left (e+f \sqrt {x}\right )\right ) \log \left (c x^n\right )+4 b^2 f^2 n x \log \left (d \left (e+f \sqrt {x}\right )\right ) \log \left (c x^n\right )-4 b^2 e^2 n \log \left (e+f \sqrt {x}\right ) \log (x) \log \left (c x^n\right )+4 b^2 e^2 n \log \left (1+\frac {f \sqrt {x}}{e}\right ) \log (x) \log \left (c x^n\right )-2 b^2 e f \sqrt {x} \log ^2\left (c x^n\right )+b^2 f^2 x \log ^2\left (c x^n\right )+2 b^2 e^2 \log \left (e+f \sqrt {x}\right ) \log ^2\left (c x^n\right )-2 b^2 f^2 x \log \left (d \left (e+f \sqrt {x}\right )\right ) \log ^2\left (c x^n\right )+8 b e^2 n \left (a-b n+b \log \left (c x^n\right )\right ) \operatorname {PolyLog}\left (2,-\frac {f \sqrt {x}}{e}\right )-16 b^2 e^2 n^2 \operatorname {PolyLog}\left (3,-\frac {f \sqrt {x}}{e}\right )}{2 f^2} \] Input:

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

Output:

-1/2*(-2*a^2*e*f*Sqrt[x] + 12*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2*b^2*f^2*x*Log[d*(e + f*Sqrt[x])]*Log[c*x^n]^2 + 8*b*e^2*n*(a - b*n + b*L 
og[c*x^n])*PolyLog[2, -((f*Sqrt[x])/e)] - 16*b^2*e^2*n^2*PolyLog[3, -((f*S 
qrt[x])/e)])/f^2
 

Rubi [A] (verified)

Time = 0.81 (sec) , antiderivative size = 452, normalized size of antiderivative = 1.12, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {2817, 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 \log \left (d \left (e+f \sqrt {x}\right )\right ) \left (a+b \log \left (c x^n\right )\right )^2 \, dx\)

\(\Big \downarrow \) 2817

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

(e*Sqrt[x]*(a + b*Log[c*x^n])^2)/f - (x*(a + b*Log[c*x^n])^2)/2 - (e^2*Log 
[e + f*Sqrt[x]]*(a + b*Log[c*x^n])^2)/f^2 + x*Log[d*(e + f*Sqrt[x])]*(a + 
b*Log[c*x^n])^2 - 2*b*n*((-7*b*e*n*Sqrt[x])/f - (a*x)/2 + (3*b*n*x)/2 + (b 
*e^2*n*Log[e + f*Sqrt[x]])/f^2 - b*n*x*Log[d*(e + f*Sqrt[x])] + (2*b*e^2*n 
*Log[e + f*Sqrt[x]]*Log[-((f*Sqrt[x])/e)])/f^2 - (b*x*Log[c*x^n])/2 + (3*e 
*Sqrt[x]*(a + b*Log[c*x^n]))/f - (x*(a + b*Log[c*x^n]))/2 - (e^2*Log[e + f 
*Sqrt[x]]*(a + b*Log[c*x^n]))/f^2 + x*Log[d*(e + f*Sqrt[x])]*(a + b*Log[c* 
x^n]) - (e^2*Log[e + f*Sqrt[x]]*(a + b*Log[c*x^n])^2)/(2*b*f^2*n) + (e^2*L 
og[1 + (f*Sqrt[x])/e]*(a + b*Log[c*x^n])^2)/(2*b*f^2*n) + (2*b*e^2*n*PolyL 
og[2, 1 + (f*Sqrt[x])/e])/f^2 + (2*e^2*(a + b*Log[c*x^n])*PolyLog[2, -((f* 
Sqrt[x])/e)])/f^2 - (4*b*e^2*n*PolyLog[3, -((f*Sqrt[x])/e)])/f^2)
 

Defintions of rubi rules used

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

rule 2817
Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_. 
)]*(b_.))^(p_.), x_Symbol] :> With[{u = IntHide[Log[d*(e + f*x^m)^r], x]}, 
Simp[(a + b*Log[c*x^n])^p   u, x] - Simp[b*n*p   Int[(a + b*Log[c*x^n])^(p 
- 1)/x   u, x], x]] /; FreeQ[{a, b, c, d, e, f, r, m, n}, x] && IGtQ[p, 0] 
&& RationalQ[m] && (EqQ[p, 1] || (FractionQ[m] && IntegerQ[1/m]) || (EqQ[r, 
 1] && EqQ[m, 1] && EqQ[d*e, 1]))
 
Maple [F]

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

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [F]

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

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

Output:

1/27*(27*b^2*e*x*log(d)*log(x^n)^2 + 54*(a*b*e*log(d) - (e*n*log(d) - e*lo 
g(c)*log(d))*b^2)*x*log(x^n) + 27*(a^2*e*log(d) - 2*(e*n*log(d) - e*log(c) 
*log(d))*a*b + (2*e*n^2*log(d) - 2*e*n*log(c)*log(d) + e*log(c)^2*log(d))* 
b^2)*x + 27*(b^2*e*x*log(x^n)^2 - 2*((e*n - e*log(c))*b^2 - a*b*e)*x*log(x 
^n) - (2*(e*n - e*log(c))*a*b - (2*e*n^2 - 2*e*n*log(c) + e*log(c)^2)*b^2 
- a^2*e)*x)*log(f*sqrt(x) + e) - (9*b^2*f*x^2*log(x^n)^2 - 6*((5*f*n - 3*f 
*log(c))*b^2 - 3*a*b*f)*x^2*log(x^n) - (6*(5*f*n - 3*f*log(c))*a*b - (38*f 
*n^2 - 30*f*n*log(c) + 9*f*log(c)^2)*b^2 - 9*a^2*f)*x^2)/sqrt(x))/e + inte 
grate(1/2*(b^2*f^2*x*log(x^n)^2 + 2*(a*b*f^2 - (f^2*n - f^2*log(c))*b^2)*x 
*log(x^n) + (a^2*f^2 - 2*(f^2*n - f^2*log(c))*a*b + (2*f^2*n^2 - 2*f^2*n*l 
og(c) + f^2*log(c)^2)*b^2)*x)/(e*f*sqrt(x) + e^2), x)
 

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

\[ \int \log \left (d \left (e+f \sqrt {x}\right )\right ) \left (a+b \log \left (c x^n\right )\right )^2 \, dx =\text {Too large to display} \] Input:

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

Output:

(6*sqrt(x)*log(x**n*c)**2*b**2*e*f*n + 12*sqrt(x)*log(x**n*c)*a*b*e*f*n - 
36*sqrt(x)*log(x**n*c)*b**2*e*f*n**2 + 6*sqrt(x)*a**2*e*f*n - 36*sqrt(x)*a 
*b*e*f*n**2 + 84*sqrt(x)*b**2*e*f*n**3 + 3*int(log(x**n*c)**2/(e**2*x - f* 
*2*x**2),x)*b**2*e**4*n + 6*int(log(x**n*c)/(e**2*x - f**2*x**2),x)*a*b*e* 
*4*n - 6*int(log(x**n*c)/(e**2*x - f**2*x**2),x)*b**2*e**4*n**2 - 3*int((s 
qrt(x)*log(x**n*c)**2)/(e**2*x - f**2*x**2),x)*b**2*e**3*f*n - 6*int((sqrt 
(x)*log(x**n*c))/(e**2*x - f**2*x**2),x)*a*b*e**3*f*n + 6*int((sqrt(x)*log 
(x**n*c))/(e**2*x - f**2*x**2),x)*b**2*e**3*f*n**2 + 6*log(sqrt(x)*d*f + d 
*e)*log(x**n*c)**2*b**2*f**2*n*x + 12*log(sqrt(x)*d*f + d*e)*log(x**n*c)*a 
*b*f**2*n*x - 12*log(sqrt(x)*d*f + d*e)*log(x**n*c)*b**2*f**2*n**2*x - 6*l 
og(sqrt(x)*d*f + d*e)*a**2*e**2*n + 6*log(sqrt(x)*d*f + d*e)*a**2*f**2*n*x 
 + 12*log(sqrt(x)*d*f + d*e)*a*b*e**2*n**2 - 12*log(sqrt(x)*d*f + d*e)*a*b 
*f**2*n**2*x - 12*log(sqrt(x)*d*f + d*e)*b**2*e**2*n**3 + 12*log(sqrt(x)*d 
*f + d*e)*b**2*f**2*n**3*x - log(x**n*c)**3*b**2*e**2 - 3*log(x**n*c)**2*a 
*b*e**2 + 3*log(x**n*c)**2*b**2*e**2*n - 3*log(x**n*c)**2*b**2*f**2*n*x - 
6*log(x**n*c)*a*b*f**2*n*x + 12*log(x**n*c)*b**2*f**2*n**2*x - 3*a**2*f**2 
*n*x + 12*a*b*f**2*n**2*x - 18*b**2*f**2*n**3*x)/(6*f**2*n)