3.153 \(\int \frac{(a+b \tan ^{-1}(c x^n)) (d+e \log (f x^m))}{x} \, dx\)

Optimal. Leaf size=163 \[ \frac{i b d \text{PolyLog}\left (2,-i c x^n\right )}{2 n}-\frac{i b d \text{PolyLog}\left (2,i c x^n\right )}{2 n}+\frac{i b e \log \left (f x^m\right ) \text{PolyLog}\left (2,-i c x^n\right )}{2 n}-\frac{i b e \log \left (f x^m\right ) \text{PolyLog}\left (2,i c x^n\right )}{2 n}-\frac{i b e m \text{PolyLog}\left (3,-i c x^n\right )}{2 n^2}+\frac{i b e m \text{PolyLog}\left (3,i c x^n\right )}{2 n^2}+a d \log (x)+\frac{a e \log ^2\left (f x^m\right )}{2 m} \]

[Out]

a*d*Log[x] + (a*e*Log[f*x^m]^2)/(2*m) + ((I/2)*b*d*PolyLog[2, (-I)*c*x^n])/n + ((I/2)*b*e*Log[f*x^m]*PolyLog[2
, (-I)*c*x^n])/n - ((I/2)*b*d*PolyLog[2, I*c*x^n])/n - ((I/2)*b*e*Log[f*x^m]*PolyLog[2, I*c*x^n])/n - ((I/2)*b
*e*m*PolyLog[3, (-I)*c*x^n])/n^2 + ((I/2)*b*e*m*PolyLog[3, I*c*x^n])/n^2

________________________________________________________________________________________

Rubi [A]  time = 0.571665, antiderivative size = 163, normalized size of antiderivative = 1., number of steps used = 13, number of rules used = 9, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.375, Rules used = {2301, 6742, 5031, 4848, 2391, 5007, 5005, 2374, 6589} \[ \frac{i b d \text{PolyLog}\left (2,-i c x^n\right )}{2 n}-\frac{i b d \text{PolyLog}\left (2,i c x^n\right )}{2 n}+\frac{i b e \log \left (f x^m\right ) \text{PolyLog}\left (2,-i c x^n\right )}{2 n}-\frac{i b e \log \left (f x^m\right ) \text{PolyLog}\left (2,i c x^n\right )}{2 n}-\frac{i b e m \text{PolyLog}\left (3,-i c x^n\right )}{2 n^2}+\frac{i b e m \text{PolyLog}\left (3,i c x^n\right )}{2 n^2}+a d \log (x)+\frac{a e \log ^2\left (f x^m\right )}{2 m} \]

Antiderivative was successfully verified.

[In]

Int[((a + b*ArcTan[c*x^n])*(d + e*Log[f*x^m]))/x,x]

[Out]

a*d*Log[x] + (a*e*Log[f*x^m]^2)/(2*m) + ((I/2)*b*d*PolyLog[2, (-I)*c*x^n])/n + ((I/2)*b*e*Log[f*x^m]*PolyLog[2
, (-I)*c*x^n])/n - ((I/2)*b*d*PolyLog[2, I*c*x^n])/n - ((I/2)*b*e*Log[f*x^m]*PolyLog[2, I*c*x^n])/n - ((I/2)*b
*e*m*PolyLog[3, (-I)*c*x^n])/n^2 + ((I/2)*b*e*m*PolyLog[3, I*c*x^n])/n^2

Rule 2301

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rule 5031

