Integrand size = 15, antiderivative size = 351 \[ \int x^2 \arctan (c+d \coth (a+b x)) \, dx=\frac {1}{3} x^3 \arctan (c+d \coth (a+b x))+\frac {1}{6} i x^3 \log \left (1-\frac {(i-c-d) e^{2 a+2 b x}}{i-c+d}\right )-\frac {1}{6} i x^3 \log \left (1-\frac {(i+c+d) e^{2 a+2 b x}}{i+c-d}\right )+\frac {i x^2 \operatorname {PolyLog}\left (2,\frac {(i-c-d) e^{2 a+2 b x}}{i-c+d}\right )}{4 b}-\frac {i x^2 \operatorname {PolyLog}\left (2,\frac {(i+c+d) e^{2 a+2 b x}}{i+c-d}\right )}{4 b}-\frac {i x \operatorname {PolyLog}\left (3,\frac {(i-c-d) e^{2 a+2 b x}}{i-c+d}\right )}{4 b^2}+\frac {i x \operatorname {PolyLog}\left (3,\frac {(i+c+d) e^{2 a+2 b x}}{i+c-d}\right )}{4 b^2}+\frac {i \operatorname {PolyLog}\left (4,\frac {(i-c-d) e^{2 a+2 b x}}{i-c+d}\right )}{8 b^3}-\frac {i \operatorname {PolyLog}\left (4,\frac {(i+c+d) e^{2 a+2 b x}}{i+c-d}\right )}{8 b^3} \]
1/3*x^3*arctan(c+d*coth(b*x+a))+1/6*I*x^3*ln(1-(I-c-d)*exp(2*b*x+2*a)/(I-c +d))-1/6*I*x^3*ln(1-(I+c+d)*exp(2*b*x+2*a)/(I+c-d))+1/4*I*x^2*polylog(2,(I -c-d)*exp(2*b*x+2*a)/(I-c+d))/b-1/4*I*x^2*polylog(2,(I+c+d)*exp(2*b*x+2*a) /(I+c-d))/b-1/4*I*x*polylog(3,(I-c-d)*exp(2*b*x+2*a)/(I-c+d))/b^2+1/4*I*x* polylog(3,(I+c+d)*exp(2*b*x+2*a)/(I+c-d))/b^2+1/8*I*polylog(4,(I-c-d)*exp( 2*b*x+2*a)/(I-c+d))/b^3-1/8*I*polylog(4,(I+c+d)*exp(2*b*x+2*a)/(I+c-d))/b^ 3
Time = 0.94 (sec) , antiderivative size = 442, normalized size of antiderivative = 1.26 \[ \int x^2 \arctan (c+d \coth (a+b x)) \, dx=\frac {1}{3} x^3 \arctan (c+d \coth (a+b x))+\frac {d \left (4 b^3 x^3 \log \left (1-\frac {\left (1+(c+d)^2\right ) e^{2 (a+b x)}}{1+c^2-d^2+2 \sqrt {-d^2}}\right )-4 b^3 x^3 \log \left (1+\frac {\left (1+(c+d)^2\right ) e^{2 (a+b x)}}{-1-c^2+d^2+2 \sqrt {-d^2}}\right )+6 b^2 x^2 \operatorname {PolyLog}\left (2,\frac {\left (1+c^2+2 c d+d^2\right ) e^{2 (a+b x)}}{1+c^2-d^2+2 \sqrt {-d^2}}\right )-6 b^2 x^2 \operatorname {PolyLog}\left (2,-\frac {\left (1+(c+d)^2\right ) e^{2 (a+b x)}}{-1-c^2+d^2+2 \sqrt {-d^2}}\right )-6 b x \operatorname {PolyLog}\left (3,\frac {\left (1+c^2+2 c d+d^2\right ) e^{2 (a+b x)}}{1+c^2-d^2+2 \sqrt {-d^2}}\right )+6 b x \operatorname {PolyLog}\left (3,-\frac {\left (1+(c+d)^2\right ) e^{2 (a+b x)}}{-1-c^2+d^2+2 \sqrt {-d^2}}\right )-3 \operatorname {PolyLog}\left (4,\frac {\left (1+c^2+2 c d+d^2\right ) e^{2 (a+b x)}}{1+c^2-d^2-2 \sqrt {-d^2}}\right )+3 \operatorname {PolyLog}\left (4,\frac {\left (1+c^2+2 c d+d^2\right ) e^{2 (a+b x)}}{1+c^2-d^2+2 \sqrt {-d^2}}\right )\right )}{24 b^3 \sqrt {-d^2}} \]
(x^3*ArcTan[c + d*Coth[a + b*x]])/3 + (d*(4*b^3*x^3*Log[1 - ((1 + (c + d)^ 2)*E^(2*(a + b*x)))/(1 + c^2 - d^2 + 2*Sqrt[-d^2])] - 4*b^3*x^3*Log[1 + (( 1 + (c + d)^2)*E^(2*(a + b*x)))/(-1 - c^2 + d^2 + 2*Sqrt[-d^2])] + 6*b^2*x ^2*PolyLog[2, ((1 + c^2 + 2*c*d + d^2)*E^(2*(a + b*x)))/(1 + c^2 - d^2 + 2 *Sqrt[-d^2])] - 6*b^2*x^2*PolyLog[2, -(((1 + (c + d)^2)*E^(2*(a + b*x)))/( -1 - c^2 + d^2 + 2*Sqrt[-d^2]))] - 6*b*x*PolyLog[3, ((1 + c^2 + 2*c*d + d^ 2)*E^(2*(a + b*x)))/(1 + c^2 - d^2 + 2*Sqrt[-d^2])] + 6*b*x*PolyLog[3, -(( (1 + (c + d)^2)*E^(2*(a + b*x)))/(-1 - c^2 + d^2 + 2*Sqrt[-d^2]))] - 3*Pol yLog[4, ((1 + c^2 + 2*c*d + d^2)*E^(2*(a + b*x)))/(1 + c^2 - d^2 - 2*Sqrt[ -d^2])] + 3*PolyLog[4, ((1 + c^2 + 2*c*d + d^2)*E^(2*(a + b*x)))/(1 + c^2 - d^2 + 2*Sqrt[-d^2])]))/(24*b^3*Sqrt[-d^2])
Time = 1.44 (sec) , antiderivative size = 437, normalized size of antiderivative = 1.25, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {5724, 2620, 3011, 7163, 2720, 7143}
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 x^2 \arctan (d \coth (a+b x)+c) \, dx\) |
\(\Big \downarrow \) 5724 |
\(\displaystyle \frac {1}{3} b (1+i (c+d)) \int \frac {e^{2 a+2 b x} x^3}{-c-(-c-d+i) e^{2 a+2 b x}+d+i}dx-\frac {1}{3} b (1-i (c+d)) \int \frac {e^{2 a+2 b x} x^3}{c-(c+d+i) e^{2 a+2 b x}-d+i}dx+\frac {1}{3} x^3 \arctan (d \coth (a+b x)+c)\) |
\(\Big \downarrow \) 2620 |
\(\displaystyle \frac {1}{3} b (1+i (c+d)) \left (\frac {3 \int x^2 \log \left (1-\frac {(-c-d+i) e^{2 a+2 b x}}{-c+d+i}\right )dx}{2 b (-c-d+i)}-\frac {x^3 \log \left (1-\frac {(-c-d+i) e^{2 a+2 b x}}{-c+d+i}\right )}{2 b (-c-d+i)}\right )-\frac {1}{3} b (1-i (c+d)) \left (\frac {3 \int x^2 \log \left (1-\frac {(c+d+i) e^{2 a+2 b x}}{c-d+i}\right )dx}{2 b (c+d+i)}-\frac {x^3 \log \left (1-\frac {(c+d+i) e^{2 a+2 b x}}{c-d+i}\right )}{2 b (c+d+i)}\right )+\frac {1}{3} x^3 \arctan (d \coth (a+b x)+c)\) |
\(\Big \downarrow \) 3011 |
\(\displaystyle \frac {1}{3} b (1+i (c+d)) \left (\frac {3 \left (\frac {\int x \operatorname {PolyLog}\left (2,\frac {(-c-d+i) e^{2 a+2 b x}}{-c+d+i}\right )dx}{b}-\frac {x^2 \operatorname {PolyLog}\left (2,\frac {(-c-d+i) e^{2 a+2 b x}}{-c+d+i}\right )}{2 b}\right )}{2 b (-c-d+i)}-\frac {x^3 \log \left (1-\frac {(-c-d+i) e^{2 a+2 b x}}{-c+d+i}\right )}{2 b (-c-d+i)}\right )-\frac {1}{3} b (1-i (c+d)) \left (\frac {3 \left (\frac {\int x \operatorname {PolyLog}\left (2,\frac {(c+d+i) e^{2 a+2 b x}}{c-d+i}\right )dx}{b}-\frac {x^2 \operatorname {PolyLog}\left (2,\frac {(c+d+i) e^{2 a+2 b x}}{c-d+i}\right )}{2 b}\right )}{2 b (c+d+i)}-\frac {x^3 \log \left (1-\frac {(c+d+i) e^{2 a+2 b x}}{c-d+i}\right )}{2 b (c+d+i)}\right )+\frac {1}{3} x^3 \arctan (d \coth (a+b x)+c)\) |
\(\Big \downarrow \) 7163 |
\(\displaystyle \frac {1}{3} b (1+i (c+d)) \left (\frac {3 \left (\frac {\frac {x \operatorname {PolyLog}\left (3,\frac {(-c-d+i) e^{2 a+2 b x}}{-c+d+i}\right )}{2 b}-\frac {\int \operatorname {PolyLog}\left (3,\frac {(-c-d+i) e^{2 a+2 b x}}{-c+d+i}\right )dx}{2 b}}{b}-\frac {x^2 \operatorname {PolyLog}\left (2,\frac {(-c-d+i) e^{2 a+2 b x}}{-c+d+i}\right )}{2 b}\right )}{2 b (-c-d+i)}-\frac {x^3 \log \left (1-\frac {(-c-d+i) e^{2 a+2 b x}}{-c+d+i}\right )}{2 b (-c-d+i)}\right )-\frac {1}{3} b (1-i (c+d)) \left (\frac {3 \left (\frac {\frac {x \operatorname {PolyLog}\left (3,\frac {(c+d+i) e^{2 a+2 b x}}{c-d+i}\right )}{2 b}-\frac {\int \operatorname {PolyLog}\left (3,\frac {(c+d+i) e^{2 a+2 b x}}{c-d+i}\right )dx}{2 b}}{b}-\frac {x^2 \operatorname {PolyLog}\left (2,\frac {(c+d+i) e^{2 a+2 b x}}{c-d+i}\right )}{2 b}\right )}{2 b (c+d+i)}-\frac {x^3 \log \left (1-\frac {(c+d+i) e^{2 a+2 b x}}{c-d+i}\right )}{2 b (c+d+i)}\right )+\frac {1}{3} x^3 \arctan (d \coth (a+b x)+c)\) |
\(\Big \downarrow \) 2720 |
\(\displaystyle \frac {1}{3} b (1+i (c+d)) \left (\frac {3 \left (\frac {\frac {x \operatorname {PolyLog}\left (3,\frac {(-c-d+i) e^{2 a+2 b x}}{-c+d+i}\right )}{2 b}-\frac {\int e^{-2 a-2 b x} \operatorname {PolyLog}\left (3,\frac {(-c-d+i) e^{2 a+2 b x}}{-c+d+i}\right )de^{2 a+2 b x}}{4 b^2}}{b}-\frac {x^2 \operatorname {PolyLog}\left (2,\frac {(-c-d+i) e^{2 a+2 b x}}{-c+d+i}\right )}{2 b}\right )}{2 b (-c-d+i)}-\frac {x^3 \log \left (1-\frac {(-c-d+i) e^{2 a+2 b x}}{-c+d+i}\right )}{2 b (-c-d+i)}\right )-\frac {1}{3} b (1-i (c+d)) \left (\frac {3 \left (\frac {\frac {x \operatorname {PolyLog}\left (3,\frac {(c+d+i) e^{2 a+2 b x}}{c-d+i}\right )}{2 b}-\frac {\int e^{-2 a-2 b x} \operatorname {PolyLog}\left (3,\frac {(c+d+i) e^{2 a+2 b x}}{c-d+i}\right )de^{2 a+2 b x}}{4 b^2}}{b}-\frac {x^2 \operatorname {PolyLog}\left (2,\frac {(c+d+i) e^{2 a+2 b x}}{c-d+i}\right )}{2 b}\right )}{2 b (c+d+i)}-\frac {x^3 \log \left (1-\frac {(c+d+i) e^{2 a+2 b x}}{c-d+i}\right )}{2 b (c+d+i)}\right )+\frac {1}{3} x^3 \arctan (d \coth (a+b x)+c)\) |
\(\Big \downarrow \) 7143 |
\(\displaystyle \frac {1}{3} x^3 \arctan (d \coth (a+b x)+c)+\frac {1}{3} b (1+i (c+d)) \left (\frac {3 \left (\frac {\frac {x \operatorname {PolyLog}\left (3,\frac {(-c-d+i) e^{2 a+2 b x}}{-c+d+i}\right )}{2 b}-\frac {\operatorname {PolyLog}\left (4,\frac {(-c-d+i) e^{2 a+2 b x}}{-c+d+i}\right )}{4 b^2}}{b}-\frac {x^2 \operatorname {PolyLog}\left (2,\frac {(-c-d+i) e^{2 a+2 b x}}{-c+d+i}\right )}{2 b}\right )}{2 b (-c-d+i)}-\frac {x^3 \log \left (1-\frac {(-c-d+i) e^{2 a+2 b x}}{-c+d+i}\right )}{2 b (-c-d+i)}\right )-\frac {1}{3} b (1-i (c+d)) \left (\frac {3 \left (\frac {\frac {x \operatorname {PolyLog}\left (3,\frac {(c+d+i) e^{2 a+2 b x}}{c-d+i}\right )}{2 b}-\frac {\operatorname {PolyLog}\left (4,\frac {(c+d+i) e^{2 a+2 b x}}{c-d+i}\right )}{4 b^2}}{b}-\frac {x^2 \operatorname {PolyLog}\left (2,\frac {(c+d+i) e^{2 a+2 b x}}{c-d+i}\right )}{2 b}\right )}{2 b (c+d+i)}-\frac {x^3 \log \left (1-\frac {(c+d+i) e^{2 a+2 b x}}{c-d+i}\right )}{2 b (c+d+i)}\right )\) |
(x^3*ArcTan[c + d*Coth[a + b*x]])/3 + (b*(1 + I*(c + d))*(-1/2*(x^3*Log[1 - ((I - c - d)*E^(2*a + 2*b*x))/(I - c + d)])/(b*(I - c - d)) + (3*(-1/2*( x^2*PolyLog[2, ((I - c - d)*E^(2*a + 2*b*x))/(I - c + d)])/b + ((x*PolyLog [3, ((I - c - d)*E^(2*a + 2*b*x))/(I - c + d)])/(2*b) - PolyLog[4, ((I - c - d)*E^(2*a + 2*b*x))/(I - c + d)]/(4*b^2))/b))/(2*b*(I - c - d))))/3 - ( b*(1 - I*(c + d))*(-1/2*(x^3*Log[1 - ((I + c + d)*E^(2*a + 2*b*x))/(I + c - d)])/(b*(I + c + d)) + (3*(-1/2*(x^2*PolyLog[2, ((I + c + d)*E^(2*a + 2* b*x))/(I + c - d)])/b + ((x*PolyLog[3, ((I + c + d)*E^(2*a + 2*b*x))/(I + c - d)])/(2*b) - PolyLog[4, ((I + c + d)*E^(2*a + 2*b*x))/(I + c - d)]/(4* b^2))/b))/(2*b*(I + c + d))))/3
3.1.98.3.1 Defintions of rubi rules used
Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/ ((a_) + (b_.)*((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp [((c + d*x)^m/(b*f*g*n*Log[F]))*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x] - Si mp[d*(m/(b*f*g*n*Log[F])) Int[(c + d*x)^(m - 1)*Log[1 + b*((F^(g*(e + f*x )))^n/a)], x], x] /; FreeQ[{F, a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]
Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Simp[v/D[v, x] Subst[Int[FunctionOfExponentialFunction[u, x]/x, x], x, v], x]] /; Funct ionOfExponentialQ[u, x] && !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; FreeQ [{a, m, n}, x] && IntegerQ[m*n]] && !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x)) *(F_)[v_] /; FreeQ[{a, b, c}, x] && InverseFunctionQ[F[x]]]
Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.) *(x_))^(m_.), x_Symbol] :> Simp[(-(f + g*x)^m)*(PolyLog[2, (-e)*(F^(c*(a + b*x)))^n]/(b*c*n*Log[F])), x] + Simp[g*(m/(b*c*n*Log[F])) Int[(f + g*x)^( m - 1)*PolyLog[2, (-e)*(F^(c*(a + b*x)))^n], x], x] /; FreeQ[{F, a, b, c, e , f, g, n}, x] && GtQ[m, 0]
Int[ArcTan[(c_.) + Coth[(a_.) + (b_.)*(x_)]*(d_.)]*((e_.) + (f_.)*(x_))^(m_ .), x_Symbol] :> Simp[(e + f*x)^(m + 1)*(ArcTan[c + d*Coth[a + b*x]]/(f*(m + 1))), x] + (-Simp[I*b*((I - c - d)/(f*(m + 1))) Int[(e + f*x)^(m + 1)*( E^(2*a + 2*b*x)/(I - c + d - (I - c - d)*E^(2*a + 2*b*x))), x], x] + Simp[I *b*((I + c + d)/(f*(m + 1))) Int[(e + f*x)^(m + 1)*(E^(2*a + 2*b*x)/(I + c - d - (I + c + d)*E^(2*a + 2*b*x))), x], x]) /; FreeQ[{a, b, c, d, e, f}, x] && IGtQ[m, 0] && NeQ[(c - d)^2, -1]
Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_S ymbol] :> 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]
Int[((e_.) + (f_.)*(x_))^(m_.)*PolyLog[n_, (d_.)*((F_)^((c_.)*((a_.) + (b_. )*(x_))))^(p_.)], x_Symbol] :> Simp[(e + f*x)^m*(PolyLog[n + 1, d*(F^(c*(a + b*x)))^p]/(b*c*p*Log[F])), x] - Simp[f*(m/(b*c*p*Log[F])) Int[(e + f*x) ^(m - 1)*PolyLog[n + 1, d*(F^(c*(a + b*x)))^p], x], x] /; FreeQ[{F, a, b, c , d, e, f, n, p}, x] && GtQ[m, 0]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 24.98 (sec) , antiderivative size = 6845, normalized size of antiderivative = 19.50
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1269 vs. \(2 (259) = 518\).
Time = 0.36 (sec) , antiderivative size = 1269, normalized size of antiderivative = 3.62 \[ \int x^2 \arctan (c+d \coth (a+b x)) \, dx=\text {Too large to display} \]
1/6*(2*b^3*x^3*arctan((d*cosh(b*x + a) + c*sinh(b*x + a))/sinh(b*x + a)) + 3*I*b^2*x^2*dilog(sqrt((c^2 - d^2 + 2*I*d + 1)/(c^2 - 2*c*d + d^2 + 1))*( cosh(b*x + a) + sinh(b*x + a))) + 3*I*b^2*x^2*dilog(-sqrt((c^2 - d^2 + 2*I *d + 1)/(c^2 - 2*c*d + d^2 + 1))*(cosh(b*x + a) + sinh(b*x + a))) - 3*I*b^ 2*x^2*dilog(sqrt((c^2 - d^2 - 2*I*d + 1)/(c^2 - 2*c*d + d^2 + 1))*(cosh(b* x + a) + sinh(b*x + a))) - 3*I*b^2*x^2*dilog(-sqrt((c^2 - d^2 - 2*I*d + 1) /(c^2 - 2*c*d + d^2 + 1))*(cosh(b*x + a) + sinh(b*x + a))) - I*a^3*log(2*( c^2 + 2*c*d + d^2 + 1)*cosh(b*x + a) + 2*(c^2 + 2*c*d + d^2 + 1)*sinh(b*x + a) + 2*(c^2 - d^2 - 2*I*d + 1)*sqrt((c^2 - d^2 + 2*I*d + 1)/(c^2 - 2*c*d + d^2 + 1))) - I*a^3*log(2*(c^2 + 2*c*d + d^2 + 1)*cosh(b*x + a) + 2*(c^2 + 2*c*d + d^2 + 1)*sinh(b*x + a) - 2*(c^2 - d^2 - 2*I*d + 1)*sqrt((c^2 - d^2 + 2*I*d + 1)/(c^2 - 2*c*d + d^2 + 1))) + I*a^3*log(2*(c^2 + 2*c*d + d^ 2 + 1)*cosh(b*x + a) + 2*(c^2 + 2*c*d + d^2 + 1)*sinh(b*x + a) + 2*(c^2 - d^2 + 2*I*d + 1)*sqrt((c^2 - d^2 - 2*I*d + 1)/(c^2 - 2*c*d + d^2 + 1))) + I*a^3*log(2*(c^2 + 2*c*d + d^2 + 1)*cosh(b*x + a) + 2*(c^2 + 2*c*d + d^2 + 1)*sinh(b*x + a) - 2*(c^2 - d^2 + 2*I*d + 1)*sqrt((c^2 - d^2 - 2*I*d + 1) /(c^2 - 2*c*d + d^2 + 1))) - 6*I*b*x*polylog(3, sqrt((c^2 - d^2 + 2*I*d + 1)/(c^2 - 2*c*d + d^2 + 1))*(cosh(b*x + a) + sinh(b*x + a))) - 6*I*b*x*pol ylog(3, -sqrt((c^2 - d^2 + 2*I*d + 1)/(c^2 - 2*c*d + d^2 + 1))*(cosh(b*x + a) + sinh(b*x + a))) + 6*I*b*x*polylog(3, sqrt((c^2 - d^2 - 2*I*d + 1)...
Timed out. \[ \int x^2 \arctan (c+d \coth (a+b x)) \, dx=\text {Timed out} \]
\[ \int x^2 \arctan (c+d \coth (a+b x)) \, dx=\int { x^{2} \arctan \left (d \coth \left (b x + a\right ) + c\right ) \,d x } \]
1/3*x^3*arctan2((c*e^(2*a) + d*e^(2*a))*e^(2*b*x) - c + d, e^(2*b*x + 2*a) - 1) + 4*b*d*integrate(1/3*x^3*e^(2*b*x + 2*a)/(c^2 - 2*c*d + d^2 + (c^2* e^(4*a) + 2*c*d*e^(4*a) + d^2*e^(4*a) + e^(4*a))*e^(4*b*x) - 2*(c^2*e^(2*a ) - d^2*e^(2*a) + e^(2*a))*e^(2*b*x) + 1), x)
\[ \int x^2 \arctan (c+d \coth (a+b x)) \, dx=\int { x^{2} \arctan \left (d \coth \left (b x + a\right ) + c\right ) \,d x } \]
Timed out. \[ \int x^2 \arctan (c+d \coth (a+b x)) \, dx=\int x^2\,\mathrm {atan}\left (c+d\,\mathrm {coth}\left (a+b\,x\right )\right ) \,d x \]