\(\int x \sin ^4(a+b \log (c x^n)) \, dx\) [20]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [F]
Fricas [A] (verification not implemented)
Sympy [F(-1)]
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 = 210 \[ \int x \sin ^4\left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {3 b^4 n^4 x^2}{4 \left (1+5 b^2 n^2+4 b^4 n^4\right )}-\frac {3 b^3 n^3 x^2 \cos \left (a+b \log \left (c x^n\right )\right ) \sin \left (a+b \log \left (c x^n\right )\right )}{2 \left (1+5 b^2 n^2+4 b^4 n^4\right )}+\frac {3 b^2 n^2 x^2 \sin ^2\left (a+b \log \left (c x^n\right )\right )}{2 \left (1+5 b^2 n^2+4 b^4 n^4\right )}-\frac {b n x^2 \cos \left (a+b \log \left (c x^n\right )\right ) \sin ^3\left (a+b \log \left (c x^n\right )\right )}{1+4 b^2 n^2}+\frac {x^2 \sin ^4\left (a+b \log \left (c x^n\right )\right )}{2 \left (1+4 b^2 n^2\right )} \] Output:

3*b^4*n^4*x^2/(16*b^4*n^4+20*b^2*n^2+4)-3*b^3*n^3*x^2*cos(a+b*ln(c*x^n))*s 
in(a+b*ln(c*x^n))/(8*b^4*n^4+10*b^2*n^2+2)+3*b^2*n^2*x^2*sin(a+b*ln(c*x^n) 
)^2/(8*b^4*n^4+10*b^2*n^2+2)-b*n*x^2*cos(a+b*ln(c*x^n))*sin(a+b*ln(c*x^n)) 
^3/(4*b^2*n^2+1)+x^2*sin(a+b*ln(c*x^n))^4/(8*b^2*n^2+2)
 

Mathematica [A] (verified)

Time = 0.32 (sec) , antiderivative size = 169, normalized size of antiderivative = 0.80 \[ \int x \sin ^4\left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {x^2 \left (3+15 b^2 n^2+12 b^4 n^4-4 \left (1+4 b^2 n^2\right ) \cos \left (2 \left (a+b \log \left (c x^n\right )\right )\right )+\left (1+b^2 n^2\right ) \cos \left (4 \left (a+b \log \left (c x^n\right )\right )\right )-4 b n \sin \left (2 \left (a+b \log \left (c x^n\right )\right )\right )-16 b^3 n^3 \sin \left (2 \left (a+b \log \left (c x^n\right )\right )\right )+2 b n \sin \left (4 \left (a+b \log \left (c x^n\right )\right )\right )+2 b^3 n^3 \sin \left (4 \left (a+b \log \left (c x^n\right )\right )\right )\right )}{16 \left (1+5 b^2 n^2+4 b^4 n^4\right )} \] Input:

Integrate[x*Sin[a + b*Log[c*x^n]]^4,x]
 

Output:

(x^2*(3 + 15*b^2*n^2 + 12*b^4*n^4 - 4*(1 + 4*b^2*n^2)*Cos[2*(a + b*Log[c*x 
^n])] + (1 + b^2*n^2)*Cos[4*(a + b*Log[c*x^n])] - 4*b*n*Sin[2*(a + b*Log[c 
*x^n])] - 16*b^3*n^3*Sin[2*(a + b*Log[c*x^n])] + 2*b*n*Sin[4*(a + b*Log[c* 
x^n])] + 2*b^3*n^3*Sin[4*(a + b*Log[c*x^n])]))/(16*(1 + 5*b^2*n^2 + 4*b^4* 
n^4))
 

Rubi [A] (verified)

Time = 0.34 (sec) , antiderivative size = 194, normalized size of antiderivative = 0.92, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {4990, 4990, 15}

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

\(\Big \downarrow \) 4990

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

\(\Big \downarrow \) 4990

\(\displaystyle \frac {3 b^2 n^2 \left (\frac {b^2 n^2 \int xdx}{2 \left (b^2 n^2+1\right )}+\frac {x^2 \sin ^2\left (a+b \log \left (c x^n\right )\right )}{2 \left (b^2 n^2+1\right )}-\frac {b n x^2 \sin \left (a+b \log \left (c x^n\right )\right ) \cos \left (a+b \log \left (c x^n\right )\right )}{2 \left (b^2 n^2+1\right )}\right )}{4 b^2 n^2+1}+\frac {x^2 \sin ^4\left (a+b \log \left (c x^n\right )\right )}{2 \left (4 b^2 n^2+1\right )}-\frac {b n x^2 \sin ^3\left (a+b \log \left (c x^n\right )\right ) \cos \left (a+b \log \left (c x^n\right )\right )}{4 b^2 n^2+1}\)