Int[((a_.) + ArcTan[(c_.)*(x_)^(n_)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/n, Subst[Int[(a + b*ArcTan[c*x])^p
/x, x], x, x^n], x] /; FreeQ[{a, b, c, n}, x] && IGtQ[p, 0]

Rule 4848

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] + (Dist[(I*b)/2, Int[Log[1 - I*c*x
]/x, x], x] - Dist[(I*b)/2, Int[Log[1 + I*c*x]/x, x], x]) /; FreeQ[{a, b, c}, x]

Rule 2391

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 5007

Int[(Log[(d_.)*(x_)^(m_.)]*(ArcTan[(c_.)*(x_)^(n_.)]*(b_.) + (a_)))/(x_), x_Symbol] :> Dist[a, Int[Log[d*x^m]/
x, x], x] + Dist[b, Int[(Log[d*x^m]*ArcTan[c*x^n])/x, x], x] /; FreeQ[{a, b, c, d, m, n}, x]

Rule 5005

Int[(ArcTan[(c_.)*(x_)^(n_.)]*Log[(d_.)*(x_)^(m_.)])/(x_), x_Symbol] :> Dist[I/2, Int[(Log[d*x^m]*Log[1 - I*c*
x^n])/x, x], x] - Dist[I/2, Int[(Log[d*x^m]*Log[1 + I*c*x^n])/x, x], x] /; FreeQ[{c, d, m, n}, x]

Rule 2374

Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.))/(x_), x_Symbol] :> -Sim
p[(PolyLog[2, -(d*f*x^m)]*(a + b*Log[c*x^n])^p)/m, x] + Dist[(b*n*p)/m, Int[(PolyLog[2, -(d*f*x^m)]*(a + b*Log
[c*x^n])^(p - 1))/x, x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 0] && EqQ[d*e, 1]

Rule 6589

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rubi steps

\begin{align*} \int \frac{\left (a+b \tan ^{-1}\left (c x^n\right )\right ) \left (d+e \log \left (f x^m\right )\right )}{x} \, dx &=\int \left (\frac{d \left (a+b \tan ^{-1}\left (c x^n\right )\right )}{x}+\frac{e \left (a+b \tan ^{-1}\left (c x^n\right )\right ) \log \left (f x^m\right )}{x}\right ) \, dx\\ &=d \int \frac{a+b \tan ^{-1}\left (c x^n\right )}{x} \, dx+e \int \frac{\left (a+b \tan ^{-1}\left (c x^n\right )\right ) \log \left (f x^m\right )}{x} \, dx\\ &=(a e) \int \frac{\log \left (f x^m\right )}{x} \, dx+(b e) \int \frac{\tan ^{-1}\left (c x^n\right ) \log \left (f x^m\right )}{x} \, dx+\frac{d \operatorname{Subst}\left (\int \frac{a+b \tan ^{-1}(c x)}{x} \, dx,x,x^n\right )}{n}\\ &=a d \log (x)+\frac{a e \log ^2\left (f x^m\right )}{2 m}+\frac{1}{2} (i b e) \int \frac{\log \left (f x^m\right ) \log \left (1-i c x^n\right )}{x} \, dx-\frac{1}{2} (i b e) \int \frac{\log \left (f x^m\right ) \log \left (1+i c x^n\right )}{x} \, dx+\frac{(i b d) \operatorname{Subst}\left (\int \frac{\log (1-i c x)}{x} \, dx,x,x^n\right )}{2 n}-\frac{(i b d) \operatorname{Subst}\left (\int \frac{\log (1+i c x)}{x} \, dx,x,x^n\right )}{2 n}\\ &=a d \log (x)+\frac{a e \log ^2\left (f x^m\right )}{2 m}+\frac{i b d \text{Li}_2\left (-i c x^n\right )}{2 n}+\frac{i b e \log \left (f x^m\right ) \text{Li}_2\left (-i c x^n\right )}{2 n}-\frac{i b d \text{Li}_2\left (i c x^n\right )}{2 n}-\frac{i b e \log \left (f x^m\right ) \text{Li}_2\left (i c x^n\right )}{2 n}-\frac{(i b e m) \int \frac{\text{Li}_2\left (-i c x^n\right )}{x} \, dx}{2 n}+\frac{(i b e m) \int \frac{\text{Li}_2\left (i c x^n\right )}{x} \, dx}{2 n}\\ &=a d \log (x)+\frac{a e \log ^2\left (f x^m\right )}{2 m}+\frac{i b d \text{Li}_2\left (-i c x^n\right )}{2 n}+\frac{i b e \log \left (f x^m\right ) \text{Li}_2\left (-i c x^n\right )}{2 n}-\frac{i b d \text{Li}_2\left (i c x^n\right )}{2 n}-\frac{i b e \log \left (f x^m\right ) \text{Li}_2\left (i c x^n\right )}{2 n}-\frac{i b e m \text{Li}_3\left (-i c x^n\right )}{2 n^2}+\frac{i b e m \text{Li}_3\left (i c x^n\right )}{2 n^2}\\ \end{align*}

Mathematica [C]  time = 0.323576, size = 116, normalized size = 0.71 \[ \frac{b c x^n \left (d+e \log \left (f x^m\right )\right ) \text{HypergeometricPFQ}\left (\left \{\frac{1}{2},\frac{1}{2},1\right \},\left \{\frac{3}{2},\frac{3}{2}\right \},-c^2 x^{2 n}\right )}{n}-\frac{b c e m x^n \text{HypergeometricPFQ}\left (\left \{\frac{1}{2},\frac{1}{2},\frac{1}{2},1\right \},\left \{\frac{3}{2},\frac{3}{2},\frac{3}{2}\right \},-c^2 x^{2 n}\right )}{n^2}+\frac{1}{2} a \log (x) \left (2 d+2 e \log \left (f x^m\right )-e m \log (x)\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[((a + b*ArcTan[c*x^n])*(d + e*Log[f*x^m]))/x,x]

[Out]

-((b*c*e*m*x^n*HypergeometricPFQ[{1/2, 1/2, 1/2, 1}, {3/2, 3/2, 3/2}, -(c^2*x^(2*n))])/n^2) + (b*c*x^n*Hyperge
ometricPFQ[{1/2, 1/2, 1}, {3/2, 3/2}, -(c^2*x^(2*n))]*(d + e*Log[f*x^m]))/n + (a*Log[x]*(2*d - e*m*Log[x] + 2*
e*Log[f*x^m]))/2

________________________________________________________________________________________

Maple [C]  time = 0.422, size = 896, normalized size = 5.5 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/4/n*Pi*dilog(1-I*c*x^n)*b*e*csgn(I*f*x^m)^3+1/n*ln(f)*ln(x^n)*a*e-1/2*I*b*e*m*polylog(3,-I*c*x^n)/n^2+1/4/n
*Pi*dilog(1+I*c*x^n)*b*e*csgn(I*x^m)*csgn(I*f*x^m)*csgn(I*f)-1/4/n*Pi*dilog(1-I*c*x^n)*b*e*csgn(I*x^m)*csgn(I*
f*x^m)*csgn(I*f)+1/2*I*e*b/n*ln(-I*(-c*x^n+I))*ln(-I*c*x^n)*m*ln(x)+1/2*I/n*Pi*ln(x^n)*a*e*csgn(I*x^m)*csgn(I*
f*x^m)^2+1/2*I/n*Pi*ln(x^n)*a*e*csgn(I*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
(-I*c*x^n)*m*ln(x)-1/2*I/n*Pi*ln(x^n)*a*e*csgn(I*x^m)*csgn(I*f*x^m)*csgn(I*f)+1/2*I*b*e*m*polylog(3,I*c*x^n)/n
^2

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{a e \log \left (f x^{m}\right )^{2}}{2 \, m} + a d \log \left (x\right ) - \frac{1}{2} \,{\left (b e m \log \left (x\right )^{2} - 2 \, b e \log \left (x\right ) \log \left (x^{m}\right ) - 2 \,{\left (b e \log \left (f\right ) + b d\right )} \log \left (x\right )\right )} \arctan \left (c x^{n}\right ) - \int -\frac{b c e m n x^{n} \log \left (x\right )^{2} - 2 \, b c e n x^{n} \log \left (x\right ) \log \left (x^{m}\right ) - 2 \,{\left (b c e \log \left (f\right ) + b c d\right )} n x^{n} \log \left (x\right )}{2 \,{\left (c^{2} x x^{2 \, n} + x\right )}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [C]  time = 2.17444, size = 711, normalized size = 4.36 \begin{align*} \frac{2 \, a e m n^{2} \log \left (x\right )^{2} + 2 i \, b e m{\rm polylog}\left (3, i \, c x^{n}\right ) - 2 i \, b e m{\rm polylog}\left (3, -i \, c x^{n}\right ) + 2 \,{\left (b e m n^{2} \log \left (x\right )^{2} + 2 \,{\left (b e n^{2} \log \left (f\right ) + b d n^{2}\right )} \log \left (x\right )\right )} \arctan \left (c x^{n}\right ) +{\left (-2 i \, b e m n \log \left (x\right ) - 2 i \, b e n \log \left (f\right ) - 2 i \, b d n\right )}{\rm Li}_2\left (i \, c x^{n}\right ) +{\left (2 i \, b e m n \log \left (x\right ) + 2 i \, b e n \log \left (f\right ) + 2 i \, b d n\right )}{\rm Li}_2\left (-i \, c x^{n}\right ) +{\left (i \, b e m n^{2} \log \left (x\right )^{2} +{\left (2 i \, b e n^{2} \log \left (f\right ) + 2 i \, b d n^{2}\right )} \log \left (x\right )\right )} \log \left (i \, c x^{n} + 1\right ) +{\left (-i \, b e m n^{2} \log \left (x\right )^{2} +{\left (-2 i \, b e n^{2} \log \left (f\right ) - 2 i \, b d n^{2}\right )} \log \left (x\right )\right )} \log \left (-i \, c x^{n} + 1\right ) + 4 \,{\left (a e n^{2} \log \left (f\right ) + a d n^{2}\right )} \log \left (x\right )}{4 \, n^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/4*(2*a*e*m*n^2*log(x)^2 + 2*I*b*e*m*polylog(3, I*c*x^n) - 2*I*b*e*m*polylog(3, -I*c*x^n) + 2*(b*e*m*n^2*log(
x)^2 + 2*(b*e*n^2*log(f) + b*d*n^2)*log(x))*arctan(c*x^n) + (-2*I*b*e*m*n*log(x) - 2*I*b*e*n*log(f) - 2*I*b*d*
n)*dilog(I*c*x^n) + (2*I*b*e*m*n*log(x) + 2*I*b*e*n*log(f) + 2*I*b*d*n)*dilog(-I*c*x^n) + (I*b*e*m*n^2*log(x)^
2 + (2*I*b*e*n^2*log(f) + 2*I*b*d*n^2)*log(x))*log(I*c*x^n + 1) + (-I*b*e*m*n^2*log(x)^2 + (-2*I*b*e*n^2*log(f
) - 2*I*b*d*n^2)*log(x))*log(-I*c*x^n + 1) + 4*(a*e*n^2*log(f) + a*d*n^2)*log(x))/n^2

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (b \arctan \left (c x^{n}\right ) + a\right )}{\left (e \log \left (f x^{m}\right ) + d\right )}}{x}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate((b*arctan(c*x^n) + a)*(e*log(f*x^m) + d)/x, x)