\(\int \sin ^3(c+d x) (a+b \tan (c+d x))^3 \, dx\) [32]

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

Optimal result

Integrand size = 21, antiderivative size = 205 \[ \int \sin ^3(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {3 a^2 b \text {arctanh}(\sin (c+d x))}{d}-\frac {5 b^3 \text {arctanh}(\sin (c+d x))}{2 d}-\frac {a^3 \cos (c+d x)}{d}+\frac {6 a b^2 \cos (c+d x)}{d}+\frac {a^3 \cos ^3(c+d x)}{3 d}-\frac {a b^2 \cos ^3(c+d x)}{d}+\frac {3 a b^2 \sec (c+d x)}{d}-\frac {3 a^2 b \sin (c+d x)}{d}+\frac {5 b^3 \sin (c+d x)}{2 d}-\frac {a^2 b \sin ^3(c+d x)}{d}+\frac {5 b^3 \sin ^3(c+d x)}{6 d}+\frac {b^3 \sin ^3(c+d x) \tan ^2(c+d x)}{2 d} \] Output:

3*a^2*b*arctanh(sin(d*x+c))/d-5/2*b^3*arctanh(sin(d*x+c))/d-a^3*cos(d*x+c) 
/d+6*a*b^2*cos(d*x+c)/d+1/3*a^3*cos(d*x+c)^3/d-a*b^2*cos(d*x+c)^3/d+3*a*b^ 
2*sec(d*x+c)/d-3*a^2*b*sin(d*x+c)/d+5/2*b^3*sin(d*x+c)/d-a^2*b*sin(d*x+c)^ 
3/d+5/6*b^3*sin(d*x+c)^3/d+1/2*b^3*sin(d*x+c)^3*tan(d*x+c)^2/d
 

Mathematica [A] (verified)

Time = 5.56 (sec) , antiderivative size = 289, normalized size of antiderivative = 1.41 \[ \int \sin ^3(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {-9 a \left (a^2-7 b^2\right ) \cos (c+d x)+\left (a^3-3 a b^2\right ) \cos (3 (c+d x))+b \left (36 a b-36 a^2 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+30 b^2 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+36 a^2 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )-30 b^2 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+\frac {3 b^2}{\left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}+72 a b \sec (c+d x) \sin ^2\left (\frac {1}{2} (c+d x)\right )-\frac {3 b^2}{\left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}-9 \left (5 a^2-3 b^2\right ) \sin (c+d x)+3 a^2 \sin (3 (c+d x))-b^2 \sin (3 (c+d x))\right )}{12 d} \] Input:

Integrate[Sin[c + d*x]^3*(a + b*Tan[c + d*x])^3,x]
 

Output:

(-9*a*(a^2 - 7*b^2)*Cos[c + d*x] + (a^3 - 3*a*b^2)*Cos[3*(c + d*x)] + b*(3 
6*a*b - 36*a^2*Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] + 30*b^2*Log[Cos[( 
c + d*x)/2] - Sin[(c + d*x)/2]] + 36*a^2*Log[Cos[(c + d*x)/2] + Sin[(c + d 
*x)/2]] - 30*b^2*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] + (3*b^2)/(Cos[( 
c + d*x)/2] - Sin[(c + d*x)/2])^2 + 72*a*b*Sec[c + d*x]*Sin[(c + d*x)/2]^2 
 - (3*b^2)/(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^2 - 9*(5*a^2 - 3*b^2)*Sin 
[c + d*x] + 3*a^2*Sin[3*(c + d*x)] - b^2*Sin[3*(c + d*x)]))/(12*d)
 

Rubi [A] (verified)

Time = 0.46 (sec) , antiderivative size = 205, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3042, 4000, 2009}

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 \sin ^3(c+d x) (a+b \tan (c+d x))^3 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \sin (c+d x)^3 (a+b \tan (c+d x))^3dx\)

\(\Big \downarrow \) 4000

