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

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

Optimal result

Integrand size = 21, antiderivative size = 150 \[ \int (a+b \sin (c+d x))^3 \tan ^3(c+d x) \, dx=\frac {(a+b)^2 (2 a+5 b) \log (1-\sin (c+d x))}{4 d}+\frac {(2 a-5 b) (a-b)^2 \log (1+\sin (c+d x))}{4 d}+\frac {b \left (6 a^2+5 b^2\right ) \sin (c+d x)}{2 d}+\frac {3 a b^2 \sin ^2(c+d x)}{2 d}+\frac {b^3 \sin ^3(c+d x)}{3 d}+\frac {\sec ^2(c+d x) (a+b \sin (c+d x))^3}{2 d} \] Output:

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

Mathematica [A] (verified)

Time = 0.20 (sec) , antiderivative size = 141, normalized size of antiderivative = 0.94 \[ \int (a+b \sin (c+d x))^3 \tan ^3(c+d x) \, dx=\frac {3 (a+b)^2 (2 a+5 b) \log (1-\sin (c+d x))+3 (2 a-5 b) (a-b)^2 \log (1+\sin (c+d x))-\frac {3 (a+b)^3}{-1+\sin (c+d x)}+12 b \left (3 a^2+2 b^2\right ) \sin (c+d x)+18 a b^2 \sin ^2(c+d x)+4 b^3 \sin ^3(c+d x)+\frac {3 (a-b)^3}{1+\sin (c+d x)}}{12 d} \] Input:

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

Output:

(3*(a + b)^2*(2*a + 5*b)*Log[1 - Sin[c + d*x]] + 3*(2*a - 5*b)*(a - b)^2*L 
og[1 + Sin[c + d*x]] - (3*(a + b)^3)/(-1 + Sin[c + d*x]) + 12*b*(3*a^2 + 2 
*b^2)*Sin[c + d*x] + 18*a*b^2*Sin[c + d*x]^2 + 4*b^3*Sin[c + d*x]^3 + (3*( 
a - b)^3)/(1 + Sin[c + d*x]))/(12*d)
 

Rubi [A] (verified)

Time = 0.43 (sec) , antiderivative size = 157, normalized size of antiderivative = 1.05, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3042, 3200, 531, 25, 2160, 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 \tan ^3(c+d x) (a+b \sin (c+d x))^3 \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3200

\(\displaystyle \frac {\int \frac {b^3 \sin ^3(c+d x) (a+b \sin (c+d x))^3}{\left (b^2-b^2 \sin ^2(c+d x)\right )^2}d(b \sin (c+d x))}{d}\)

\(\Big \downarrow \) 531

\(\displaystyle \frac {\frac {\int -\frac {(a+b \sin (c+d x))^2 \left (2 \sin ^2(c+d x) b^4+3 b^4+2 a \sin (c+d x) b^3\right )}{b^2-b^2 \sin ^2(c+d x)}d(b \sin (c+d x))}{2 b^2}+\frac {b^2 (a+b \sin (c+d x))^3}{2 \left (b^2-b^2 \sin ^2(c+d x)\right )}}{d}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\frac {b^2 (a+b \sin (c+d x))^3}{2 \left (b^2-b^2 \sin ^2(c+d x)\right )}-\frac {\int \frac {(a+b \sin (c+d x))^2 \left (2 \sin ^2(c+d x) b^4+3 b^4+2 a \sin (c+d x) b^3\right )}{b^2-b^2 \sin ^2(c+d x)}d(b \sin (c+d x))}{2 b^2}}{d}\)

\(\Big \downarrow \) 2160

\(\displaystyle \frac {\frac {b^2 (a+b \sin (c+d x))^3}{2 \left (b^2-b^2 \sin ^2(c+d x)\right )}-\frac {\int \left (-2 \sin ^2(c+d x) b^4-5 b^4-6 a \sin (c+d x) b^3-6 a^2 b^2+\frac {5 b^6+9 a^2 b^4+2 a \left (a^2+6 b^2\right ) \sin (c+d x) b^3}{b^2-b^2 \sin ^2(c+d x)}\right )d(b \sin (c+d x))}{2 b^2}}{d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\frac {b^2 (a+b \sin (c+d x))^3}{2 \left (b^2-b^2 \sin ^2(c+d x)\right )}-\frac {b^3 \left (9 a^2+5 b^2\right ) \text {arctanh}(\sin (c+d x))-a b^2 \left (a^2+6 b^2\right ) \log \left (b^2-b^2 \sin ^2(c+d x)\right )-b^3 \left (6 a^2+5 b^2\right ) \sin (c+d x)-3 a b^4 \sin ^2(c+d x)-\frac {2}{3} b^5 \sin ^3(c+d x)}{2 b^2}}{d}\)

