\(\int x \cos ^3(a+b \log (c x^n)) \, dx\) [97]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [B] (verified)
Fricas [A] (verification not implemented)
Sympy [F]
Maxima [B] (verification not implemented)
Giac [B] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 15, antiderivative size = 158 \[ \int x \cos ^3\left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {12 b^2 n^2 x^2 \cos \left (a+b \log \left (c x^n\right )\right )}{16+40 b^2 n^2+9 b^4 n^4}+\frac {2 x^2 \cos ^3\left (a+b \log \left (c x^n\right )\right )}{4+9 b^2 n^2}+\frac {6 b^3 n^3 x^2 \sin \left (a+b \log \left (c x^n\right )\right )}{16+40 b^2 n^2+9 b^4 n^4}+\frac {3 b n x^2 \cos ^2\left (a+b \log \left (c x^n\right )\right ) \sin \left (a+b \log \left (c x^n\right )\right )}{4+9 b^2 n^2} \] Output:

12*b^2*n^2*x^2*cos(a+b*ln(c*x^n))/(9*b^4*n^4+40*b^2*n^2+16)+2*x^2*cos(a+b* 
ln(c*x^n))^3/(9*b^2*n^2+4)+6*b^3*n^3*x^2*sin(a+b*ln(c*x^n))/(9*b^4*n^4+40* 
b^2*n^2+16)+3*b*n*x^2*cos(a+b*ln(c*x^n))^2*sin(a+b*ln(c*x^n))/(9*b^2*n^2+4 
)
 

Mathematica [A] (verified)

Time = 0.34 (sec) , antiderivative size = 123, normalized size of antiderivative = 0.78 \[ \int x \cos ^3\left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {x^2 \left (6 \left (4+9 b^2 n^2\right ) \cos \left (a+b \log \left (c x^n\right )\right )+2 \left (4+b^2 n^2\right ) \cos \left (3 \left (a+b \log \left (c x^n\right )\right )\right )+6 b n \left (4+5 b^2 n^2+\left (4+b^2 n^2\right ) \cos \left (2 \left (a+b \log \left (c x^n\right )\right )\right )\right ) \sin \left (a+b \log \left (c x^n\right )\right )\right )}{4 \left (16+40 b^2 n^2+9 b^4 n^4\right )} \] Input:

Integrate[x*Cos[a + b*Log[c*x^n]]^3,x]
 

Output:

(x^2*(6*(4 + 9*b^2*n^2)*Cos[a + b*Log[c*x^n]] + 2*(4 + b^2*n^2)*Cos[3*(a + 
 b*Log[c*x^n])] + 6*b*n*(4 + 5*b^2*n^2 + (4 + b^2*n^2)*Cos[2*(a + b*Log[c* 
x^n])])*Sin[a + b*Log[c*x^n]]))/(4*(16 + 40*b^2*n^2 + 9*b^4*n^4))
 

Rubi [A] (verified)

Time = 0.32 (sec) , antiderivative size = 150, normalized size of antiderivative = 0.95, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {4991, 4989}

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 \cos ^3\left (a+b \log \left (c x^n\right )\right ) \, dx\)

\(\Big \downarrow \) 4991

\(\displaystyle \frac {6 b^2 n^2 \int x \cos \left (a+b \log \left (c x^n\right )\right )dx}{9 b^2 n^2+4}+\frac {2 x^2 \cos ^3\left (a+b \log \left (c x^n\right )\right )}{9 b^2 n^2+4}+\frac {3 b n x^2 \sin \left (a+b \log \left (c x^n\right )\right ) \cos ^2\left (a+b \log \left (c x^n\right )\right )}{9 b^2 n^2+4}\)

\(\Big \downarrow \) 4989

\(\displaystyle \frac {2 x^2 \cos ^3\left (a+b \log \left (c x^n\right )\right )}{9 b^2 n^2+4}+\frac {3 b n x^2 \sin \left (a+b \log \left (c x^n\right )\right ) \cos ^2\left (a+b \log \left (c x^n\right )\right )}{9 b^2 n^2+4}+\frac {6 b^2 n^2 \left (\frac {b n x^2 \sin \left (a+b \log \left (c x^n\right )\right )}{b^2 n^2+4}+\frac {2 x^2 \cos \left (a+b \log \left (c x^n\right )\right )}{b^2 n^2+4}\right )}{9 b^2 n^2+4}\)

Input:

Int[x*Cos[a + b*Log[c*x^n]]^3,x]
 

Output:

(2*x^2*Cos[a + b*Log[c*x^n]]^3)/(4 + 9*b^2*n^2) + (3*b*n*x^2*Cos[a + b*Log 
[c*x^n]]^2*Sin[a + b*Log[c*x^n]])/(4 + 9*b^2*n^2) + (6*b^2*n^2*((2*x^2*Cos 
[a + b*Log[c*x^n]])/(4 + b^2*n^2) + (b*n*x^2*Sin[a + b*Log[c*x^n]])/(4 + b 
^2*n^2)))/(4 + 9*b^2*n^2)
 

Defintions of rubi rules used

rule 4989
Int[Cos[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(d_.)]*((e_.)*(x_))^(m_.), x_ 
Symbol] :> Simp[(m + 1)*(e*x)^(m + 1)*(Cos[d*(a + b*Log[c*x^n])]/(b^2*d^2*e 
*n^2 + e*(m + 1)^2)), x] + Simp[b*d*n*(e*x)^(m + 1)*(Sin[d*(a + b*Log[c*x^n 
])]/(b^2*d^2*e*n^2 + e*(m + 1)^2)), x] /; FreeQ[{a, b, c, d, e, m, n}, x] & 
& NeQ[b^2*d^2*n^2 + (m + 1)^2, 0]
 

rule 4991
Int[Cos[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(d_.)]^(p_)*((e_.)*(x_))^(m_. 
), x_Symbol] :> Simp[(m + 1)*(e*x)^(m + 1)*(Cos[d*(a + b*Log[c*x^n])]^p/(b^ 
2*d^2*e*n^2*p^2 + e*(m + 1)^2)), x] + (Simp[b*d*n*p*(e*x)^(m + 1)*Sin[d*(a 
+ b*Log[c*x^n])]*(Cos[d*(a + b*Log[c*x^n])]^(p - 1)/(b^2*d^2*e*n^2*p^2 + e* 
(m + 1)^2)), x] + Simp[b^2*d^2*n^2*p*((p - 1)/(b^2*d^2*n^2*p^2 + (m + 1)^2) 
)   Int[(e*x)^m*Cos[d*(a + b*Log[c*x^n])]^(p - 2), x], x]) /; FreeQ[{a, b, 
c, d, e, m, n}, x] && IGtQ[p, 1] && NeQ[b^2*d^2*n^2*p^2 + (m + 1)^2, 0]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(325\) vs. \(2(158)=316\).

Time = 2.30 (sec) , antiderivative size = 326, normalized size of antiderivative = 2.06

method result size
parallelrisch \(-\frac {2 x^{2} \left (-4+24 b n {\tan \left (\frac {a}{2}+b \ln \left (\sqrt {c \,x^{n}}\right )\right )}^{3}-3 {\tan \left (\frac {a}{2}+b \ln \left (\sqrt {c \,x^{n}}\right )\right )}^{2} b^{2} n^{2}+3 b^{2} n^{2} {\tan \left (\frac {a}{2}+b \ln \left (\sqrt {c \,x^{n}}\right )\right )}^{4}-12 b n \tan \left (\frac {a}{2}+b \ln \left (\sqrt {c \,x^{n}}\right )\right )+12 {\tan \left (\frac {a}{2}+b \ln \left (\sqrt {c \,x^{n}}\right )\right )}^{2}-12 {\tan \left (\frac {a}{2}+b \ln \left (\sqrt {c \,x^{n}}\right )\right )}^{4}-9 {\tan \left (\frac {a}{2}+b \ln \left (\sqrt {c \,x^{n}}\right )\right )}^{5} b^{3} n^{3}+7 b^{2} n^{2} {\tan \left (\frac {a}{2}+b \ln \left (\sqrt {c \,x^{n}}\right )\right )}^{6}-6 {\tan \left (\frac {a}{2}+b \ln \left (\sqrt {c \,x^{n}}\right )\right )}^{3} b^{3} n^{3}-9 b^{3} n^{3} \tan \left (\frac {a}{2}+b \ln \left (\sqrt {c \,x^{n}}\right )\right )-12 b n {\tan \left (\frac {a}{2}+b \ln \left (\sqrt {c \,x^{n}}\right )\right )}^{5}+4 {\tan \left (\frac {a}{2}+b \ln \left (\sqrt {c \,x^{n}}\right )\right )}^{6}-7 b^{2} n^{2}\right )}{\left (9 b^{2} n^{2}+4\right ) {\left (1+{\tan \left (\frac {a}{2}+b \ln \left (\sqrt {c \,x^{n}}\right )\right )}^{2}\right )}^{3} \left (b^{2} n^{2}+4\right )}\) \(326\)