\(\displaystyle \int \left (a^3 \sin ^3(c+d x)+3 a^2 b \sin ^3(c+d x) \tan (c+d x)+3 a b^2 \sin ^3(c+d x) \tan ^2(c+d x)+b^3 \sin ^3(c+d x) \tan ^3(c+d x)\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {a^3 \cos ^3(c+d x)}{3 d}-\frac {a^3 \cos (c+d x)}{d}+\frac {3 a^2 b \text {arctanh}(\sin (c+d x))}{d}-\frac {a^2 b \sin ^3(c+d x)}{d}-\frac {3 a^2 b \sin (c+d x)}{d}-\frac {a b^2 \cos ^3(c+d x)}{d}+\frac {6 a b^2 \cos (c+d x)}{d}+\frac {3 a b^2 \sec (c+d x)}{d}-\frac {5 b^3 \text {arctanh}(\sin (c+d x))}{2 d}+\frac {5 b^3 \sin ^3(c+d x)}{6 d}+\frac {5 b^3 \sin (c+d x)}{2 d}+\frac {b^3 \sin ^3(c+d x) \tan ^2(c+d x)}{2 d}\)

Input:

Int[Sin[c + d*x]^3*(a + b*Tan[c + d*x])^3,x]
 

Output:

(3*a^2*b*ArcTanh[Sin[c + d*x]])/d - (5*b^3*ArcTanh[Sin[c + d*x]])/(2*d) - 
(a^3*Cos[c + d*x])/d + (6*a*b^2*Cos[c + d*x])/d + (a^3*Cos[c + d*x]^3)/(3* 
d) - (a*b^2*Cos[c + d*x]^3)/d + (3*a*b^2*Sec[c + d*x])/d - (3*a^2*b*Sin[c 
+ d*x])/d + (5*b^3*Sin[c + d*x])/(2*d) - (a^2*b*Sin[c + d*x]^3)/d + (5*b^3 
*Sin[c + d*x]^3)/(6*d) + (b^3*Sin[c + d*x]^3*Tan[c + d*x]^2)/(2*d)
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4000
Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n 
_.), x_Symbol] :> Int[Expand[Sin[e + f*x]^m*(a + b*Tan[e + f*x])^n, x], x] 
/; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] && IGtQ[n, 0]
 
Maple [A] (verified)

Time = 4.29 (sec) , antiderivative size = 184, normalized size of antiderivative = 0.90

