\(\int \frac {\sin ^3(a+b \log (c x^n))}{x^2} \, dx\) [17]

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

Optimal result

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

-6*b^3*n^3*cos(a+b*ln(c*x^n))/(9*b^4*n^4+10*b^2*n^2+1)/x-6*b^2*n^2*sin(a+b 
*ln(c*x^n))/(9*b^4*n^4+10*b^2*n^2+1)/x-3*b*n*cos(a+b*ln(c*x^n))*sin(a+b*ln 
(c*x^n))^2/(9*b^2*n^2+1)/x-sin(a+b*ln(c*x^n))^3/(9*b^2*n^2+1)/x
 

Mathematica [A] (verified)

Time = 0.24 (sec) , antiderivative size = 125, normalized size of antiderivative = 0.79 \[ \int \frac {\sin ^3\left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx=\frac {-3 b n \left (1+9 b^2 n^2\right ) \cos \left (a+b \log \left (c x^n\right )\right )+3 \left (b n+b^3 n^3\right ) \cos \left (3 \left (a+b \log \left (c x^n\right )\right )\right )+2 \left (-1-13 b^2 n^2+\left (1+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 )}{4 \left (1+10 b^2 n^2+9 b^4 n^4\right ) x} \] Input:

Integrate[Sin[a + b*Log[c*x^n]]^3/x^2,x]
 

Output:

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

Rubi [A] (verified)

Time = 0.33 (sec) , antiderivative size = 151, normalized size of antiderivative = 0.96, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {4990, 4988}

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

\(\Big \downarrow \) 4990

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

\(\Big \downarrow \) 4988

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

Input:

Int[Sin[a + b*Log[c*x^n]]^3/x^2,x]
 

Output:

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

Defintions of rubi rules used

rule 4988
Int[((e_.)*(x_))^(m_.)*Sin[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(d_.)], x_ 
Symbol] :> Simp[(m + 1)*(e*x)^(m + 1)*(Sin[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)*(Cos[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 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 [A] (verified)

Time = 3.84 (sec) , antiderivative size = 221, normalized size of antiderivative = 1.40

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

Input:

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

Output:

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

Fricas [A] (verification not implemented)

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

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

Output:

(3*(b^3*n^3 + b*n)*cos(b*n*log(x) + b*log(c) + a)^3 - 3*(3*b^3*n^3 + b*n)* 
cos(b*n*log(x) + b*log(c) + a) - (7*b^2*n^2 - (b^2*n^2 + 1)*cos(b*n*log(x) 
 + b*log(c) + a)^2 + 1)*sin(b*n*log(x) + b*log(c) + a))/((9*b^4*n^4 + 10*b 
^2*n^2 + 1)*x)
 

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 43.67 (sec) , antiderivative size = 775, normalized size of antiderivative = 4.91 \[ \int \frac {\sin ^3\left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx =\text {Too large to display} \] Input:

integrate(sin(a+b*ln(c*x**n))**3/x**2,x)
                                                                                    
                                                                                    
 

Output:

Piecewise((-3*sin(a - I*log(c*x**n)/n)/(8*x) - sin(3*a - 3*I*log(c*x**n)/n 
)/(32*x) + 3*I*cos(3*a - 3*I*log(c*x**n)/n)/(32*x) + 3*log(c*x**n)*sin(a - 
 I*log(c*x**n)/n)/(8*n*x) - 3*I*log(c*x**n)*cos(a - I*log(c*x**n)/n)/(8*n* 
x), Eq(b, -I/n)), (-27*sin(a - I*log(c*x**n)/(3*n))/(32*x) + 9*I*cos(a - I 
*log(c*x**n)/(3*n))/(32*x) + I*cos(3*a - I*log(c*x**n)/n)/(8*x) - log(c*x* 
*n)*sin(3*a - I*log(c*x**n)/n)/(8*n*x) + I*log(c*x**n)*cos(3*a - I*log(c*x 
**n)/n)/(8*n*x), Eq(b, -I/(3*n))), (-27*sin(a + I*log(c*x**n)/(3*n))/(32*x 
) - 9*I*cos(a + I*log(c*x**n)/(3*n))/(32*x) - I*cos(3*a + I*log(c*x**n)/n) 
/(8*x) - log(c*x**n)*sin(3*a + I*log(c*x**n)/n)/(8*n*x) - I*log(c*x**n)*co 
s(3*a + I*log(c*x**n)/n)/(8*n*x), Eq(b, I/(3*n))), (-3*sin(a + I*log(c*x** 
n)/n)/(8*x) - sin(3*a + 3*I*log(c*x**n)/n)/(32*x) - 3*I*cos(3*a + 3*I*log( 
c*x**n)/n)/(32*x) + 3*log(c*x**n)*sin(a + I*log(c*x**n)/n)/(8*n*x) + 3*I*l 
og(c*x**n)*cos(a + I*log(c*x**n)/n)/(8*n*x), Eq(b, I/n)), (-9*b**3*n**3*si 
n(a + b*log(c*x**n))**2*cos(a + b*log(c*x**n))/(9*b**4*n**4*x + 10*b**2*n* 
*2*x + x) - 6*b**3*n**3*cos(a + b*log(c*x**n))**3/(9*b**4*n**4*x + 10*b**2 
*n**2*x + x) - 7*b**2*n**2*sin(a + b*log(c*x**n))**3/(9*b**4*n**4*x + 10*b 
**2*n**2*x + x) - 6*b**2*n**2*sin(a + b*log(c*x**n))*cos(a + b*log(c*x**n) 
)**2/(9*b**4*n**4*x + 10*b**2*n**2*x + x) - 3*b*n*sin(a + b*log(c*x**n))** 
2*cos(a + b*log(c*x**n))/(9*b**4*n**4*x + 10*b**2*n**2*x + x) - sin(a + b* 
log(c*x**n))**3/(9*b**4*n**4*x + 10*b**2*n**2*x + x), True))
 

Maxima [B] (verification not implemented)

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

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

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

Output:

1/8*((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 + (b^2*cos(3*b*log(c))*sin(6*b*log(c)) 
 - b^2*cos(6*b*log(c))*sin(3*b*log(c)) + b^2*sin(3*b*log(c)))*n^2 + 3*(b*c 
os(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 + cos(3*b*log(c))*sin(6*b*log(c)) - cos(6*b*log(c))*sin(3* 
b*log(c)) + sin(3*b*log(c)))*cos(3*b*log(x^n) + 3*a) - 3*(9*(b^3*cos(4*b*l 
og(c))*cos(3*b*log(c)) + b^3*cos(3*b*log(c))*cos(2*b*log(c)) + b^3*sin(4*b 
*log(c))*sin(3*b*log(c)) + b^3*sin(3*b*log(c))*sin(2*b*log(c)))*n^3 + 9*(b 
^2*cos(3*b*log(c))*sin(4*b*log(c)) - b^2*cos(4*b*log(c))*sin(3*b*log(c)) + 
 b^2*cos(2*b*log(c))*sin(3*b*log(c)) - b^2*cos(3*b*log(c))*sin(2*b*log(c)) 
)*n^2 + (b*cos(4*b*log(c))*cos(3*b*log(c)) + b*cos(3*b*log(c))*cos(2*b*log 
(c)) + b*sin(4*b*log(c))*sin(3*b*log(c)) + b*sin(3*b*log(c))*sin(2*b*log(c 
)))*n + cos(3*b*log(c))*sin(4*b*log(c)) - cos(4*b*log(c))*sin(3*b*log(c)) 
+ cos(2*b*log(c))*sin(3*b*log(c)) - cos(3*b*log(c))*sin(2*b*log(c)))*cos(b 
*log(x^n) + a) - (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 - (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 + 3*(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 - cos(6*b*log(c))*cos(3*b*log(c)) - sin(6*b*lo 
g(c))*sin(3*b*log(c)) - cos(3*b*log(c)))*sin(3*b*log(x^n) + 3*a) + 3*(9...
 

Giac [F]

\[ \int \frac {\sin ^3\left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx=\int { \frac {\sin \left (b \log \left (c x^{n}\right ) + a\right )^{3}}{x^{2}} \,d x } \] Input:

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

Output:

integrate(sin(b*log(c*x^n) + a)^3/x^2, x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {\sin ^3\left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx=\int \frac {{\sin \left (a+b\,\ln \left (c\,x^n\right )\right )}^3}{x^2} \,d x \] Input:

int(sin(a + b*log(c*x^n))^3/x^2,x)
 

Output:

int(sin(a + b*log(c*x^n))^3/x^2, x)
 

Reduce [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 159, normalized size of antiderivative = 1.01 \[ \int \frac {\sin ^3\left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx=\frac {-3 \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^{3} n^{3}-3 \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 n -6 \cos \left (\mathrm {log}\left (x^{n} c \right ) b +a \right ) b^{3} n^{3}-{\sin \left (\mathrm {log}\left (x^{n} c \right ) b +a \right )}^{3} b^{2} n^{2}-{\sin \left (\mathrm {log}\left (x^{n} c \right ) b +a \right )}^{3}-6 \sin \left (\mathrm {log}\left (x^{n} c \right ) b +a \right ) b^{2} n^{2}}{x \left (9 b^{4} n^{4}+10 b^{2} n^{2}+1\right )} \] Input:

int(sin(a+b*log(c*x^n))^3/x^2,x)
 

Output:

( - 3*cos(log(x**n*c)*b + a)*sin(log(x**n*c)*b + a)**2*b**3*n**3 - 3*cos(l 
og(x**n*c)*b + a)*sin(log(x**n*c)*b + a)**2*b*n - 6*cos(log(x**n*c)*b + a) 
*b**3*n**3 - sin(log(x**n*c)*b + a)**3*b**2*n**2 - sin(log(x**n*c)*b + a)* 
*3 - 6*sin(log(x**n*c)*b + a)*b**2*n**2)/(x*(9*b**4*n**4 + 10*b**2*n**2 + 
1))