\(\Big \downarrow \) 15

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

Input:

Int[x*Sin[a + b*Log[c*x^n]]^4,x]
 

Output:

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

Defintions of rubi rules used

rule 15
Int[(a_.)*(x_)^(m_.), x_Symbol] :> Simp[a*(x^(m + 1)/(m + 1)), x] /; FreeQ[ 
{a, m}, x] && NeQ[m, -1]
 

rule 4990
Int[((e_.)*(x_))^(m_.)*Sin[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(d_.)]^(p_ 
), x_Symbol] :> Simp[(m + 1)*(e*x)^(m + 1)*(Sin[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)*Cos[d*(a 
 + b*Log[c*x^n])]*(Sin[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*Sin[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 [F]

\[\int x {\sin \left (a +b \ln \left (c \,x^{n}\right )\right )}^{4}d x\]

Input:

int(x*sin(a+b*ln(c*x^n))^4,x)
 

Output:

int(x*sin(a+b*ln(c*x^n))^4,x)
 

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 177, normalized size of antiderivative = 0.84 \[ \int x \sin ^4\left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {2 \, {\left (b^{2} n^{2} + 1\right )} x^{2} \cos \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )^{4} - 2 \, {\left (5 \, b^{2} n^{2} + 2\right )} x^{2} \cos \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )^{2} + {\left (3 \, b^{4} n^{4} + 8 \, b^{2} n^{2} + 2\right )} x^{2} + 2 \, {\left (2 \, {\left (b^{3} n^{3} + b n\right )} x^{2} \cos \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )^{3} - {\left (5 \, b^{3} n^{3} + 2 \, b n\right )} x^{2} \cos \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )\right )} \sin \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}{4 \, {\left (4 \, b^{4} n^{4} + 5 \, b^{2} n^{2} + 1\right )}} \] Input:

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

Output:

1/4*(2*(b^2*n^2 + 1)*x^2*cos(b*n*log(x) + b*log(c) + a)^4 - 2*(5*b^2*n^2 + 
 2)*x^2*cos(b*n*log(x) + b*log(c) + a)^2 + (3*b^4*n^4 + 8*b^2*n^2 + 2)*x^2 
 + 2*(2*(b^3*n^3 + b*n)*x^2*cos(b*n*log(x) + b*log(c) + a)^3 - (5*b^3*n^3 
+ 2*b*n)*x^2*cos(b*n*log(x) + b*log(c) + a))*sin(b*n*log(x) + b*log(c) + a 
))/(4*b^4*n^4 + 5*b^2*n^2 + 1)
 

Sympy [F(-1)]

Timed out. \[ \int x \sin ^4\left (a+b \log \left (c x^n\right )\right ) \, dx=\text {Timed out} \] Input:

integrate(x*sin(a+b*ln(c*x**n))**4,x)
 

Output:

Timed out
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1085 vs. \(2 (202) = 404\).

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

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

Output:

1/32*((2*(b^3*cos(4*b*log(c))*sin(8*b*log(c)) - b^3*cos(8*b*log(c))*sin(4* 
b*log(c)) + b^3*sin(4*b*log(c)))*n^3 + (b^2*cos(8*b*log(c))*cos(4*b*log(c) 
) + b^2*sin(8*b*log(c))*sin(4*b*log(c)) + b^2*cos(4*b*log(c)))*n^2 + 2*(b* 
cos(4*b*log(c))*sin(8*b*log(c)) - b*cos(8*b*log(c))*sin(4*b*log(c)) + b*si 
n(4*b*log(c)))*n + cos(8*b*log(c))*cos(4*b*log(c)) + sin(8*b*log(c))*sin(4 
*b*log(c)) + cos(4*b*log(c)))*x^2*cos(4*b*log(x^n) + 4*a) - 4*(4*(b^3*cos( 
4*b*log(c))*sin(6*b*log(c)) - b^3*cos(6*b*log(c))*sin(4*b*log(c)) + b^3*co 
s(2*b*log(c))*sin(4*b*log(c)) - b^3*cos(4*b*log(c))*sin(2*b*log(c)))*n^3 + 
 4*(b^2*cos(6*b*log(c))*cos(4*b*log(c)) + b^2*cos(4*b*log(c))*cos(2*b*log( 
c)) + b^2*sin(6*b*log(c))*sin(4*b*log(c)) + b^2*sin(4*b*log(c))*sin(2*b*lo 
g(c)))*n^2 + (b*cos(4*b*log(c))*sin(6*b*log(c)) - b*cos(6*b*log(c))*sin(4* 
b*log(c)) + b*cos(2*b*log(c))*sin(4*b*log(c)) - b*cos(4*b*log(c))*sin(2*b* 
log(c)))*n + cos(6*b*log(c))*cos(4*b*log(c)) + cos(4*b*log(c))*cos(2*b*log 
(c)) + sin(6*b*log(c))*sin(4*b*log(c)) + sin(4*b*log(c))*sin(2*b*log(c)))* 
x^2*cos(2*b*log(x^n) + 2*a) + (2*(b^3*cos(8*b*log(c))*cos(4*b*log(c)) + b^ 
3*sin(8*b*log(c))*sin(4*b*log(c)) + b^3*cos(4*b*log(c)))*n^3 - (b^2*cos(4* 
b*log(c))*sin(8*b*log(c)) - b^2*cos(8*b*log(c))*sin(4*b*log(c)) + b^2*sin( 
4*b*log(c)))*n^2 + 2*(b*cos(8*b*log(c))*cos(4*b*log(c)) + b*sin(8*b*log(c) 
)*sin(4*b*log(c)) + b*cos(4*b*log(c)))*n - cos(4*b*log(c))*sin(8*b*log(c)) 
 + cos(8*b*log(c))*sin(4*b*log(c)) - sin(4*b*log(c)))*x^2*sin(4*b*log(x...
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 16554 vs. \(2 (202) = 404\).

Time = 1.00 (sec) , antiderivative size = 16554, normalized size of antiderivative = 78.83 \[ \int x \sin ^4\left (a+b \log \left (c x^n\right )\right ) \, dx=\text {Too large to display} \] Input:

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

Output:

3/16*x^2 + 1/32*(32*b^3*n^3*x^2*e^(3*pi*b*n*sgn(x) - 3*pi*b*n + 3*pi*b*sgn 
(c) - 3*pi*b)*tan(2*b*n*log(abs(x)) + 2*b*log(abs(c)))^2*tan(b*n*log(abs(x 
)) + b*log(abs(c)))^2*tan(2*a)^2*tan(a) + 32*b^3*n^3*x^2*e^(pi*b*n*sgn(x) 
- pi*b*n + pi*b*sgn(c) - pi*b)*tan(2*b*n*log(abs(x)) + 2*b*log(abs(c)))^2* 
tan(b*n*log(abs(x)) + b*log(abs(c)))^2*tan(2*a)^2*tan(a) - 4*b^3*n^3*x^2*e 
^(4*pi*b*n*sgn(x) - 4*pi*b*n + 4*pi*b*sgn(c) - 4*pi*b)*tan(2*b*n*log(abs(x 
)) + 2*b*log(abs(c)))^2*tan(b*n*log(abs(x)) + b*log(abs(c)))^2*tan(2*a)*ta 
n(a)^2 + 32*b^3*n^3*x^2*e^(3*pi*b*n*sgn(x) - 3*pi*b*n + 3*pi*b*sgn(c) - 3* 
pi*b)*tan(2*b*n*log(abs(x)) + 2*b*log(abs(c)))^2*tan(b*n*log(abs(x)) + b*l 
og(abs(c)))*tan(2*a)^2*tan(a)^2 + 32*b^3*n^3*x^2*e^(pi*b*n*sgn(x) - pi*b*n 
 + pi*b*sgn(c) - pi*b)*tan(2*b*n*log(abs(x)) + 2*b*log(abs(c)))^2*tan(b*n* 
log(abs(x)) + b*log(abs(c)))*tan(2*a)^2*tan(a)^2 - 4*b^3*n^3*x^2*e^(4*pi*b 
*n*sgn(x) - 4*pi*b*n + 4*pi*b*sgn(c) - 4*pi*b)*tan(2*b*n*log(abs(x)) + 2*b 
*log(abs(c)))*tan(b*n*log(abs(x)) + b*log(abs(c)))^2*tan(2*a)^2*tan(a)^2 - 
 4*b^3*n^3*x^2*tan(2*b*n*log(abs(x)) + 2*b*log(abs(c)))^2*tan(b*n*log(abs( 
x)) + b*log(abs(c)))^2*tan(2*a)*tan(a)^2 - 4*b^3*n^3*x^2*tan(2*b*n*log(abs 
(x)) + 2*b*log(abs(c)))*tan(b*n*log(abs(x)) + b*log(abs(c)))^2*tan(2*a)^2* 
tan(a)^2 + b^2*n^2*x^2*e^(4*pi*b*n*sgn(x) - 4*pi*b*n + 4*pi*b*sgn(c) - 4*p 
i*b)*tan(2*b*n*log(abs(x)) + 2*b*log(abs(c)))^2*tan(b*n*log(abs(x)) + b*lo 
g(abs(c)))^2*tan(2*a)^2*tan(a)^2 - 16*b^2*n^2*x^2*e^(3*pi*b*n*sgn(x) - ...
 

Mupad [B] (verification not implemented)

Time = 20.04 (sec) , antiderivative size = 127, normalized size of antiderivative = 0.60 \[ \int x \sin ^4\left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {3\,x^2}{16}-\frac {x^2\,{\mathrm {e}}^{-a\,2{}\mathrm {i}}\,\frac {1}{{\left (c\,x^n\right )}^{b\,2{}\mathrm {i}}}\,1{}\mathrm {i}}{8\,b\,n+8{}\mathrm {i}}-\frac {x^2\,{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,2{}\mathrm {i}}}{8+b\,n\,8{}\mathrm {i}}+\frac {x^2\,{\mathrm {e}}^{-a\,4{}\mathrm {i}}\,\frac {1}{{\left (c\,x^n\right )}^{b\,4{}\mathrm {i}}}\,1{}\mathrm {i}}{64\,b\,n+32{}\mathrm {i}}+\frac {x^2\,{\mathrm {e}}^{a\,4{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,4{}\mathrm {i}}}{32+b\,n\,64{}\mathrm {i}} \] Input:

int(x*sin(a + b*log(c*x^n))^4,x)
 

Output:

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

Reduce [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 180, normalized size of antiderivative = 0.86 \[ \int x \sin ^4\left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {x^{2} \left (-4 \cos \left (\mathrm {log}\left (x^{n} c \right ) b +a \right ) {\sin \left (\mathrm {log}\left (x^{n} c \right ) b +a \right )}^{3} b^{3} n^{3}-4 \cos \left (\mathrm {log}\left (x^{n} c \right ) b +a \right ) {\sin \left (\mathrm {log}\left (x^{n} c \right ) b +a \right )}^{3} b n -6 \cos \left (\mathrm {log}\left (x^{n} c \right ) b +a \right ) \sin \left (\mathrm {log}\left (x^{n} c \right ) b +a \right ) b^{3} n^{3}+2 {\sin \left (\mathrm {log}\left (x^{n} c \right ) b +a \right )}^{4} b^{2} n^{2}+2 {\sin \left (\mathrm {log}\left (x^{n} c \right ) b +a \right )}^{4}+6 {\sin \left (\mathrm {log}\left (x^{n} c \right ) b +a \right )}^{2} b^{2} n^{2}+3 b^{4} n^{4}\right )}{16 b^{4} n^{4}+20 b^{2} n^{2}+4} \] Input:

int(x*sin(a+b*log(c*x^n))^4,x)
 

Output:

(x**2*( - 4*cos(log(x**n*c)*b + a)*sin(log(x**n*c)*b + a)**3*b**3*n**3 - 4 
*cos(log(x**n*c)*b + a)*sin(log(x**n*c)*b + a)**3*b*n - 6*cos(log(x**n*c)* 
b + a)*sin(log(x**n*c)*b + a)*b**3*n**3 + 2*sin(log(x**n*c)*b + a)**4*b**2 
*n**2 + 2*sin(log(x**n*c)*b + a)**4 + 6*sin(log(x**n*c)*b + a)**2*b**2*n** 
2 + 3*b**4*n**4))/(4*(4*b**4*n**4 + 5*b**2*n**2 + 1))