Input:

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

Output:

((b^2*(a + b*Sin[c + d*x])^3)/(2*(b^2 - b^2*Sin[c + d*x]^2)) - (b^3*(9*a^2 
 + 5*b^2)*ArcTanh[Sin[c + d*x]] - a*b^2*(a^2 + 6*b^2)*Log[b^2 - b^2*Sin[c 
+ d*x]^2] - b^3*(6*a^2 + 5*b^2)*Sin[c + d*x] - 3*a*b^4*Sin[c + d*x]^2 - (2 
*b^5*Sin[c + d*x]^3)/3)/(2*b^2))/d
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 531
Int[(x_)^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symb 
ol] :> With[{Qx = PolynomialQuotient[x^m, a + b*x^2, x], e = Coeff[Polynomi 
alRemainder[x^m, a + b*x^2, x], x, 0], f = Coeff[PolynomialRemainder[x^m, a 
 + b*x^2, x], x, 1]}, Simp[(c + d*x)^n*(a*f - b*e*x)*((a + b*x^2)^(p + 1)/( 
2*a*b*(p + 1))), x] + Simp[1/(2*a*b*(p + 1))   Int[(c + d*x)^(n - 1)*(a + b 
*x^2)^(p + 1)*ExpandToSum[2*a*b*(p + 1)*(c + d*x)*Qx - a*d*f*n + b*c*e*(2*p 
 + 3) + b*d*e*(n + 2*p + 3)*x, x], x], x]] /; FreeQ[{a, b, c, d}, x] && IGt 
Q[n, 0] && IGtQ[m, 0] && LtQ[p, -1] && GtQ[n, 1] && IntegerQ[2*p]
 

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

rule 2160
Int[(Pq_)*((d_) + (e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] 
:> Int[ExpandIntegrand[(d + e*x)^m*Pq*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, 
 d, e, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]
 

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

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

Time = 6.17 (sec) , antiderivative size = 206, normalized size of antiderivative = 1.37

method result size
derivativedivides \(\frac {a^{3} \left (\frac {\tan \left (d x +c \right )^{2}}{2}+\ln \left (\cos \left (d x +c \right )\right )\right )+3 a^{2} b \left (\frac {\sin \left (d x +c \right )^{5}}{2 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )^{3}}{2}+\frac {3 \sin \left (d x +c \right )}{2}-\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+3 a \,b^{2} \left (\frac {\sin \left (d x +c \right )^{6}}{2 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )^{4}}{2}+\sin \left (d x +c \right )^{2}+2 \ln \left (\cos \left (d x +c \right )\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}\) \(206\)
default \(\frac {a^{3} \left (\frac {\tan \left (d x +c \right )^{2}}{2}+\ln \left (\cos \left (d x +c \right )\right )\right )+3 a^{2} b \left (\frac {\sin \left (d x +c \right )^{5}}{2 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )^{3}}{2}+\frac {3 \sin \left (d x +c \right )}{2}-\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+3 a \,b^{2} \left (\frac {\sin \left (d x +c \right )^{6}}{2 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )^{4}}{2}+\sin \left (d x +c \right )^{2}+2 \ln \left (\cos \left (d x +c \right )\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}\) \(206\)
parts \(\frac {a^{3} \left (\frac {\tan \left (d x +c \right )^{2}}{2}-\frac {\ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2}\right )}{d}+\frac {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}+\frac {3 a^{2} b \left (\frac {\sin \left (d x +c \right )^{5}}{2 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )^{3}}{2}+\frac {3 \sin \left (d x +c \right )}{2}-\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}+\frac {3 a \,b^{2} \left (\frac {\sin \left (d x +c \right )^{6}}{2 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )^{4}}{2}+\sin \left (d x +c \right )^{2}+2 \ln \left (\cos \left (d x +c \right )\right )\right )}{d}\) \(220\)
risch \(-\frac {12 i a \,b^{2} c}{d}-\frac {i {\mathrm e}^{i \left (d x +c \right )} \left (2 i a^{3} {\mathrm e}^{i \left (d x +c \right )}+6 i a \,b^{2} {\mathrm e}^{i \left (d x +c \right )}+3 a^{2} b \,{\mathrm e}^{2 i \left (d x +c \right )}+b^{3} {\mathrm e}^{2 i \left (d x +c \right )}-3 a^{2} b -b^{3}\right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}+\frac {9 i b^{3} {\mathrm e}^{-i \left (d x +c \right )}}{8 d}-\frac {3 a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}}{8 d}-i a^{3} x +\frac {i b^{3} {\mathrm e}^{3 i \left (d x +c \right )}}{24 d}-6 i a \,b^{2} x +\frac {3 i b \,{\mathrm e}^{-i \left (d x +c \right )} a^{2}}{2 d}-\frac {3 a \,b^{2} {\mathrm e}^{-2 i \left (d x +c \right )}}{8 d}-\frac {i b^{3} {\mathrm e}^{-3 i \left (d x +c \right )}}{24 d}-\frac {3 i b \,{\mathrm e}^{i \left (d x +c \right )} a^{2}}{2 d}-\frac {9 i b^{3} {\mathrm e}^{i \left (d x +c \right )}}{8 d}-\frac {2 i a^{3} c}{d}+\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}-\frac {9 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a^{2} b}{2 d}+\frac {6 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a \,b^{2}}{d}-\frac {5 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) b^{3}}{2 d}+\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}+\frac {9 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) a^{2} b}{2 d}+\frac {6 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) a \,b^{2}}{d}+\frac {5 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) b^{3}}{2 d}\) \(471\)