method result size
derivativedivides \(\frac {-\frac {a^{3} \left (2+\sin \left (d x +c \right )^{2}\right ) \cos \left (d x +c \right )}{3}+3 a^{2} b \left (-\frac {\sin \left (d x +c \right )^{3}}{3}-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+3 a \,b^{2} \left (\frac {\sin \left (d x +c \right )^{6}}{\cos \left (d x +c \right )}+\left (\frac {8}{3}+\sin \left (d x +c \right )^{4}+\frac {4 \sin \left (d x +c \right )^{2}}{3}\right ) \cos \left (d x +c \right )\right )+b^{3} \left (\frac {\sin \left (d x +c \right )^{7}}{2 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )^{5}}{2}+\frac {5 \sin \left (d x +c \right )^{3}}{6}+\frac {5 \sin \left (d x +c \right )}{2}-\frac {5 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) \(184\)
default \(\frac {-\frac {a^{3} \left (2+\sin \left (d x +c \right )^{2}\right ) \cos \left (d x +c \right )}{3}+3 a^{2} b \left (-\frac {\sin \left (d x +c \right )^{3}}{3}-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+3 a \,b^{2} \left (\frac {\sin \left (d x +c \right )^{6}}{\cos \left (d x +c \right )}+\left (\frac {8}{3}+\sin \left (d x +c \right )^{4}+\frac {4 \sin \left (d x +c \right )^{2}}{3}\right ) \cos \left (d x +c \right )\right )+b^{3} \left (\frac {\sin \left (d x +c \right )^{7}}{2 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )^{5}}{2}+\frac {5 \sin \left (d x +c \right )^{3}}{6}+\frac {5 \sin \left (d x +c \right )}{2}-\frac {5 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) \(184\)
risch \(-\frac {i {\mathrm e}^{-3 i \left (d x +c \right )} b^{3}}{24 d}-\frac {i b^{2} {\mathrm e}^{i \left (d x +c \right )} \left (6 i a \,{\mathrm e}^{2 i \left (d x +c \right )}+b \,{\mathrm e}^{2 i \left (d x +c \right )}+6 i a -b \right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}+\frac {{\mathrm e}^{3 i \left (d x +c \right )} a^{3}}{24 d}-\frac {{\mathrm e}^{3 i \left (d x +c \right )} a \,b^{2}}{8 d}-\frac {9 i {\mathrm e}^{i \left (d x +c \right )} b^{3}}{8 d}-\frac {i {\mathrm e}^{3 i \left (d x +c \right )} a^{2} b}{8 d}-\frac {3 \,{\mathrm e}^{i \left (d x +c \right )} a^{3}}{8 d}+\frac {21 \,{\mathrm e}^{i \left (d x +c \right )} a \,b^{2}}{8 d}-\frac {15 i {\mathrm e}^{-i \left (d x +c \right )} a^{2} b}{8 d}+\frac {i {\mathrm e}^{-3 i \left (d x +c \right )} a^{2} b}{8 d}-\frac {3 \,{\mathrm e}^{-i \left (d x +c \right )} a^{3}}{8 d}+\frac {21 \,{\mathrm e}^{-i \left (d x +c \right )} a \,b^{2}}{8 d}+\frac {15 i {\mathrm e}^{i \left (d x +c \right )} a^{2} b}{8 d}+\frac {i {\mathrm e}^{3 i \left (d x +c \right )} b^{3}}{24 d}+\frac {{\mathrm e}^{-3 i \left (d x +c \right )} a^{3}}{24 d}-\frac {{\mathrm e}^{-3 i \left (d x +c \right )} a \,b^{2}}{8 d}+\frac {9 i {\mathrm e}^{-i \left (d x +c \right )} b^{3}}{8 d}+\frac {3 b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a^{2}}{d}-\frac {5 b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{2 d}-\frac {3 b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) a^{2}}{d}+\frac {5 b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{2 d}\) \(469\)

Input:

int(sin(d*x+c)^3*(a+b*tan(d*x+c))^3,x,method=_RETURNVERBOSE)
 

Output:

1/d*(-1/3*a^3*(2+sin(d*x+c)^2)*cos(d*x+c)+3*a^2*b*(-1/3*sin(d*x+c)^3-sin(d 
*x+c)+ln(sec(d*x+c)+tan(d*x+c)))+3*a*b^2*(sin(d*x+c)^6/cos(d*x+c)+(8/3+sin 
(d*x+c)^4+4/3*sin(d*x+c)^2)*cos(d*x+c))+b^3*(1/2*sin(d*x+c)^7/cos(d*x+c)^2 
+1/2*sin(d*x+c)^5+5/6*sin(d*x+c)^3+5/2*sin(d*x+c)-5/2*ln(sec(d*x+c)+tan(d* 
x+c))))
 

Fricas [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 188, normalized size of antiderivative = 0.92 \[ \int \sin ^3(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {4 \, {\left (a^{3} - 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{5} + 36 \, a b^{2} \cos \left (d x + c\right ) - 12 \, {\left (a^{3} - 6 \, a b^{2}\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (6 \, a^{2} b - 5 \, b^{3}\right )} \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (6 \, a^{2} b - 5 \, b^{3}\right )} \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (2 \, {\left (3 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right )^{4} + 3 \, b^{3} - 2 \, {\left (12 \, a^{2} b - 7 \, b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{12 \, d \cos \left (d x + c\right )^{2}} \] Input:

integrate(sin(d*x+c)^3*(a+b*tan(d*x+c))^3,x, algorithm="fricas")
 

Output:

1/12*(4*(a^3 - 3*a*b^2)*cos(d*x + c)^5 + 36*a*b^2*cos(d*x + c) - 12*(a^3 - 
 6*a*b^2)*cos(d*x + c)^3 + 3*(6*a^2*b - 5*b^3)*cos(d*x + c)^2*log(sin(d*x 
+ c) + 1) - 3*(6*a^2*b - 5*b^3)*cos(d*x + c)^2*log(-sin(d*x + c) + 1) + 2* 
(2*(3*a^2*b - b^3)*cos(d*x + c)^4 + 3*b^3 - 2*(12*a^2*b - 7*b^3)*cos(d*x + 
 c)^2)*sin(d*x + c))/(d*cos(d*x + c)^2)
 

Sympy [F]

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

integrate(sin(d*x+c)**3*(a+b*tan(d*x+c))**3,x)
 

Output:

Integral((a + b*tan(c + d*x))**3*sin(c + d*x)**3, x)
 

Maxima [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 173, normalized size of antiderivative = 0.84 \[ \int \sin ^3(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {4 \, {\left (\cos \left (d x + c\right )^{3} - 3 \, \cos \left (d x + c\right )\right )} a^{3} - 6 \, {\left (2 \, \sin \left (d x + c\right )^{3} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right ) + 6 \, \sin \left (d x + c\right )\right )} a^{2} b - 12 \, {\left (\cos \left (d x + c\right )^{3} - \frac {3}{\cos \left (d x + c\right )} - 6 \, \cos \left (d x + c\right )\right )} a b^{2} + {\left (4 \, \sin \left (d x + c\right )^{3} - \frac {6 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - 15 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 15 \, \log \left (\sin \left (d x + c\right ) - 1\right ) + 24 \, \sin \left (d x + c\right )\right )} b^{3}}{12 \, d} \] Input:

integrate(sin(d*x+c)^3*(a+b*tan(d*x+c))^3,x, algorithm="maxima")
 

Output:

1/12*(4*(cos(d*x + c)^3 - 3*cos(d*x + c))*a^3 - 6*(2*sin(d*x + c)^3 - 3*lo 
g(sin(d*x + c) + 1) + 3*log(sin(d*x + c) - 1) + 6*sin(d*x + c))*a^2*b - 12 
*(cos(d*x + c)^3 - 3/cos(d*x + c) - 6*cos(d*x + c))*a*b^2 + (4*sin(d*x + c 
)^3 - 6*sin(d*x + c)/(sin(d*x + c)^2 - 1) - 15*log(sin(d*x + c) + 1) + 15* 
log(sin(d*x + c) - 1) + 24*sin(d*x + c))*b^3)/d
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 66584 vs. \(2 (195) = 390\).

Time = 117.95 (sec) , antiderivative size = 66584, normalized size of antiderivative = 324.80 \[ \int \sin ^3(c+d x) (a+b \tan (c+d x))^3 \, dx=\text {Too large to display} \] Input:

integrate(sin(d*x+c)^3*(a+b*tan(d*x+c))^3,x, algorithm="giac")
 

Output:

-1/192*(45*pi*a*b^2*sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*tan(1/2*d*x)^2*tan 
(1/2*c) + tan(1/2*d*x)^2 - tan(1/2*c)^2 + 2*tan(1/2*c) - 1)*sgn(tan(1/2*d* 
x)^2*tan(1/2*c)^2 + 2*tan(1/2*d*x)*tan(1/2*c)^2 - tan(1/2*d*x)^2 + tan(1/2 
*c)^2 + 2*tan(1/2*d*x) - 1)*tan(1/2*d*x)^10*tan(1/2*c)^10 + 45*pi*a*b^2*sg 
n(tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*tan(1/2*d*x)^2*tan(1/2*c) + tan(1/2*d*x) 
^2 - tan(1/2*c)^2 - 2*tan(1/2*c) - 1)*sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 - 2* 
tan(1/2*d*x)*tan(1/2*c)^2 - tan(1/2*d*x)^2 + tan(1/2*c)^2 - 2*tan(1/2*d*x) 
 - 1)*tan(1/2*d*x)^10*tan(1/2*c)^10 + 45*pi*a*b^2*sgn(tan(1/2*d*x)^2*tan(1 
/2*c)^2 + 2*tan(1/2*d*x)^2*tan(1/2*c) + tan(1/2*d*x)^2 - tan(1/2*c)^2 + 2* 
tan(1/2*c) - 1)*tan(1/2*d*x)^10*tan(1/2*c)^10 + 45*pi*a*b^2*sgn(tan(1/2*d* 
x)^2*tan(1/2*c)^2 - 2*tan(1/2*d*x)^2*tan(1/2*c) + tan(1/2*d*x)^2 - tan(1/2 
*c)^2 - 2*tan(1/2*c) - 1)*tan(1/2*d*x)^10*tan(1/2*c)^10 - 360*pi*a*b^2*sgn 
(tan(1/2*d*x)^2*tan(1/2*c)^2 - tan(1/2*d*x)^2 - 4*tan(1/2*d*x)*tan(1/2*c) 
- tan(1/2*c)^2 + 1)*tan(1/2*d*x)^10*tan(1/2*c)^10 + 45*pi*a*b^2*sgn(tan(1/ 
2*d*x)^2*tan(1/2*c)^2 + 2*tan(1/2*d*x)^2*tan(1/2*c) + tan(1/2*d*x)^2 - tan 
(1/2*c)^2 + 2*tan(1/2*c) - 1)*sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*tan(1/2* 
d*x)*tan(1/2*c)^2 - tan(1/2*d*x)^2 + tan(1/2*c)^2 + 2*tan(1/2*d*x) - 1)*ta 
n(1/2*d*x)^10*tan(1/2*c)^8 + 45*pi*a*b^2*sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 - 
 2*tan(1/2*d*x)^2*tan(1/2*c) + tan(1/2*d*x)^2 - tan(1/2*c)^2 - 2*tan(1/2*c 
) - 1)*sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*tan(1/2*d*x)*tan(1/2*c)^2 - ...
 

Mupad [B] (verification not implemented)

Time = 3.69 (sec) , antiderivative size = 291, normalized size of antiderivative = 1.42 \[ \int \sin ^3(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (6\,a^2\,b-5\,b^3\right )}{d}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (6\,a^2\,b-5\,b^3\right )+4\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-16\,a\,b^2-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (16\,a\,b^2-\frac {4\,a^3}{3}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (32\,a\,b^2-\frac {20\,a^3}{3}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9\,\left (6\,a^2\,b-5\,b^3\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (8\,a^2\,b-\frac {20\,b^3}{3}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,\left (8\,a^2\,b-\frac {20\,b^3}{3}\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (28\,a^2\,b-\frac {22\,b^3}{3}\right )+\frac {4\,a^3}{3}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \] Input:

int(sin(c + d*x)^3*(a + b*tan(c + d*x))^3,x)
 

Output:

(atanh(tan(c/2 + (d*x)/2))*(6*a^2*b - 5*b^3))/d - (tan(c/2 + (d*x)/2)*(6*a 
^2*b - 5*b^3) + 4*a^3*tan(c/2 + (d*x)/2)^6 - 16*a*b^2 - tan(c/2 + (d*x)/2) 
^2*(16*a*b^2 - (4*a^3)/3) + tan(c/2 + (d*x)/2)^4*(32*a*b^2 - (20*a^3)/3) + 
 tan(c/2 + (d*x)/2)^9*(6*a^2*b - 5*b^3) + tan(c/2 + (d*x)/2)^3*(8*a^2*b - 
(20*b^3)/3) + tan(c/2 + (d*x)/2)^7*(8*a^2*b - (20*b^3)/3) - tan(c/2 + (d*x 
)/2)^5*(28*a^2*b - (22*b^3)/3) + (4*a^3)/3)/(d*(tan(c/2 + (d*x)/2)^2 - 2*t 
an(c/2 + (d*x)/2)^4 - 2*tan(c/2 + (d*x)/2)^6 + tan(c/2 + (d*x)/2)^8 + tan( 
c/2 + (d*x)/2)^10 + 1))
 

Reduce [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 406, normalized size of antiderivative = 1.98 \[ \int \sin ^3(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {-2 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4} a^{3}+6 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4} a \,b^{2}-2 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} a^{3}+24 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} a \,b^{2}+4 \cos \left (d x +c \right ) a^{3}-48 \cos \left (d x +c \right ) a \,b^{2}-18 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{2} a^{2} b +15 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{2} b^{3}+18 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) a^{2} b -15 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) b^{3}+18 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{2} a^{2} b -15 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{2} b^{3}-18 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) a^{2} b +15 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) b^{3}-6 \sin \left (d x +c \right )^{5} a^{2} b +2 \sin \left (d x +c \right )^{5} b^{3}-12 \sin \left (d x +c \right )^{3} a^{2} b +10 \sin \left (d x +c \right )^{3} b^{3}+4 \sin \left (d x +c \right )^{2} a^{3}-48 \sin \left (d x +c \right )^{2} a \,b^{2}+18 \sin \left (d x +c \right ) a^{2} b -15 \sin \left (d x +c \right ) b^{3}-4 a^{3}+48 a \,b^{2}}{6 d \left (\sin \left (d x +c \right )^{2}-1\right )} \] Input:

int(sin(d*x+c)^3*(a+b*tan(d*x+c))^3,x)
 

Output:

( - 2*cos(c + d*x)*sin(c + d*x)**4*a**3 + 6*cos(c + d*x)*sin(c + d*x)**4*a 
*b**2 - 2*cos(c + d*x)*sin(c + d*x)**2*a**3 + 24*cos(c + d*x)*sin(c + d*x) 
**2*a*b**2 + 4*cos(c + d*x)*a**3 - 48*cos(c + d*x)*a*b**2 - 18*log(tan((c 
+ d*x)/2) - 1)*sin(c + d*x)**2*a**2*b + 15*log(tan((c + d*x)/2) - 1)*sin(c 
 + d*x)**2*b**3 + 18*log(tan((c + d*x)/2) - 1)*a**2*b - 15*log(tan((c + d* 
x)/2) - 1)*b**3 + 18*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**2*a**2*b - 15 
*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**2*b**3 - 18*log(tan((c + d*x)/2) 
+ 1)*a**2*b + 15*log(tan((c + d*x)/2) + 1)*b**3 - 6*sin(c + d*x)**5*a**2*b 
 + 2*sin(c + d*x)**5*b**3 - 12*sin(c + d*x)**3*a**2*b + 10*sin(c + d*x)**3 
*b**3 + 4*sin(c + d*x)**2*a**3 - 48*sin(c + d*x)**2*a*b**2 + 18*sin(c + d* 
x)*a**2*b - 15*sin(c + d*x)*b**3 - 4*a**3 + 48*a*b**2)/(6*d*(sin(c + d*x)* 
*2 - 1))