Integrand size = 10, antiderivative size = 90 \[ \int x \tan ^3(a+b x) \, dx=\frac {x}{2 b}-\frac {i x^2}{2}+\frac {x \log \left (1+e^{2 i (a+b x)}\right )}{b}-\frac {i \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{2 b^2}-\frac {\tan (a+b x)}{2 b^2}+\frac {x \tan ^2(a+b x)}{2 b} \] Output:
1/2*x/b-1/2*I*x^2+x*ln(1+exp(2*I*(b*x+a)))/b-1/2*I*polylog(2,-exp(2*I*(b*x +a)))/b^2-1/2*tan(b*x+a)/b^2+1/2*x*tan(b*x+a)^2/b
Time = 4.33 (sec) , antiderivative size = 171, normalized size of antiderivative = 1.90 \[ \int x \tan ^3(a+b x) \, dx=\frac {i b x (\pi +2 \arctan (\cot (a)))+\pi \log \left (1+e^{-2 i b x}\right )+2 (b x-\arctan (\cot (a))) \log \left (1-e^{2 i (b x-\arctan (\cot (a)))}\right )-\pi \log (\cos (b x))+2 \arctan (\cot (a)) \log (\sin (b x-\arctan (\cot (a))))-i \operatorname {PolyLog}\left (2,e^{2 i (b x-\arctan (\cot (a)))}\right )+b x \sec ^2(a+b x)-\sec (a) \sec (a+b x) \sin (b x)-b^2 x^2 \tan (a)+b^2 e^{-i \arctan (\cot (a))} x^2 \sqrt {\csc ^2(a)} \tan (a)}{2 b^2} \] Input:
Integrate[x*Tan[a + b*x]^3,x]
Output:
(I*b*x*(Pi + 2*ArcTan[Cot[a]]) + Pi*Log[1 + E^((-2*I)*b*x)] + 2*(b*x - Arc Tan[Cot[a]])*Log[1 - E^((2*I)*(b*x - ArcTan[Cot[a]]))] - Pi*Log[Cos[b*x]] + 2*ArcTan[Cot[a]]*Log[Sin[b*x - ArcTan[Cot[a]]]] - I*PolyLog[2, E^((2*I)* (b*x - ArcTan[Cot[a]]))] + b*x*Sec[a + b*x]^2 - Sec[a]*Sec[a + b*x]*Sin[b* x] - b^2*x^2*Tan[a] + (b^2*x^2*Sqrt[Csc[a]^2]*Tan[a])/E^(I*ArcTan[Cot[a]]) )/(2*b^2)
Time = 0.48 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.09, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.900, Rules used = {3042, 4203, 3042, 3954, 24, 4202, 2620, 2715, 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 x \tan ^3(a+b x) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int x \tan (a+b x)^3dx\) |
\(\Big \downarrow \) 4203 |
\(\displaystyle -\frac {\int \tan ^2(a+b x)dx}{2 b}-\int x \tan (a+b x)dx+\frac {x \tan ^2(a+b x)}{2 b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\int x \tan (a+b x)dx-\frac {\int \tan (a+b x)^2dx}{2 b}+\frac {x \tan ^2(a+b x)}{2 b}\) |
\(\Big \downarrow \) 3954 |
\(\displaystyle -\frac {\frac {\tan (a+b x)}{b}-\int 1dx}{2 b}-\int x \tan (a+b x)dx+\frac {x \tan ^2(a+b x)}{2 b}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle -\int x \tan (a+b x)dx+\frac {x \tan ^2(a+b x)}{2 b}-\frac {\frac {\tan (a+b x)}{b}-x}{2 b}\) |
\(\Big \downarrow \) 4202 |
\(\displaystyle 2 i \int \frac {e^{2 i (a+b x)} x}{1+e^{2 i (a+b x)}}dx+\frac {x \tan ^2(a+b x)}{2 b}-\frac {\frac {\tan (a+b x)}{b}-x}{2 b}-\frac {i x^2}{2}\) |
\(\Big \downarrow \) 2620 |
\(\displaystyle 2 i \left (\frac {i \int \log \left (1+e^{2 i (a+b x)}\right )dx}{2 b}-\frac {i x \log \left (1+e^{2 i (a+b x)}\right )}{2 b}\right )+\frac {x \tan ^2(a+b x)}{2 b}-\frac {\frac {\tan (a+b x)}{b}-x}{2 b}-\frac {i x^2}{2}\) |
\(\Big \downarrow \) 2715 |
\(\displaystyle 2 i \left (\frac {\int e^{-2 i (a+b x)} \log \left (1+e^{2 i (a+b x)}\right )de^{2 i (a+b x)}}{4 b^2}-\frac {i x \log \left (1+e^{2 i (a+b x)}\right )}{2 b}\right )+\frac {x \tan ^2(a+b x)}{2 b}-\frac {\frac {\tan (a+b x)}{b}-x}{2 b}-\frac {i x^2}{2}\) |
\(\Big \downarrow \) 2838 |
\(\displaystyle 2 i \left (-\frac {\operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{4 b^2}-\frac {i x \log \left (1+e^{2 i (a+b x)}\right )}{2 b}\right )+\frac {x \tan ^2(a+b x)}{2 b}-\frac {\frac {\tan (a+b x)}{b}-x}{2 b}-\frac {i x^2}{2}\) |
Input:
Int[x*Tan[a + b*x]^3,x]
Output:
(-1/2*I)*x^2 + (2*I)*(((-1/2*I)*x*Log[1 + E^((2*I)*(a + b*x))])/b - PolyLo g[2, -E^((2*I)*(a + b*x))]/(4*b^2)) + (x*Tan[a + b*x]^2)/(2*b) - (-x + Tan [a + b*x]/b)/(2*b)
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[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Simp[1/(d*e*n*Log[F]) Subst[Int[Log[a + b*x]/x, x], x, (F^(e*(c + d*x) ))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]
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]
Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b*((b*Tan[c + d *x])^(n - 1)/(d*(n - 1))), x] - Simp[b^2 Int[(b*Tan[c + d*x])^(n - 2), x] , x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]
Int[((c_.) + (d_.)*(x_))^(m_.)*tan[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[I *((c + d*x)^(m + 1)/(d*(m + 1))), x] - Simp[2*I Int[(c + d*x)^m*(E^(2*I*( e + f*x))/(1 + E^(2*I*(e + f*x)))), x], x] /; FreeQ[{c, d, e, f}, x] && IGt Q[m, 0]
Int[((c_.) + (d_.)*(x_))^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symb ol] :> Simp[b*(c + d*x)^m*((b*Tan[e + f*x])^(n - 1)/(f*(n - 1))), x] + (-Si mp[b*d*(m/(f*(n - 1))) Int[(c + d*x)^(m - 1)*(b*Tan[e + f*x])^(n - 1), x] , x] - Simp[b^2 Int[(c + d*x)^m*(b*Tan[e + f*x])^(n - 2), x], x]) /; Free Q[{b, c, d, e, f}, x] && GtQ[n, 1] && GtQ[m, 0]
Time = 0.21 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.36
method | result | size |
risch | \(-\frac {i x^{2}}{2}+\frac {2 b x \,{\mathrm e}^{2 i \left (b x +a \right )}-i {\mathrm e}^{2 i \left (b x +a \right )}-i}{b^{2} \left (1+{\mathrm e}^{2 i \left (b x +a \right )}\right )^{2}}-\frac {2 i a x}{b}-\frac {i a^{2}}{b^{2}}+\frac {x \ln \left (1+{\mathrm e}^{2 i \left (b x +a \right )}\right )}{b}-\frac {i \operatorname {polylog}\left (2, -{\mathrm e}^{2 i \left (b x +a \right )}\right )}{2 b^{2}}+\frac {2 a \ln \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}\) | \(122\) |
Input:
int(x*tan(b*x+a)^3,x,method=_RETURNVERBOSE)
Output:
-1/2*I*x^2+(2*b*x*exp(2*I*(b*x+a))-I*exp(2*I*(b*x+a))-I)/b^2/(1+exp(2*I*(b *x+a)))^2-2*I/b*a*x-I/b^2*a^2+x*ln(1+exp(2*I*(b*x+a)))/b-1/2*I*polylog(2,- exp(2*I*(b*x+a)))/b^2+2/b^2*a*ln(exp(I*(b*x+a)))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 146 vs. \(2 (71) = 142\).
Time = 0.08 (sec) , antiderivative size = 146, normalized size of antiderivative = 1.62 \[ \int x \tan ^3(a+b x) \, dx=\frac {2 \, b x \tan \left (b x + a\right )^{2} + 2 \, b x \log \left (-\frac {2 \, {\left (i \, \tan \left (b x + a\right ) - 1\right )}}{\tan \left (b x + a\right )^{2} + 1}\right ) + 2 \, b x \log \left (-\frac {2 \, {\left (-i \, \tan \left (b x + a\right ) - 1\right )}}{\tan \left (b x + a\right )^{2} + 1}\right ) + 2 \, b x + i \, {\rm Li}_2\left (\frac {2 \, {\left (i \, \tan \left (b x + a\right ) - 1\right )}}{\tan \left (b x + a\right )^{2} + 1} + 1\right ) - i \, {\rm Li}_2\left (\frac {2 \, {\left (-i \, \tan \left (b x + a\right ) - 1\right )}}{\tan \left (b x + a\right )^{2} + 1} + 1\right ) - 2 \, \tan \left (b x + a\right )}{4 \, b^{2}} \] Input:
integrate(x*tan(b*x+a)^3,x, algorithm="fricas")
Output:
1/4*(2*b*x*tan(b*x + a)^2 + 2*b*x*log(-2*(I*tan(b*x + a) - 1)/(tan(b*x + a )^2 + 1)) + 2*b*x*log(-2*(-I*tan(b*x + a) - 1)/(tan(b*x + a)^2 + 1)) + 2*b *x + I*dilog(2*(I*tan(b*x + a) - 1)/(tan(b*x + a)^2 + 1) + 1) - I*dilog(2* (-I*tan(b*x + a) - 1)/(tan(b*x + a)^2 + 1) + 1) - 2*tan(b*x + a))/b^2
\[ \int x \tan ^3(a+b x) \, dx=\int x \tan ^{3}{\left (a + b x \right )}\, dx \] Input:
integrate(x*tan(b*x+a)**3,x)
Output:
Integral(x*tan(a + b*x)**3, x)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 386 vs. \(2 (71) = 142\).
Time = 0.25 (sec) , antiderivative size = 386, normalized size of antiderivative = 4.29 \[ \int x \tan ^3(a+b x) \, dx=-\frac {b^{2} x^{2} \cos \left (4 \, b x + 4 \, a\right ) + i \, b^{2} x^{2} \sin \left (4 \, b x + 4 \, a\right ) + b^{2} x^{2} - 2 \, {\left (b x \cos \left (4 \, b x + 4 \, a\right ) + 2 \, b x \cos \left (2 \, b x + 2 \, a\right ) + i \, b x \sin \left (4 \, b x + 4 \, a\right ) + 2 i \, b x \sin \left (2 \, b x + 2 \, a\right ) + b x\right )} \arctan \left (\sin \left (2 \, b x + 2 \, a\right ), \cos \left (2 \, b x + 2 \, a\right ) + 1\right ) + 2 \, {\left (b^{2} x^{2} + 2 i \, b x + 1\right )} \cos \left (2 \, b x + 2 \, a\right ) + {\left (\cos \left (4 \, b x + 4 \, a\right ) + 2 \, \cos \left (2 \, b x + 2 \, a\right ) + i \, \sin \left (4 \, b x + 4 \, a\right ) + 2 i \, \sin \left (2 \, b x + 2 \, a\right ) + 1\right )} {\rm Li}_2\left (-e^{\left (2 i \, b x + 2 i \, a\right )}\right ) - {\left (-i \, b x \cos \left (4 \, b x + 4 \, a\right ) - 2 i \, b x \cos \left (2 \, b x + 2 \, a\right ) + b x \sin \left (4 \, b x + 4 \, a\right ) + 2 \, b x \sin \left (2 \, b x + 2 \, a\right ) - i \, b x\right )} \log \left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right ) + 2 \, {\left (i \, b^{2} x^{2} - 2 \, b x + i\right )} \sin \left (2 \, b x + 2 \, a\right ) + 2}{-2 i \, b^{2} \cos \left (4 \, b x + 4 \, a\right ) - 4 i \, b^{2} \cos \left (2 \, b x + 2 \, a\right ) + 2 \, b^{2} \sin \left (4 \, b x + 4 \, a\right ) + 4 \, b^{2} \sin \left (2 \, b x + 2 \, a\right ) - 2 i \, b^{2}} \] Input:
integrate(x*tan(b*x+a)^3,x, algorithm="maxima")
Output:
-(b^2*x^2*cos(4*b*x + 4*a) + I*b^2*x^2*sin(4*b*x + 4*a) + b^2*x^2 - 2*(b*x *cos(4*b*x + 4*a) + 2*b*x*cos(2*b*x + 2*a) + I*b*x*sin(4*b*x + 4*a) + 2*I* b*x*sin(2*b*x + 2*a) + b*x)*arctan2(sin(2*b*x + 2*a), cos(2*b*x + 2*a) + 1 ) + 2*(b^2*x^2 + 2*I*b*x + 1)*cos(2*b*x + 2*a) + (cos(4*b*x + 4*a) + 2*cos (2*b*x + 2*a) + I*sin(4*b*x + 4*a) + 2*I*sin(2*b*x + 2*a) + 1)*dilog(-e^(2 *I*b*x + 2*I*a)) - (-I*b*x*cos(4*b*x + 4*a) - 2*I*b*x*cos(2*b*x + 2*a) + b *x*sin(4*b*x + 4*a) + 2*b*x*sin(2*b*x + 2*a) - I*b*x)*log(cos(2*b*x + 2*a) ^2 + sin(2*b*x + 2*a)^2 + 2*cos(2*b*x + 2*a) + 1) + 2*(I*b^2*x^2 - 2*b*x + I)*sin(2*b*x + 2*a) + 2)/(-2*I*b^2*cos(4*b*x + 4*a) - 4*I*b^2*cos(2*b*x + 2*a) + 2*b^2*sin(4*b*x + 4*a) + 4*b^2*sin(2*b*x + 2*a) - 2*I*b^2)
\[ \int x \tan ^3(a+b x) \, dx=\int { x \tan \left (b x + a\right )^{3} \,d x } \] Input:
integrate(x*tan(b*x+a)^3,x, algorithm="giac")
Output:
integrate(x*tan(b*x + a)^3, x)
Timed out. \[ \int x \tan ^3(a+b x) \, dx=\int x\,{\mathrm {tan}\left (a+b\,x\right )}^3 \,d x \] Input:
int(x*tan(a + b*x)^3,x)
Output:
int(x*tan(a + b*x)^3, x)
\[ \int x \tan ^3(a+b x) \, dx=\int \tan \left (b x +a \right )^{3} x d x \] Input:
int(x*tan(b*x+a)^3,x)
Output:
int(tan(a + b*x)**3*x,x)