Input:

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

Output:

1/d*(a^3*(1/2*tan(d*x+c)^2+ln(cos(d*x+c)))+3*a^2*b*(1/2*sin(d*x+c)^5/cos(d 
*x+c)^2+1/2*sin(d*x+c)^3+3/2*sin(d*x+c)-3/2*ln(sec(d*x+c)+tan(d*x+c)))+3*a 
*b^2*(1/2*sin(d*x+c)^6/cos(d*x+c)^2+1/2*sin(d*x+c)^4+sin(d*x+c)^2+2*ln(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.14 (sec) , antiderivative size = 194, normalized size of antiderivative = 1.29 \[ \int (a+b \sin (c+d x))^3 \tan ^3(c+d x) \, dx=-\frac {18 \, a b^{2} \cos \left (d x + c\right )^{4} - 9 \, a b^{2} \cos \left (d x + c\right )^{2} - 3 \, {\left (2 \, a^{3} - 9 \, a^{2} b + 12 \, a b^{2} - 5 \, b^{3}\right )} \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (2 \, a^{3} + 9 \, a^{2} b + 12 \, a b^{2} + 5 \, b^{3}\right )} \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 6 \, a^{3} - 18 \, a b^{2} + 2 \, {\left (2 \, b^{3} \cos \left (d x + c\right )^{4} - 9 \, a^{2} b - 3 \, b^{3} - 2 \, {\left (9 \, 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((a+b*sin(d*x+c))^3*tan(d*x+c)^3,x, algorithm="fricas")
 

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [A] (verification not implemented)

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

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

Output:

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

Giac [A] (verification not implemented)

Time = 0.24 (sec) , antiderivative size = 197, normalized size of antiderivative = 1.31 \[ \int (a+b \sin (c+d x))^3 \tan ^3(c+d x) \, dx=\frac {{\left (2 \, a^{3} - 9 \, a^{2} b + 12 \, a b^{2} - 5 \, b^{3}\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{4 \, d} + \frac {{\left (2 \, a^{3} + 9 \, a^{2} b + 12 \, a b^{2} + 5 \, b^{3}\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{4 \, d} + \frac {2 \, b^{3} d^{2} \sin \left (d x + c\right )^{3} + 9 \, a b^{2} d^{2} \sin \left (d x + c\right )^{2} + 18 \, a^{2} b d^{2} \sin \left (d x + c\right ) + 12 \, b^{3} d^{2} \sin \left (d x + c\right )}{6 \, d^{3}} - \frac {a^{3} + 3 \, a b^{2} + {\left (3 \, a^{2} b + b^{3}\right )} \sin \left (d x + c\right )}{2 \, d {\left (\sin \left (d x + c\right ) + 1\right )} {\left (\sin \left (d x + c\right ) - 1\right )}} \] Input:

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

Output:

1/4*(2*a^3 - 9*a^2*b + 12*a*b^2 - 5*b^3)*log(abs(sin(d*x + c) + 1))/d + 1/ 
4*(2*a^3 + 9*a^2*b + 12*a*b^2 + 5*b^3)*log(abs(sin(d*x + c) - 1))/d + 1/6* 
(2*b^3*d^2*sin(d*x + c)^3 + 9*a*b^2*d^2*sin(d*x + c)^2 + 18*a^2*b*d^2*sin( 
d*x + c) + 12*b^3*d^2*sin(d*x + c))/d^3 - 1/2*(a^3 + 3*a*b^2 + (3*a^2*b + 
b^3)*sin(d*x + c))/(d*(sin(d*x + c) + 1)*(sin(d*x + c) - 1))
 

Mupad [B] (verification not implemented)

Time = 17.65 (sec) , antiderivative size = 366, normalized size of antiderivative = 2.44 \[ \int (a+b \sin (c+d x))^3 \tan ^3(c+d x) \, dx=\frac {\left (9\,a^2\,b+5\,b^3\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+\left (2\,a^3+12\,a\,b^2\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+\left (12\,a^2\,b+\frac {20\,b^3}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (6\,a^3+12\,a\,b^2\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\left (6\,a^2\,b-\frac {22\,b^3}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (6\,a^3+12\,a\,b^2\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\left (12\,a^2\,b+\frac {20\,b^3}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (2\,a^3+12\,a\,b^2\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\left (9\,a^2\,b+5\,b^3\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{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 )}-\frac {\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )\,\left (a^3+6\,a\,b^2\right )}{d}+\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )\,{\left (a-b\right )}^2\,\left (a-\frac {5\,b}{2}\right )}{d}+\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )\,{\left (a+b\right )}^2\,\left (a+\frac {5\,b}{2}\right )}{d} \] Input:

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

Output:

(tan(c/2 + (d*x)/2)*(9*a^2*b + 5*b^3) + tan(c/2 + (d*x)/2)^2*(12*a*b^2 + 2 
*a^3) + tan(c/2 + (d*x)/2)^4*(12*a*b^2 + 6*a^3) + tan(c/2 + (d*x)/2)^8*(12 
*a*b^2 + 2*a^3) + tan(c/2 + (d*x)/2)^6*(12*a*b^2 + 6*a^3) + tan(c/2 + (d*x 
)/2)^9*(9*a^2*b + 5*b^3) + tan(c/2 + (d*x)/2)^5*(6*a^2*b - (22*b^3)/3) + t 
an(c/2 + (d*x)/2)^3*(12*a^2*b + (20*b^3)/3) + tan(c/2 + (d*x)/2)^7*(12*a^2 
*b + (20*b^3)/3))/(d*(tan(c/2 + (d*x)/2)^2 - 2*tan(c/2 + (d*x)/2)^4 - 2*ta 
n(c/2 + (d*x)/2)^6 + tan(c/2 + (d*x)/2)^8 + tan(c/2 + (d*x)/2)^10 + 1)) - 
(log(tan(c/2 + (d*x)/2)^2 + 1)*(6*a*b^2 + a^3))/d + (log(tan(c/2 + (d*x)/2 
) + 1)*(a - b)^2*(a - (5*b)/2))/d + (log(tan(c/2 + (d*x)/2) - 1)*(a + b)^2 
*(a + (5*b)/2))/d
 

Reduce [B] (verification not implemented)

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

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

Output:

( - 3*log(tan(c + d*x)**2 + 1)*sin(c + d*x)**2*a**3 + 3*log(tan(c + d*x)** 
2 + 1)*a**3 - 36*log(tan((c + d*x)/2)**2 + 1)*sin(c + d*x)**2*a*b**2 + 36* 
log(tan((c + d*x)/2)**2 + 1)*a*b**2 + 27*log(tan((c + d*x)/2) - 1)*sin(c + 
 d*x)**2*a**2*b + 36*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2*a*b**2 + 15 
*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2*b**3 - 27*log(tan((c + d*x)/2) 
- 1)*a**2*b - 36*log(tan((c + d*x)/2) - 1)*a*b**2 - 15*log(tan((c + d*x)/2 
) - 1)*b**3 - 27*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**2*a**2*b + 36*log 
(tan((c + d*x)/2) + 1)*sin(c + d*x)**2*a*b**2 - 15*log(tan((c + d*x)/2) + 
1)*sin(c + d*x)**2*b**3 + 27*log(tan((c + d*x)/2) + 1)*a**2*b - 36*log(tan 
((c + d*x)/2) + 1)*a*b**2 + 15*log(tan((c + d*x)/2) + 1)*b**3 + 2*sin(c + 
d*x)**5*b**3 + 9*sin(c + d*x)**4*a*b**2 + 18*sin(c + d*x)**3*a**2*b + 10*s 
in(c + d*x)**3*b**3 + 3*sin(c + d*x)**2*tan(c + d*x)**2*a**3 - 18*sin(c + 
d*x)**2*a*b**2 - 27*sin(c + d*x)*a**2*b - 15*sin(c + d*x)*b**3 - 3*tan(c + 
 d*x)**2*a**3)/(6*d*(sin(c + d*x)**2 - 1))