Input:

int(x*cos(a+b*ln(c*x^n))^3,x,method=_RETURNVERBOSE)
 

Output:

-2*x^2*(-4+24*b*n*tan(1/2*a+b*ln((c*x^n)^(1/2)))^3-3*tan(1/2*a+b*ln((c*x^n 
)^(1/2)))^2*b^2*n^2+3*b^2*n^2*tan(1/2*a+b*ln((c*x^n)^(1/2)))^4-12*b*n*tan( 
1/2*a+b*ln((c*x^n)^(1/2)))+12*tan(1/2*a+b*ln((c*x^n)^(1/2)))^2-12*tan(1/2* 
a+b*ln((c*x^n)^(1/2)))^4-9*tan(1/2*a+b*ln((c*x^n)^(1/2)))^5*b^3*n^3+7*b^2* 
n^2*tan(1/2*a+b*ln((c*x^n)^(1/2)))^6-6*tan(1/2*a+b*ln((c*x^n)^(1/2)))^3*b^ 
3*n^3-9*b^3*n^3*tan(1/2*a+b*ln((c*x^n)^(1/2)))-12*b*n*tan(1/2*a+b*ln((c*x^ 
n)^(1/2)))^5+4*tan(1/2*a+b*ln((c*x^n)^(1/2)))^6-7*b^2*n^2)/(9*b^2*n^2+4)/( 
1+tan(1/2*a+b*ln((c*x^n)^(1/2)))^2)^3/(b^2*n^2+4)
 

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 129, normalized size of antiderivative = 0.82 \[ \int x \cos ^3\left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {12 \, b^{2} n^{2} x^{2} \cos \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) + 2 \, {\left (b^{2} n^{2} + 4\right )} x^{2} \cos \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )^{3} + 3 \, {\left (2 \, b^{3} n^{3} x^{2} + {\left (b^{3} n^{3} + 4 \, b n\right )} x^{2} \cos \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )^{2}\right )} \sin \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}{9 \, b^{4} n^{4} + 40 \, b^{2} n^{2} + 16} \] Input:

integrate(x*cos(a+b*log(c*x^n))^3,x, algorithm="fricas")
 

Output:

(12*b^2*n^2*x^2*cos(b*n*log(x) + b*log(c) + a) + 2*(b^2*n^2 + 4)*x^2*cos(b 
*n*log(x) + b*log(c) + a)^3 + 3*(2*b^3*n^3*x^2 + (b^3*n^3 + 4*b*n)*x^2*cos 
(b*n*log(x) + b*log(c) + a)^2)*sin(b*n*log(x) + b*log(c) + a))/(9*b^4*n^4 
+ 40*b^2*n^2 + 16)
 

Sympy [F]

\[ \int x \cos ^3\left (a+b \log \left (c x^n\right )\right ) \, dx=\begin {cases} \int x \cos ^{3}{\left (a - \frac {2 i \log {\left (c x^{n} \right )}}{n} \right )}\, dx & \text {for}\: b = - \frac {2 i}{n} \\\int x \cos ^{3}{\left (a - \frac {2 i \log {\left (c x^{n} \right )}}{3 n} \right )}\, dx & \text {for}\: b = - \frac {2 i}{3 n} \\\int x \cos ^{3}{\left (a + \frac {2 i \log {\left (c x^{n} \right )}}{3 n} \right )}\, dx & \text {for}\: b = \frac {2 i}{3 n} \\\int x \cos ^{3}{\left (a + \frac {2 i \log {\left (c x^{n} \right )}}{n} \right )}\, dx & \text {for}\: b = \frac {2 i}{n} \\\frac {6 b^{3} n^{3} x^{2} \sin ^{3}{\left (a + b \log {\left (c x^{n} \right )} \right )}}{9 b^{4} n^{4} + 40 b^{2} n^{2} + 16} + \frac {9 b^{3} n^{3} x^{2} \sin {\left (a + b \log {\left (c x^{n} \right )} \right )} \cos ^{2}{\left (a + b \log {\left (c x^{n} \right )} \right )}}{9 b^{4} n^{4} + 40 b^{2} n^{2} + 16} + \frac {12 b^{2} n^{2} x^{2} \sin ^{2}{\left (a + b \log {\left (c x^{n} \right )} \right )} \cos {\left (a + b \log {\left (c x^{n} \right )} \right )}}{9 b^{4} n^{4} + 40 b^{2} n^{2} + 16} + \frac {14 b^{2} n^{2} x^{2} \cos ^{3}{\left (a + b \log {\left (c x^{n} \right )} \right )}}{9 b^{4} n^{4} + 40 b^{2} n^{2} + 16} + \frac {12 b n x^{2} \sin {\left (a + b \log {\left (c x^{n} \right )} \right )} \cos ^{2}{\left (a + b \log {\left (c x^{n} \right )} \right )}}{9 b^{4} n^{4} + 40 b^{2} n^{2} + 16} + \frac {8 x^{2} \cos ^{3}{\left (a + b \log {\left (c x^{n} \right )} \right )}}{9 b^{4} n^{4} + 40 b^{2} n^{2} + 16} & \text {otherwise} \end {cases} \] Input:

integrate(x*cos(a+b*ln(c*x**n))**3,x)
 

Output:

Piecewise((Integral(x*cos(a - 2*I*log(c*x**n)/n)**3, x), Eq(b, -2*I/n)), ( 
Integral(x*cos(a - 2*I*log(c*x**n)/(3*n))**3, x), Eq(b, -2*I/(3*n))), (Int 
egral(x*cos(a + 2*I*log(c*x**n)/(3*n))**3, x), Eq(b, 2*I/(3*n))), (Integra 
l(x*cos(a + 2*I*log(c*x**n)/n)**3, x), Eq(b, 2*I/n)), (6*b**3*n**3*x**2*si 
n(a + b*log(c*x**n))**3/(9*b**4*n**4 + 40*b**2*n**2 + 16) + 9*b**3*n**3*x* 
*2*sin(a + b*log(c*x**n))*cos(a + b*log(c*x**n))**2/(9*b**4*n**4 + 40*b**2 
*n**2 + 16) + 12*b**2*n**2*x**2*sin(a + b*log(c*x**n))**2*cos(a + b*log(c* 
x**n))/(9*b**4*n**4 + 40*b**2*n**2 + 16) + 14*b**2*n**2*x**2*cos(a + b*log 
(c*x**n))**3/(9*b**4*n**4 + 40*b**2*n**2 + 16) + 12*b*n*x**2*sin(a + b*log 
(c*x**n))*cos(a + b*log(c*x**n))**2/(9*b**4*n**4 + 40*b**2*n**2 + 16) + 8* 
x**2*cos(a + b*log(c*x**n))**3/(9*b**4*n**4 + 40*b**2*n**2 + 16), True))
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1015 vs. \(2 (158) = 316\).

Time = 0.09 (sec) , antiderivative size = 1015, normalized size of antiderivative = 6.42 \[ \int x \cos ^3\left (a+b \log \left (c x^n\right )\right ) \, dx=\text {Too large to display} \] Input:

integrate(x*cos(a+b*log(c*x^n))^3,x, algorithm="maxima")
 

Output:

1/8*((3*(b^3*cos(3*b*log(c))*sin(6*b*log(c)) - b^3*cos(6*b*log(c))*sin(3*b 
*log(c)) + b^3*sin(3*b*log(c)))*n^3 + 2*(b^2*cos(6*b*log(c))*cos(3*b*log(c 
)) + b^2*sin(6*b*log(c))*sin(3*b*log(c)) + b^2*cos(3*b*log(c)))*n^2 + 12*( 
b*cos(3*b*log(c))*sin(6*b*log(c)) - b*cos(6*b*log(c))*sin(3*b*log(c)) + b* 
sin(3*b*log(c)))*n + 8*cos(6*b*log(c))*cos(3*b*log(c)) + 8*sin(6*b*log(c)) 
*sin(3*b*log(c)) + 8*cos(3*b*log(c)))*x^2*cos(3*b*log(x^n) + 3*a) + 3*(9*( 
b^3*cos(3*b*log(c))*sin(4*b*log(c)) - b^3*cos(4*b*log(c))*sin(3*b*log(c)) 
+ b^3*cos(2*b*log(c))*sin(3*b*log(c)) - b^3*cos(3*b*log(c))*sin(2*b*log(c) 
))*n^3 + 18*(b^2*cos(4*b*log(c))*cos(3*b*log(c)) + b^2*cos(3*b*log(c))*cos 
(2*b*log(c)) + b^2*sin(4*b*log(c))*sin(3*b*log(c)) + b^2*sin(3*b*log(c))*s 
in(2*b*log(c)))*n^2 + 4*(b*cos(3*b*log(c))*sin(4*b*log(c)) - b*cos(4*b*log 
(c))*sin(3*b*log(c)) + b*cos(2*b*log(c))*sin(3*b*log(c)) - b*cos(3*b*log(c 
))*sin(2*b*log(c)))*n + 8*cos(4*b*log(c))*cos(3*b*log(c)) + 8*cos(3*b*log( 
c))*cos(2*b*log(c)) + 8*sin(4*b*log(c))*sin(3*b*log(c)) + 8*sin(3*b*log(c) 
)*sin(2*b*log(c)))*x^2*cos(b*log(x^n) + a) + (3*(b^3*cos(6*b*log(c))*cos(3 
*b*log(c)) + b^3*sin(6*b*log(c))*sin(3*b*log(c)) + b^3*cos(3*b*log(c)))*n^ 
3 - 2*(b^2*cos(3*b*log(c))*sin(6*b*log(c)) - b^2*cos(6*b*log(c))*sin(3*b*l 
og(c)) + b^2*sin(3*b*log(c)))*n^2 + 12*(b*cos(6*b*log(c))*cos(3*b*log(c)) 
+ b*sin(6*b*log(c))*sin(3*b*log(c)) + b*cos(3*b*log(c)))*n - 8*cos(3*b*log 
(c))*sin(6*b*log(c)) + 8*cos(6*b*log(c))*sin(3*b*log(c)) - 8*sin(3*b*lo...
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 18069 vs. \(2 (158) = 316\).

Time = 1.01 (sec) , antiderivative size = 18069, normalized size of antiderivative = 114.36 \[ \int x \cos ^3\left (a+b \log \left (c x^n\right )\right ) \, dx=\text {Too large to display} \] Input:

integrate(x*cos(a+b*log(c*x^n))^3,x, algorithm="giac")
 

Output:

-1/4*(27*b^3*n^3*x^2*e^(1/2*pi*b*n*sgn(x) - 1/2*pi*b*n + 1/2*pi*b*sgn(c) - 
 1/2*pi*b)*tan(3/2*b*n*log(abs(x)) + 3/2*b*log(abs(c)))^2*tan(1/2*b*n*log( 
abs(x)) + 1/2*b*log(abs(c)))^2*tan(3/2*a)^2*tan(1/2*a) + 27*b^3*n^3*x^2*e^ 
(-1/2*pi*b*n*sgn(x) + 1/2*pi*b*n - 1/2*pi*b*sgn(c) + 1/2*pi*b)*tan(3/2*b*n 
*log(abs(x)) + 3/2*b*log(abs(c)))^2*tan(1/2*b*n*log(abs(x)) + 1/2*b*log(ab 
s(c)))^2*tan(3/2*a)^2*tan(1/2*a) + 3*b^3*n^3*x^2*e^(3/2*pi*b*n*sgn(x) - 3/ 
2*pi*b*n + 3/2*pi*b*sgn(c) - 3/2*pi*b)*tan(3/2*b*n*log(abs(x)) + 3/2*b*log 
(abs(c)))^2*tan(1/2*b*n*log(abs(x)) + 1/2*b*log(abs(c)))^2*tan(3/2*a)*tan( 
1/2*a)^2 + 3*b^3*n^3*x^2*e^(-3/2*pi*b*n*sgn(x) + 3/2*pi*b*n - 3/2*pi*b*sgn 
(c) + 3/2*pi*b)*tan(3/2*b*n*log(abs(x)) + 3/2*b*log(abs(c)))^2*tan(1/2*b*n 
*log(abs(x)) + 1/2*b*log(abs(c)))^2*tan(3/2*a)*tan(1/2*a)^2 + 27*b^3*n^3*x 
^2*e^(1/2*pi*b*n*sgn(x) - 1/2*pi*b*n + 1/2*pi*b*sgn(c) - 1/2*pi*b)*tan(3/2 
*b*n*log(abs(x)) + 3/2*b*log(abs(c)))^2*tan(1/2*b*n*log(abs(x)) + 1/2*b*lo 
g(abs(c)))*tan(3/2*a)^2*tan(1/2*a)^2 + 27*b^3*n^3*x^2*e^(-1/2*pi*b*n*sgn(x 
) + 1/2*pi*b*n - 1/2*pi*b*sgn(c) + 1/2*pi*b)*tan(3/2*b*n*log(abs(x)) + 3/2 
*b*log(abs(c)))^2*tan(1/2*b*n*log(abs(x)) + 1/2*b*log(abs(c)))*tan(3/2*a)^ 
2*tan(1/2*a)^2 + 3*b^3*n^3*x^2*e^(3/2*pi*b*n*sgn(x) - 3/2*pi*b*n + 3/2*pi* 
b*sgn(c) - 3/2*pi*b)*tan(3/2*b*n*log(abs(x)) + 3/2*b*log(abs(c)))*tan(1/2* 
b*n*log(abs(x)) + 1/2*b*log(abs(c)))^2*tan(3/2*a)^2*tan(1/2*a)^2 + 3*b^3*n 
^3*x^2*e^(-3/2*pi*b*n*sgn(x) + 3/2*pi*b*n - 3/2*pi*b*sgn(c) + 3/2*pi*b)...
 

Mupad [B] (verification not implemented)

Time = 22.10 (sec) , antiderivative size = 122, normalized size of antiderivative = 0.77 \[ \int x \cos ^3\left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {x^2\,{\mathrm {e}}^{-a\,1{}\mathrm {i}}\,\frac {1}{{\left (c\,x^n\right )}^{b\,1{}\mathrm {i}}}\,3{}\mathrm {i}}{8\,b\,n+16{}\mathrm {i}}+\frac {3\,x^2\,{\mathrm {e}}^{a\,1{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,1{}\mathrm {i}}}{16+b\,n\,8{}\mathrm {i}}+\frac {x^2\,{\mathrm {e}}^{-a\,3{}\mathrm {i}}\,\frac {1}{{\left (c\,x^n\right )}^{b\,3{}\mathrm {i}}}\,1{}\mathrm {i}}{24\,b\,n+16{}\mathrm {i}}+\frac {x^2\,{\mathrm {e}}^{a\,3{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,3{}\mathrm {i}}}{16+b\,n\,24{}\mathrm {i}} \] Input:

int(x*cos(a + b*log(c*x^n))^3,x)
 

Output:

(x^2*exp(-a*1i)/(c*x^n)^(b*1i)*3i)/(8*b*n + 16i) + (3*x^2*exp(a*1i)*(c*x^n 
)^(b*1i))/(b*n*8i + 16) + (x^2*exp(-a*3i)/(c*x^n)^(b*3i)*1i)/(24*b*n + 16i 
) + (x^2*exp(a*3i)*(c*x^n)^(b*3i))/(b*n*24i + 16)
 

Reduce [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 187, normalized size of antiderivative = 1.18 \[ \int x \cos ^3\left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {x^{2} \left (-2 \cos \left (\mathrm {log}\left (x^{n} c \right ) b +a \right ) {\sin \left (\mathrm {log}\left (x^{n} c \right ) b +a \right )}^{2} b^{2} n^{2}-8 \cos \left (\mathrm {log}\left (x^{n} c \right ) b +a \right ) {\sin \left (\mathrm {log}\left (x^{n} c \right ) b +a \right )}^{2}+14 \cos \left (\mathrm {log}\left (x^{n} c \right ) b +a \right ) b^{2} n^{2}+8 \cos \left (\mathrm {log}\left (x^{n} c \right ) b +a \right )-3 {\sin \left (\mathrm {log}\left (x^{n} c \right ) b +a \right )}^{3} b^{3} n^{3}-12 {\sin \left (\mathrm {log}\left (x^{n} c \right ) b +a \right )}^{3} b n +9 \sin \left (\mathrm {log}\left (x^{n} c \right ) b +a \right ) b^{3} n^{3}+12 \sin \left (\mathrm {log}\left (x^{n} c \right ) b +a \right ) b n \right )}{9 b^{4} n^{4}+40 b^{2} n^{2}+16} \] Input:

int(x*cos(a+b*log(c*x^n))^3,x)
 

Output:

(x**2*( - 2*cos(log(x**n*c)*b + a)*sin(log(x**n*c)*b + a)**2*b**2*n**2 - 8 
*cos(log(x**n*c)*b + a)*sin(log(x**n*c)*b + a)**2 + 14*cos(log(x**n*c)*b + 
 a)*b**2*n**2 + 8*cos(log(x**n*c)*b + a) - 3*sin(log(x**n*c)*b + a)**3*b** 
3*n**3 - 12*sin(log(x**n*c)*b + a)**3*b*n + 9*sin(log(x**n*c)*b + a)*b**3* 
n**3 + 12*sin(log(x**n*c)*b + a)*b*n))/(9*b**4*n**4 + 40*b**2*n**2 + 16)