\(\int (a+b \log (c x^n))^p (d+e \log (f x^r)) \, dx\) [187]

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

Optimal result

Integrand size = 23, antiderivative size = 271 \[ \int \left (a+b \log \left (c x^n\right )\right )^p \left (d+e \log \left (f x^r\right )\right ) \, dx=-e e^{-\frac {a}{b n}} r x \left (c x^n\right )^{-1/n} \Gamma \left (2+p,-\frac {a}{b n}-\frac {\log \left (c x^n\right )}{n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p}-\frac {e e^{-\frac {a}{b n}} r x \left (c x^n\right )^{-1/n} \Gamma \left (1+p,-\frac {a}{b n}-\frac {\log \left (c x^n\right )}{n}\right ) \left (a+b \log \left (c x^n\right )\right )^{1+p} \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p}}{b n}+e^{-\frac {a}{b n}} x \left (c x^n\right )^{-1/n} \Gamma \left (1+p,-\frac {a+b \log \left (c x^n\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \left (d+e \log \left (f x^r\right )\right ) \] Output:

-e*r*x*GAMMA(2+p,-a/b/n-ln(c*x^n)/n)*(a+b*ln(c*x^n))^p/exp(a/b/n)/((c*x^n) 
^(1/n))/((-(a+b*ln(c*x^n))/b/n)^p)-e*r*x*GAMMA(p+1,-a/b/n-ln(c*x^n)/n)*(a+ 
b*ln(c*x^n))^(p+1)/b/exp(a/b/n)/n/((c*x^n)^(1/n))/((-(a+b*ln(c*x^n))/b/n)^ 
p)+x*GAMMA(p+1,-(a+b*ln(c*x^n))/b/n)*(a+b*ln(c*x^n))^p*(d+e*ln(f*x^r))/exp 
(a/b/n)/((c*x^n)^(1/n))/((-(a+b*ln(c*x^n))/b/n)^p)
 

Mathematica [A] (verified)

Time = 0.40 (sec) , antiderivative size = 146, normalized size of antiderivative = 0.54 \[ \int \left (a+b \log \left (c x^n\right )\right )^p \left (d+e \log \left (f x^r\right )\right ) \, dx=-e^{-\frac {a}{b n}} x \left (c x^n\right )^{-1/n} \left (a+b \log \left (c x^n\right )\right )^{-1+p} \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{1-p} \left (-b e n r \Gamma \left (2+p,-\frac {a+b \log \left (c x^n\right )}{b n}\right )+\Gamma \left (1+p,-\frac {a+b \log \left (c x^n\right )}{b n}\right ) \left (b d n-a e r-b e r \log \left (c x^n\right )+b e n \log \left (f x^r\right )\right )\right ) \] Input:

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

Output:

-((x*(a + b*Log[c*x^n])^(-1 + p)*(-((a + b*Log[c*x^n])/(b*n)))^(1 - p)*(-( 
b*e*n*r*Gamma[2 + p, -((a + b*Log[c*x^n])/(b*n))]) + Gamma[1 + p, -((a + b 
*Log[c*x^n])/(b*n))]*(b*d*n - a*e*r - b*e*r*Log[c*x^n] + b*e*n*Log[f*x^r]) 
))/(E^(a/(b*n))*(c*x^n)^n^(-1)))
 

Rubi [A] (verified)

Time = 0.88 (sec) , antiderivative size = 226, normalized size of antiderivative = 0.83, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {2808, 27, 34, 2033, 3039, 7281, 7111}

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 (d+e \log \left (f x^r\right )\right ) \left (a+b \log \left (c x^n\right )\right )^p \, dx\)

\(\Big \downarrow \) 2808

\(\displaystyle x e^{-\frac {a}{b n}} \left (c x^n\right )^{-1/n} \left (d+e \log \left (f x^r\right )\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \Gamma \left (p+1,-\frac {a+b \log \left (c x^n\right )}{b n}\right )-e r \int e^{-\frac {a}{b n}} \left (c x^n\right )^{-1/n} \Gamma \left (p+1,-\frac {a+b \log \left (c x^n\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p}dx\)

\(\Big \downarrow \) 27

\(\displaystyle x e^{-\frac {a}{b n}} \left (c x^n\right )^{-1/n} \left (d+e \log \left (f x^r\right )\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \Gamma \left (p+1,-\frac {a+b \log \left (c x^n\right )}{b n}\right )-e r e^{-\frac {a}{b n}} \int \left (c x^n\right )^{-1/n} \Gamma \left (p+1,-\frac {a+b \log \left (c x^n\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p}dx\)

\(\Big \downarrow \) 34

\(\displaystyle x e^{-\frac {a}{b n}} \left (c x^n\right )^{-1/n} \left (d+e \log \left (f x^r\right )\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \Gamma \left (p+1,-\frac {a+b \log \left (c x^n\right )}{b n}\right )-e r x e^{-\frac {a}{b n}} \left (c x^n\right )^{-1/n} \int \frac {\Gamma \left (p+1,-\frac {a+b \log \left (c x^n\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p}}{x}dx\)

\(\Big \downarrow \) 2033

\(\displaystyle x e^{-\frac {a}{b n}} \left (c x^n\right )^{-1/n} \left (d+e \log \left (f x^r\right )\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \Gamma \left (p+1,-\frac {a+b \log \left (c x^n\right )}{b n}\right )-e r x e^{-\frac {a}{b n}} \left (c x^n\right )^{-1/n} \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \int \frac {\Gamma \left (p+1,-\frac {a+b \log \left (c x^n\right )}{b n}\right )}{x}dx\)

\(\Big \downarrow \) 3039

\(\displaystyle x e^{-\frac {a}{b n}} \left (c x^n\right )^{-1/n} \left (d+e \log \left (f x^r\right )\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \Gamma \left (p+1,-\frac {a+b \log \left (c x^n\right )}{b n}\right )-\frac {e r x e^{-\frac {a}{b n}} \left (c x^n\right )^{-1/n} \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \int \Gamma \left (p+1,-\frac {a+b \log \left (c x^n\right )}{b n}\right )d\log \left (c x^n\right )}{n}\)

\(\Big \downarrow \) 7281

\(\displaystyle e r x e^{-\frac {a}{b n}} \left (c x^n\right )^{-1/n} \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \int \Gamma \left (p+1,-\frac {a}{b n}-\frac {\log \left (c x^n\right )}{n}\right )d\left (-\frac {a}{b n}-\frac {\log \left (c x^n\right )}{n}\right )+x e^{-\frac {a}{b n}} \left (c x^n\right )^{-1/n} \left (d+e \log \left (f x^r\right )\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \Gamma \left (p+1,-\frac {a+b \log \left (c x^n\right )}{b n}\right )\)

\(\Big \downarrow \) 7111

\(\displaystyle x e^{-\frac {a}{b n}} \left (c x^n\right )^{-1/n} \left (d+e \log \left (f x^r\right )\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \Gamma \left (p+1,-\frac {a+b \log \left (c x^n\right )}{b n}\right )+e r x e^{-\frac {a}{b n}} \left (c x^n\right )^{-1/n} \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \left (\left (-\frac {a}{b n}-\frac {\log \left (c x^n\right )}{n}\right ) \Gamma \left (p+1,-\frac {a}{b n}-\frac {\log \left (c x^n\right )}{n}\right )-\Gamma \left (p+2,-\frac {a}{b n}-\frac {\log \left (c x^n\right )}{n}\right )\right )\)

Input:

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

Output:

(e*r*x*(a + b*Log[c*x^n])^p*(-Gamma[2 + p, -(a/(b*n)) - Log[c*x^n]/n] + Ga 
mma[1 + p, -(a/(b*n)) - Log[c*x^n]/n]*(-(a/(b*n)) - Log[c*x^n]/n)))/(E^(a/ 
(b*n))*(c*x^n)^n^(-1)*(-((a + b*Log[c*x^n])/(b*n)))^p) + (x*Gamma[1 + p, - 
((a + b*Log[c*x^n])/(b*n))]*(a + b*Log[c*x^n])^p*(d + e*Log[f*x^r]))/(E^(a 
/(b*n))*(c*x^n)^n^(-1)*(-((a + b*Log[c*x^n])/(b*n)))^p)
 

Defintions of rubi rules used

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 34
Int[(u_.)*((a_.)*(x_)^(m_))^(p_), x_Symbol] :> Simp[a^IntPart[p]*((a*x^m)^F 
racPart[p]/x^(m*FracPart[p]))   Int[u*x^(m*p), x], x] /; FreeQ[{a, m, p}, x 
] &&  !IntegerQ[p]
 

rule 2033
Int[(Fx_.)*((a_.)*(v_))^(m_)*((b_.)*(v_))^(n_), x_Symbol] :> Simp[a^(m + n) 
*((b*v)^n/(a*v)^n)   Int[v^(m + n)*Fx, x], x] /; FreeQ[{a, b, m, n}, x] && 
 !IntegerQ[m] &&  !IntegerQ[n] && IntegerQ[m + n]
 

rule 2808
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.) + Log[(f_.)*(x_)^(r_ 
.)]*(e_.)), x_Symbol] :> With[{u = IntHide[(a + b*Log[c*x^n])^p, x]}, Simp[ 
(d + e*Log[f*x^r])   u, x] - Simp[e*r   Int[SimplifyIntegrand[u/x, x], x], 
x]] /; FreeQ[{a, b, c, d, e, f, n, p, r}, x]
 

rule 3039
Int[u_, x_Symbol] :> With[{lst = FunctionOfLog[Cancel[x*u], x]}, Simp[1/lst 
[[3]]   Subst[Int[lst[[1]], x], x, Log[lst[[2]]]], x] /;  !FalseQ[lst]] /; 
NonsumQ[u]
 

rule 7111
Int[Gamma[n_, (a_.) + (b_.)*(x_)], x_Symbol] :> Simp[(a + b*x)*(Gamma[n, a 
+ b*x]/b), x] - Simp[Gamma[n + 1, a + b*x]/b, x] /; FreeQ[{a, b, n}, x]
 

rule 7281
Int[u_, x_Symbol] :> With[{lst = FunctionOfLinear[u, x]}, Simp[1/lst[[3]] 
 Subst[Int[lst[[1]], x], x, lst[[2]] + lst[[3]]*x], x] /;  !FalseQ[lst]]
 
Maple [F]

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

Input:

int((a+b*ln(c*x^n))^p*(d+e*ln(f*x^r)),x)
 

Output:

int((a+b*ln(c*x^n))^p*(d+e*ln(f*x^r)),x)
 

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 131, normalized size of antiderivative = 0.48 \[ \int \left (a+b \log \left (c x^n\right )\right )^p \left (d+e \log \left (f x^r\right )\right ) \, dx=-\frac {{\left (b e r \log \left (c\right ) - b e n \log \left (f\right ) - b d n + {\left (b e n p + b e n + a e\right )} r\right )} e^{\left (-\frac {b n p \log \left (-\frac {1}{b n}\right ) + b \log \left (c\right ) + a}{b n}\right )} \Gamma \left (p + 1, -\frac {b n \log \left (x\right ) + b \log \left (c\right ) + a}{b n}\right ) - {\left (b e n r x \log \left (x\right ) + b e r x \log \left (c\right ) + a e r x\right )} {\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}^{p}}{b n} \] Input:

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

Output:

-((b*e*r*log(c) - b*e*n*log(f) - b*d*n + (b*e*n*p + b*e*n + a*e)*r)*e^(-(b 
*n*p*log(-1/(b*n)) + b*log(c) + a)/(b*n))*gamma(p + 1, -(b*n*log(x) + b*lo 
g(c) + a)/(b*n)) - (b*e*n*r*x*log(x) + b*e*r*x*log(c) + a*e*r*x)*(b*n*log( 
x) + b*log(c) + a)^p)/(b*n)
 

Sympy [F]

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

integrate((a+b*ln(c*x**n))**p*(d+e*ln(f*x**r)),x)
 

Output:

Integral((a + b*log(c*x**n))**p*(d + e*log(f*x**r)), x)
 

Maxima [F(-2)]

Exception generated. \[ \int \left (a+b \log \left (c x^n\right )\right )^p \left (d+e \log \left (f x^r\right )\right ) \, dx=\text {Exception raised: RuntimeError} \] Input:

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

Output:

Exception raised: RuntimeError >> ECL says: In function CAR, the value of 
the first argument is  0which is not of the expected type LIST
 

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

int((d + e*log(f*x^r))*(a + b*log(c*x^n))^p,x)
 

Output:

int((d + e*log(f*x^r))*(a + b*log(c*x^n))^p, x)
 

Reduce [F]

\[ \int \left (a+b \log \left (c x^n\right )\right )^p \left (d+e \log \left (f x^r\right )\right ) \, dx=\frac {{\left (\mathrm {log}\left (x^{n} c \right ) b +a \right )}^{p} \mathrm {log}\left (x^{r} f \right ) a e x +{\left (\mathrm {log}\left (x^{n} c \right ) b +a \right )}^{p} a d x -{\left (\mathrm {log}\left (x^{n} c \right ) b +a \right )}^{p} a e r x +{\left (\mathrm {log}\left (x^{n} c \right ) b +a \right )}^{p} b d n p x -\left (\int \frac {{\left (\mathrm {log}\left (x^{n} c \right ) b +a \right )}^{p}}{\mathrm {log}\left (x^{n} c \right ) a b +\mathrm {log}\left (x^{n} c \right ) b^{2} n p +a^{2}+a b n p}d x \right ) a^{2} b d n p +\left (\int \frac {{\left (\mathrm {log}\left (x^{n} c \right ) b +a \right )}^{p}}{\mathrm {log}\left (x^{n} c \right ) a b +\mathrm {log}\left (x^{n} c \right ) b^{2} n p +a^{2}+a b n p}d x \right ) a^{2} b e n p r -2 \left (\int \frac {{\left (\mathrm {log}\left (x^{n} c \right ) b +a \right )}^{p}}{\mathrm {log}\left (x^{n} c \right ) a b +\mathrm {log}\left (x^{n} c \right ) b^{2} n p +a^{2}+a b n p}d x \right ) a \,b^{2} d \,n^{2} p^{2}+\left (\int \frac {{\left (\mathrm {log}\left (x^{n} c \right ) b +a \right )}^{p}}{\mathrm {log}\left (x^{n} c \right ) a b +\mathrm {log}\left (x^{n} c \right ) b^{2} n p +a^{2}+a b n p}d x \right ) a \,b^{2} e \,n^{2} p^{2} r -\left (\int \frac {{\left (\mathrm {log}\left (x^{n} c \right ) b +a \right )}^{p}}{\mathrm {log}\left (x^{n} c \right ) a b +\mathrm {log}\left (x^{n} c \right ) b^{2} n p +a^{2}+a b n p}d x \right ) b^{3} d \,n^{3} p^{3}+\left (\int \frac {{\left (\mathrm {log}\left (x^{n} c \right ) b +a \right )}^{p} \mathrm {log}\left (x^{n} c \right ) \mathrm {log}\left (x^{r} f \right )}{\mathrm {log}\left (x^{n} c \right ) a b +\mathrm {log}\left (x^{n} c \right ) b^{2} n p +a^{2}+a b n p}d x \right ) a \,b^{2} e n p +\left (\int \frac {{\left (\mathrm {log}\left (x^{n} c \right ) b +a \right )}^{p} \mathrm {log}\left (x^{n} c \right ) \mathrm {log}\left (x^{r} f \right )}{\mathrm {log}\left (x^{n} c \right ) a b +\mathrm {log}\left (x^{n} c \right ) b^{2} n p +a^{2}+a b n p}d x \right ) b^{3} e \,n^{2} p^{2}}{b n p +a} \] Input:

int((a+b*log(c*x^n))^p*(d+e*log(f*x^r)),x)
 

Output:

((log(x**n*c)*b + a)**p*log(x**r*f)*a*e*x + (log(x**n*c)*b + a)**p*a*d*x - 
 (log(x**n*c)*b + a)**p*a*e*r*x + (log(x**n*c)*b + a)**p*b*d*n*p*x - int(( 
log(x**n*c)*b + a)**p/(log(x**n*c)*a*b + log(x**n*c)*b**2*n*p + a**2 + a*b 
*n*p),x)*a**2*b*d*n*p + int((log(x**n*c)*b + a)**p/(log(x**n*c)*a*b + log( 
x**n*c)*b**2*n*p + a**2 + a*b*n*p),x)*a**2*b*e*n*p*r - 2*int((log(x**n*c)* 
b + a)**p/(log(x**n*c)*a*b + log(x**n*c)*b**2*n*p + a**2 + a*b*n*p),x)*a*b 
**2*d*n**2*p**2 + int((log(x**n*c)*b + a)**p/(log(x**n*c)*a*b + log(x**n*c 
)*b**2*n*p + a**2 + a*b*n*p),x)*a*b**2*e*n**2*p**2*r - int((log(x**n*c)*b 
+ a)**p/(log(x**n*c)*a*b + log(x**n*c)*b**2*n*p + a**2 + a*b*n*p),x)*b**3* 
d*n**3*p**3 + int(((log(x**n*c)*b + a)**p*log(x**n*c)*log(x**r*f))/(log(x* 
*n*c)*a*b + log(x**n*c)*b**2*n*p + a**2 + a*b*n*p),x)*a*b**2*e*n*p + int(( 
(log(x**n*c)*b + a)**p*log(x**n*c)*log(x**r*f))/(log(x**n*c)*a*b + log(x** 
n*c)*b**2*n*p + a**2 + a*b*n*p),x)*b**3*e*n**2*p**2)/(a + b*n*p)