3.491 \(\int x \tan ^3(x) \, dx\)

Optimal. Leaf size=59 \[ -\frac {1}{2} i \operatorname {PolyLog}\left (2,-e^{2 i x}\right )-\frac {i x^2}{2}+\frac {x}{2}+x \log \left (1+e^{2 i x}\right )+\frac {1}{2} x \tan ^2(x)-\frac {\tan (x)}{2} \]

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 59, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.167, Rules used = {3720, 3473, 8, 3719, 2190, 2279, 2391} \[ -\frac {1}{2} i \text {PolyLog}\left (2,-e^{2 i x}\right )-\frac {i x^2}{2}+\frac {x}{2}+x \log \left (1+e^{2 i x}\right )+\frac {1}{2} x \tan ^2(x)-\frac {\tan (x)}{2} \]

Antiderivative was successfully verified.

[In]

Int[x*Tan[x]^3,x]

[Out]

x/2 - (I/2)*x^2 + x*Log[1 + E^((2*I)*x)] - (I/2)*PolyLog[2, -E^((2*I)*x)] - Tan[x]/2 + (x*Tan[x]^2)/2

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2190

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*Log[1 + (b*(F^(g*(e + f*x)))^n)/a])/(b*f*g*n*Log[F]), x]
 - Dist[(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]

Rule 2279

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[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]

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 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 3719

Int[((c_.) + (d_.)*(x_))^(m_.)*tan[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(I*(c + d*x)^(m + 1))/(d*(m + 1)), x
] - Dist[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] &&
 IGtQ[m, 0]

Rule 3720

Int[((c_.) + (d_.)*(x_))^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(c + d*x)^m*(b*Tan[e
 + f*x])^(n - 1))/(f*(n - 1)), x] + (-Dist[(b*d*m)/(f*(n - 1)), Int[(c + d*x)^(m - 1)*(b*Tan[e + f*x])^(n - 1)
, x], x] - Dist[b^2, Int[(c + d*x)^m*(b*Tan[e + f*x])^(n - 2), x], x]) /; FreeQ[{b, c, d, e, f}, x] && GtQ[n,
1] && GtQ[m, 0]

Rubi steps

\begin {align*} \int x \tan ^3(x) \, dx &=\frac {1}{2} x \tan ^2(x)-\frac {1}{2} \int \tan ^2(x) \, dx-\int x \tan (x) \, dx\\ &=-\frac {i x^2}{2}-\frac {\tan (x)}{2}+\frac {1}{2} x \tan ^2(x)+2 i \int \frac {e^{2 i x} x}{1+e^{2 i x}} \, dx+\frac {\int 1 \, dx}{2}\\ &=\frac {x}{2}-\frac {i x^2}{2}+x \log \left (1+e^{2 i x}\right )-\frac {\tan (x)}{2}+\frac {1}{2} x \tan ^2(x)-\int \log \left (1+e^{2 i x}\right ) \, dx\\ &=\frac {x}{2}-\frac {i x^2}{2}+x \log \left (1+e^{2 i x}\right )-\frac {\tan (x)}{2}+\frac {1}{2} x \tan ^2(x)+\frac {1}{2} i \operatorname {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{2 i x}\right )\\ &=\frac {x}{2}-\frac {i x^2}{2}+x \log \left (1+e^{2 i x}\right )-\frac {1}{2} i \text {Li}_2\left (-e^{2 i x}\right )-\frac {\tan (x)}{2}+\frac {1}{2} x \tan ^2(x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 54, normalized size = 0.92 \[ -\frac {1}{2} i \operatorname {PolyLog}\left (2,-e^{2 i x}\right )-\frac {i x^2}{2}+x \log \left (1+e^{2 i x}\right )-\frac {\tan (x)}{2}+\frac {1}{2} x \sec ^2(x) \]

Antiderivative was successfully verified.

[In]

Integrate[x*Tan[x]^3,x]

[Out]

(-1/2*I)*x^2 + x*Log[1 + E^((2*I)*x)] - (I/2)*PolyLog[2, -E^((2*I)*x)] + (x*Sec[x]^2)/2 - Tan[x]/2

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int x \tan ^3(x) \, dx \]

Verification is Not applicable to the result.

[In]

IntegrateAlgebraic[x*Tan[x]^3,x]

[Out]

Could not integrate

________________________________________________________________________________________

fricas [B]  time = 1.47, size = 138, normalized size = 2.34 \[ \frac {x \cos \relax (x)^{2} \log \left (i \, \cos \relax (x) + \sin \relax (x) + 1\right ) + x \cos \relax (x)^{2} \log \left (i \, \cos \relax (x) - \sin \relax (x) + 1\right ) + x \cos \relax (x)^{2} \log \left (-i \, \cos \relax (x) + \sin \relax (x) + 1\right ) + x \cos \relax (x)^{2} \log \left (-i \, \cos \relax (x) - \sin \relax (x) + 1\right ) + i \, \cos \relax (x)^{2} {\rm Li}_2\left (i \, \cos \relax (x) + \sin \relax (x)\right ) - i \, \cos \relax (x)^{2} {\rm Li}_2\left (i \, \cos \relax (x) - \sin \relax (x)\right ) - i \, \cos \relax (x)^{2} {\rm Li}_2\left (-i \, \cos \relax (x) + \sin \relax (x)\right ) + i \, \cos \relax (x)^{2} {\rm Li}_2\left (-i \, \cos \relax (x) - \sin \relax (x)\right ) - \cos \relax (x) \sin \relax (x) + x}{2 \, \cos \relax (x)^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*sin(x)^3/cos(x)^3,x, algorithm="fricas")

[Out]

1/2*(x*cos(x)^2*log(I*cos(x) + sin(x) + 1) + x*cos(x)^2*log(I*cos(x) - sin(x) + 1) + x*cos(x)^2*log(-I*cos(x)
+ sin(x) + 1) + x*cos(x)^2*log(-I*cos(x) - sin(x) + 1) + I*cos(x)^2*dilog(I*cos(x) + sin(x)) - I*cos(x)^2*dilo
g(I*cos(x) - sin(x)) - I*cos(x)^2*dilog(-I*cos(x) + sin(x)) + I*cos(x)^2*dilog(-I*cos(x) - sin(x)) - cos(x)*si
n(x) + x)/cos(x)^2

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {x \sin \relax (x)^{3}}{\cos \relax (x)^{3}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*sin(x)^3/cos(x)^3,x, algorithm="giac")

[Out]

integrate(x*sin(x)^3/cos(x)^3, x)

________________________________________________________________________________________

maple [A]  time = 0.07, size = 59, normalized size = 1.00




method result size



risch \(-\frac {i x^{2}}{2}+\frac {2 x \,{\mathrm e}^{2 i x}-i {\mathrm e}^{2 i x}-i}{\left (1+{\mathrm e}^{2 i x}\right )^{2}}+x \ln \left (1+{\mathrm e}^{2 i x}\right )-\frac {i \polylog \left (2, -{\mathrm e}^{2 i x}\right )}{2}\) \(59\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*sin(x)^3/cos(x)^3,x,method=_RETURNVERBOSE)

[Out]

-1/2*I*x^2+(2*x*exp(2*I*x)-I*exp(2*I*x)-I)/(1+exp(2*I*x))^2+x*ln(1+exp(2*I*x))-1/2*I*polylog(2,-exp(2*I*x))

________________________________________________________________________________________

maxima [B]  time = 1.30, size = 213, normalized size = 3.61 \[ -\frac {x^{2} \cos \left (4 \, x\right ) + i \, x^{2} \sin \left (4 \, x\right ) + x^{2} - {\left (2 \, x \cos \left (4 \, x\right ) + 4 \, x \cos \left (2 \, x\right ) + 2 i \, x \sin \left (4 \, x\right ) + 4 i \, x \sin \left (2 \, x\right ) + 2 \, x\right )} \arctan \left (\sin \left (2 \, x\right ), \cos \left (2 \, x\right ) + 1\right ) + 2 \, {\left (x^{2} + 2 i \, x + 1\right )} \cos \left (2 \, x\right ) + {\left (\cos \left (4 \, x\right ) + 2 \, \cos \left (2 \, x\right ) + i \, \sin \left (4 \, x\right ) + 2 i \, \sin \left (2 \, x\right ) + 1\right )} {\rm Li}_2\left (-e^{\left (2 i \, x\right )}\right ) - {\left (-i \, x \cos \left (4 \, x\right ) - 2 i \, x \cos \left (2 \, x\right ) + x \sin \left (4 \, x\right ) + 2 \, x \sin \left (2 \, x\right ) - i \, x\right )} \log \left (\cos \left (2 \, x\right )^{2} + \sin \left (2 \, x\right )^{2} + 2 \, \cos \left (2 \, x\right ) + 1\right ) - {\left (-2 i \, x^{2} + 4 \, x - 2 i\right )} \sin \left (2 \, x\right ) + 2}{-2 i \, \cos \left (4 \, x\right ) - 4 i \, \cos \left (2 \, x\right ) + 2 \, \sin \left (4 \, x\right ) + 4 \, \sin \left (2 \, x\right ) - 2 i} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*sin(x)^3/cos(x)^3,x, algorithm="maxima")

[Out]

-(x^2*cos(4*x) + I*x^2*sin(4*x) + x^2 - (2*x*cos(4*x) + 4*x*cos(2*x) + 2*I*x*sin(4*x) + 4*I*x*sin(2*x) + 2*x)*
arctan2(sin(2*x), cos(2*x) + 1) + 2*(x^2 + 2*I*x + 1)*cos(2*x) + (cos(4*x) + 2*cos(2*x) + I*sin(4*x) + 2*I*sin
(2*x) + 1)*dilog(-e^(2*I*x)) - (-I*x*cos(4*x) - 2*I*x*cos(2*x) + x*sin(4*x) + 2*x*sin(2*x) - I*x)*log(cos(2*x)
^2 + sin(2*x)^2 + 2*cos(2*x) + 1) - (-2*I*x^2 + 4*x - 2*I)*sin(2*x) + 2)/(-2*I*cos(4*x) - 4*I*cos(2*x) + 2*sin
(4*x) + 4*sin(2*x) - 2*I)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.02 \[ \int \frac {x\,{\sin \relax (x)}^3}{{\cos \relax (x)}^3} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x*sin(x)^3)/cos(x)^3,x)

[Out]

int((x*sin(x)^3)/cos(x)^3, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {x \sin ^{3}{\relax (x )}}{\cos ^{3}{\relax (x )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*sin(x)**3/cos(x)**3,x)

[Out]

Integral(x*sin(x)**3/cos(x)**3, x)

________________________________________________________________________________________