Integrand size = 17, antiderivative size = 43 \[ \int \frac {\tan ^3\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\frac {\log \left (\cos \left (a+b \log \left (c x^n\right )\right )\right )}{b n}+\frac {\tan ^2\left (a+b \log \left (c x^n\right )\right )}{2 b n} \] Output:
ln(cos(a+b*ln(c*x^n)))/b/n+1/2*tan(a+b*ln(c*x^n))^2/b/n
Time = 0.13 (sec) , antiderivative size = 38, normalized size of antiderivative = 0.88 \[ \int \frac {\tan ^3\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\frac {2 \log \left (\cos \left (a+b \log \left (c x^n\right )\right )\right )+\sec ^2\left (a+b \log \left (c x^n\right )\right )}{2 b n} \] Input:
Integrate[Tan[a + b*Log[c*x^n]]^3/x,x]
Output:
(2*Log[Cos[a + b*Log[c*x^n]]] + Sec[a + b*Log[c*x^n]]^2)/(2*b*n)
Time = 0.27 (sec) , antiderivative size = 41, normalized size of antiderivative = 0.95, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.294, Rules used = {3039, 3042, 3954, 3042, 3956}
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 \frac {\tan ^3\left (a+b \log \left (c x^n\right )\right )}{x} \, dx\) |
\(\Big \downarrow \) 3039 |
\(\displaystyle \frac {\int \tan ^3\left (a+b \log \left (c x^n\right )\right )d\log \left (c x^n\right )}{n}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \tan \left (a+b \log \left (c x^n\right )\right )^3d\log \left (c x^n\right )}{n}\) |
\(\Big \downarrow \) 3954 |
\(\displaystyle \frac {\frac {\tan ^2\left (a+b \log \left (c x^n\right )\right )}{2 b}-\int \tan \left (a+b \log \left (c x^n\right )\right )d\log \left (c x^n\right )}{n}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\tan ^2\left (a+b \log \left (c x^n\right )\right )}{2 b}-\int \tan \left (a+b \log \left (c x^n\right )\right )d\log \left (c x^n\right )}{n}\) |
\(\Big \downarrow \) 3956 |
\(\displaystyle \frac {\frac {\tan ^2\left (a+b \log \left (c x^n\right )\right )}{2 b}+\frac {\log \left (\cos \left (a+b \log \left (c x^n\right )\right )\right )}{b}}{n}\) |
Input:
Int[Tan[a + b*Log[c*x^n]]^3/x,x]
Output:
(Log[Cos[a + b*Log[c*x^n]]]/b + Tan[a + b*Log[c*x^n]]^2/(2*b))/n
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]
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[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d *x], x]]/d, x] /; FreeQ[{c, d}, x]
Time = 0.25 (sec) , antiderivative size = 41, normalized size of antiderivative = 0.95
method | result | size |
parallelrisch | \(\frac {{\tan \left (a +b \ln \left (c \,x^{n}\right )\right )}^{2}-\ln \left (1+{\tan \left (a +b \ln \left (c \,x^{n}\right )\right )}^{2}\right )}{2 b n}\) | \(41\) |
derivativedivides | \(\frac {\frac {{\tan \left (a +b \ln \left (c \,x^{n}\right )\right )}^{2}}{2}-\frac {\ln \left (1+{\tan \left (a +b \ln \left (c \,x^{n}\right )\right )}^{2}\right )}{2}}{n b}\) | \(42\) |
default | \(\frac {\frac {{\tan \left (a +b \ln \left (c \,x^{n}\right )\right )}^{2}}{2}-\frac {\ln \left (1+{\tan \left (a +b \ln \left (c \,x^{n}\right )\right )}^{2}\right )}{2}}{n b}\) | \(42\) |
risch | \(i \ln \left (x \right )-\frac {2 i a}{b n}-\frac {2 i \ln \left (c \right )}{n}-\frac {2 i \ln \left (x^{n}\right )}{n}-\frac {\pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )}{n}+\frac {\pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{n}+\frac {\pi \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )}{n}-\frac {\pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}}{n}+\frac {2 \left (x^{n}\right )^{2 i b} c^{2 i b} {\mathrm e}^{-b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}} {\mathrm e}^{b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )} {\mathrm e}^{b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}} {\mathrm e}^{-b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )} {\mathrm e}^{2 i a}}{b n {\left (\left (x^{n}\right )^{2 i b} c^{2 i b} {\mathrm e}^{-b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}} {\mathrm e}^{b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )} {\mathrm e}^{b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}} {\mathrm e}^{-b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )} {\mathrm e}^{2 i a}+1\right )}^{2}}+\frac {\ln \left (\left (x^{n}\right )^{2 i b} c^{2 i b} {\mathrm e}^{-b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}} {\mathrm e}^{b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )} {\mathrm e}^{b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}} {\mathrm e}^{-b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )} {\mathrm e}^{2 i a}+1\right )}{b n}\) | \(452\) |
Input:
int(tan(a+b*ln(c*x^n))^3/x,x,method=_RETURNVERBOSE)
Output:
1/2*(tan(a+b*ln(c*x^n))^2-ln(1+tan(a+b*ln(c*x^n))^2))/b/n
Time = 0.07 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.60 \[ \int \frac {\tan ^3\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\frac {{\left (\cos \left (2 \, b n \log \left (x\right ) + 2 \, b \log \left (c\right ) + 2 \, a\right ) + 1\right )} \log \left (\frac {1}{2} \, \cos \left (2 \, b n \log \left (x\right ) + 2 \, b \log \left (c\right ) + 2 \, a\right ) + \frac {1}{2}\right ) + 2}{2 \, {\left (b n \cos \left (2 \, b n \log \left (x\right ) + 2 \, b \log \left (c\right ) + 2 \, a\right ) + b n\right )}} \] Input:
integrate(tan(a+b*log(c*x^n))^3/x,x, algorithm="fricas")
Output:
1/2*((cos(2*b*n*log(x) + 2*b*log(c) + 2*a) + 1)*log(1/2*cos(2*b*n*log(x) + 2*b*log(c) + 2*a) + 1/2) + 2)/(b*n*cos(2*b*n*log(x) + 2*b*log(c) + 2*a) + b*n)
Time = 0.85 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.47 \[ \int \frac {\tan ^3\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\begin {cases} \log {\left (x \right )} \tan ^{3}{\left (a \right )} & \text {for}\: b = 0 \wedge \left (b = 0 \vee n = 0\right ) \\\log {\left (x \right )} \tan ^{3}{\left (a + b \log {\left (c \right )} \right )} & \text {for}\: n = 0 \\- \frac {\log {\left (\tan ^{2}{\left (a + b \log {\left (c x^{n} \right )} \right )} + 1 \right )}}{2 b n} + \frac {\tan ^{2}{\left (a + b \log {\left (c x^{n} \right )} \right )}}{2 b n} & \text {otherwise} \end {cases} \] Input:
integrate(tan(a+b*ln(c*x**n))**3/x,x)
Output:
Piecewise((log(x)*tan(a)**3, Eq(b, 0) & (Eq(b, 0) | Eq(n, 0))), (log(x)*ta n(a + b*log(c))**3, Eq(n, 0)), (-log(tan(a + b*log(c*x**n))**2 + 1)/(2*b*n ) + tan(a + b*log(c*x**n))**2/(2*b*n), True))
Leaf count of result is larger than twice the leaf count of optimal. 1242 vs. \(2 (41) = 82\).
Time = 0.07 (sec) , antiderivative size = 1242, normalized size of antiderivative = 28.88 \[ \int \frac {\tan ^3\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\text {Too large to display} \] Input:
integrate(tan(a+b*log(c*x^n))^3/x,x, algorithm="maxima")
Output:
1/2*(8*(cos(2*b*log(c))^2 + sin(2*b*log(c))^2)*cos(2*b*log(x^n) + 2*a)^2 + 8*(cos(2*b*log(c))^2 + sin(2*b*log(c))^2)*sin(2*b*log(x^n) + 2*a)^2 + 4*( (cos(4*b*log(c))*cos(2*b*log(c)) + sin(4*b*log(c))*sin(2*b*log(c)))*cos(2* b*log(x^n) + 2*a) + (cos(2*b*log(c))*sin(4*b*log(c)) - cos(4*b*log(c))*sin (2*b*log(c)))*sin(2*b*log(x^n) + 2*a))*cos(4*b*log(x^n) + 4*a) + 4*cos(2*b *log(c))*cos(2*b*log(x^n) + 2*a) + ((cos(4*b*log(c))^2 + sin(4*b*log(c))^2 )*cos(4*b*log(x^n) + 4*a)^2 + 4*(cos(2*b*log(c))^2 + sin(2*b*log(c))^2)*co s(2*b*log(x^n) + 2*a)^2 + (cos(4*b*log(c))^2 + sin(4*b*log(c))^2)*sin(4*b* log(x^n) + 4*a)^2 + 4*(cos(2*b*log(c))^2 + sin(2*b*log(c))^2)*sin(2*b*log( x^n) + 2*a)^2 + 2*(2*(cos(4*b*log(c))*cos(2*b*log(c)) + sin(4*b*log(c))*si n(2*b*log(c)))*cos(2*b*log(x^n) + 2*a) + 2*(cos(2*b*log(c))*sin(4*b*log(c) ) - cos(4*b*log(c))*sin(2*b*log(c)))*sin(2*b*log(x^n) + 2*a) + cos(4*b*log (c)))*cos(4*b*log(x^n) + 4*a) + 4*cos(2*b*log(c))*cos(2*b*log(x^n) + 2*a) - 2*(2*(cos(2*b*log(c))*sin(4*b*log(c)) - cos(4*b*log(c))*sin(2*b*log(c))) *cos(2*b*log(x^n) + 2*a) - 2*(cos(4*b*log(c))*cos(2*b*log(c)) + sin(4*b*lo g(c))*sin(2*b*log(c)))*sin(2*b*log(x^n) + 2*a) + sin(4*b*log(c)))*sin(4*b* log(x^n) + 4*a) - 4*sin(2*b*log(c))*sin(2*b*log(x^n) + 2*a) + 1)*log((cos( 2*a)^2 + sin(2*a)^2)*cos(2*b*log(c))^2 + (cos(2*a)^2 + sin(2*a)^2)*sin(2*b *log(c))^2 + 2*(cos(2*b*log(c))*cos(2*a) - sin(2*b*log(c))*sin(2*a))*cos(2 *b*log(x^n)) + cos(2*b*log(x^n))^2 - 2*(cos(2*a)*sin(2*b*log(c)) + cos(...
Timed out. \[ \int \frac {\tan ^3\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\text {Timed out} \] Input:
integrate(tan(a+b*log(c*x^n))^3/x,x, algorithm="giac")
Output:
Timed out
Time = 22.52 (sec) , antiderivative size = 105, normalized size of antiderivative = 2.44 \[ \int \frac {\tan ^3\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=-\ln \left (x\right )\,1{}\mathrm {i}-\frac {2}{b\,n\,\left (2\,{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,2{}\mathrm {i}}+{\mathrm {e}}^{a\,4{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,4{}\mathrm {i}}+1\right )}+\frac {2}{b\,n\,\left ({\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,2{}\mathrm {i}}+1\right )}+\frac {\ln \left ({\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,2{}\mathrm {i}}+1\right )}{b\,n} \] Input:
int(tan(a + b*log(c*x^n))^3/x,x)
Output:
2/(b*n*(exp(a*2i)*(c*x^n)^(b*2i) + 1)) - 2/(b*n*(2*exp(a*2i)*(c*x^n)^(b*2i ) + exp(a*4i)*(c*x^n)^(b*4i) + 1)) - log(x)*1i + log(exp(a*2i)*(c*x^n)^(b* 2i) + 1)/(b*n)
Time = 0.19 (sec) , antiderivative size = 40, normalized size of antiderivative = 0.93 \[ \int \frac {\tan ^3\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\frac {-\mathrm {log}\left ({\tan \left (\mathrm {log}\left (x^{n} c \right ) b +a \right )}^{2}+1\right )+{\tan \left (\mathrm {log}\left (x^{n} c \right ) b +a \right )}^{2}}{2 b n} \] Input:
int(tan(a+b*log(c*x^n))^3/x,x)
Output:
( - log(tan(log(x**n*c)*b + a)**2 + 1) + tan(log(x**n*c)*b + a)**2)/(2*b*n )