\(\int \sin ^2(c+d x) (a+b \tan (c+d x))^4 \, dx\) [42]

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 = 139 \[ \int \sin ^2(c+d x) (a+b \tan (c+d x))^4 \, dx=\frac {1}{2} \left (a^4-18 a^2 b^2+5 b^4\right ) x-\frac {4 a b \left (a^2-2 b^2\right ) \log (\cos (c+d x))}{d}+\frac {b^2 \left (18 a^2-5 b^2\right ) \tan (c+d x)}{2 d}+\frac {4 a b^3 \tan ^2(c+d x)}{d}+\frac {5 b^4 \tan ^3(c+d x)}{6 d}-\frac {\cos (c+d x) \sin (c+d x) (a+b \tan (c+d x))^4}{2 d} \] Output:

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

Mathematica [A] (verified)

Time = 6.19 (sec) , antiderivative size = 263, normalized size of antiderivative = 1.89 \[ \int \sin ^2(c+d x) (a+b \tan (c+d x))^4 \, dx=\frac {b \left (-\frac {\left (a^4-6 a^2 b^2+b^4\right ) \arctan (\tan (c+d x))}{2 b}+2 a (a-b) (a+b) \cos ^2(c+d x)+\frac {1}{2} \left (4 a^3-8 a b^2+\frac {a^4-12 a^2 b^2+3 b^4}{\sqrt {-b^2}}\right ) \log \left (\sqrt {-b^2}-b \tan (c+d x)\right )+\frac {1}{2} \left (4 a^3-8 a b^2-\frac {a^4-12 a^2 b^2+3 b^4}{\sqrt {-b^2}}\right ) \log \left (\sqrt {-b^2}+b \tan (c+d x)\right )-\frac {\left (a^4-6 a^2 b^2+b^4\right ) \cos (c+d x) \sin (c+d x)}{2 b}+2 b \left (3 a^2-b^2\right ) \tan (c+d x)+2 a b^2 \tan ^2(c+d x)+\frac {1}{3} b^3 \tan ^3(c+d x)\right )}{d} \] Input:

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

Output:

(b*(-1/2*((a^4 - 6*a^2*b^2 + b^4)*ArcTan[Tan[c + d*x]])/b + 2*a*(a - b)*(a 
 + b)*Cos[c + d*x]^2 + ((4*a^3 - 8*a*b^2 + (a^4 - 12*a^2*b^2 + 3*b^4)/Sqrt 
[-b^2])*Log[Sqrt[-b^2] - b*Tan[c + d*x]])/2 + ((4*a^3 - 8*a*b^2 - (a^4 - 1 
2*a^2*b^2 + 3*b^4)/Sqrt[-b^2])*Log[Sqrt[-b^2] + b*Tan[c + d*x]])/2 - ((a^4 
 - 6*a^2*b^2 + b^4)*Cos[c + d*x]*Sin[c + d*x])/(2*b) + 2*b*(3*a^2 - b^2)*T 
an[c + d*x] + 2*a*b^2*Tan[c + d*x]^2 + (b^3*Tan[c + d*x]^3)/3))/d
 

Rubi [A] (verified)

Time = 0.35 (sec) , antiderivative size = 157, normalized size of antiderivative = 1.13, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3042, 3999, 531, 25, 27, 657, 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 ^2(c+d x) (a+b \tan (c+d x))^4 \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3999

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

\(\Big \downarrow \) 531

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 657

\(\displaystyle \frac {b \left (\frac {1}{2} \int \left (18 a^2+16 b \tan (c+d x) a-5 b^2+5 b^2 \tan ^2(c+d x)+\frac {a^4-18 b^2 a^2+8 b \left (a^2-2 b^2\right ) \tan (c+d x) a+5 b^4}{\tan ^2(c+d x) b^2+b^2}\right )d(b \tan (c+d x))-\frac {b \tan (c+d x) (a+b \tan (c+d x))^4}{2 \left (b^2 \tan ^2(c+d x)+b^2\right )}\right )}{d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {b \left (\frac {1}{2} \left (b \left (18 a^2-5 b^2\right ) \tan (c+d x)+4 a \left (a^2-2 b^2\right ) \log \left (b^2 \tan ^2(c+d x)+b^2\right )+\frac {\left (a^4-18 a^2 b^2+5 b^4\right ) \arctan (\tan (c+d x))}{b}+8 a b^2 \tan ^2(c+d x)+\frac {5}{3} b^3 \tan ^3(c+d x)\right )-\frac {b \tan (c+d x) (a+b \tan (c+d x))^4}{2 \left (b^2 \tan ^2(c+d x)+b^2\right )}\right )}{d}\)

Input:

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

Output:

(b*(-1/2*(b*Tan[c + d*x]*(a + b*Tan[c + d*x])^4)/(b^2 + b^2*Tan[c + d*x]^2 
) + (((a^4 - 18*a^2*b^2 + 5*b^4)*ArcTan[Tan[c + d*x]])/b + 4*a*(a^2 - 2*b^ 
2)*Log[b^2 + b^2*Tan[c + d*x]^2] + b*(18*a^2 - 5*b^2)*Tan[c + d*x] + 8*a*b 
^2*Tan[c + d*x]^2 + (5*b^3*Tan[c + d*x]^3)/3)/2))/d
 

Defintions of rubi rules used

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

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, 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 657
Int[(((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))^(n_.))/((a_) + (c_.)*( 
x_)^2), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*((f + g*x)^n/(a + c*x^ 
2)), x], x] /; FreeQ[{a, c, d, e, f, g, m}, x] && IntegersQ[n]
 

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 3999
Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_ 
), x_Symbol] :> Simp[b/f   Subst[Int[x^m*((a + x)^n/(b^2 + x^2)^(m/2 + 1)), 
 x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && IntegerQ[m/2]
 
Maple [A] (verified)

Time = 5.33 (sec) , antiderivative size = 250, normalized size of antiderivative = 1.80

method result size
derivativedivides \(\frac {b^{4} \left (\frac {\sin \left (d x +c \right )^{7}}{3 \cos \left (d x +c \right )^{3}}-\frac {4 \sin \left (d x +c \right )^{7}}{3 \cos \left (d x +c \right )}-\frac {4 \left (\sin \left (d x +c \right )^{5}+\frac {5 \sin \left (d x +c \right )^{3}}{4}+\frac {15 \sin \left (d x +c \right )}{8}\right ) \cos \left (d x +c \right )}{3}+\frac {5 d x}{2}+\frac {5 c}{2}\right )+4 a \,b^{3} \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 )+6 b^{2} a^{2} \left (\frac {\sin \left (d x +c \right )^{5}}{\cos \left (d x +c \right )}+\left (\sin \left (d x +c \right )^{3}+\frac {3 \sin \left (d x +c \right )}{2}\right ) \cos \left (d x +c \right )-\frac {3 d x}{2}-\frac {3 c}{2}\right )+4 a^{3} b \left (-\frac {\sin \left (d x +c \right )^{2}}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )+a^{4} \left (-\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) \(250\)
default \(\frac {b^{4} \left (\frac {\sin \left (d x +c \right )^{7}}{3 \cos \left (d x +c \right )^{3}}-\frac {4 \sin \left (d x +c \right )^{7}}{3 \cos \left (d x +c \right )}-\frac {4 \left (\sin \left (d x +c \right )^{5}+\frac {5 \sin \left (d x +c \right )^{3}}{4}+\frac {15 \sin \left (d x +c \right )}{8}\right ) \cos \left (d x +c \right )}{3}+\frac {5 d x}{2}+\frac {5 c}{2}\right )+4 a \,b^{3} \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 )+6 b^{2} a^{2} \left (\frac {\sin \left (d x +c \right )^{5}}{\cos \left (d x +c \right )}+\left (\sin \left (d x +c \right )^{3}+\frac {3 \sin \left (d x +c \right )}{2}\right ) \cos \left (d x +c \right )-\frac {3 d x}{2}-\frac {3 c}{2}\right )+4 a^{3} b \left (-\frac {\sin \left (d x +c \right )^{2}}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )+a^{4} \left (-\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) \(250\)
risch \(-\frac {16 i b^{3} a c}{d}+\frac {3 i {\mathrm e}^{-2 i \left (d x +c \right )} b^{2} a^{2}}{4 d}+\frac {a^{4} x}{2}-9 a^{2} b^{2} x +\frac {5 b^{4} x}{2}+\frac {{\mathrm e}^{2 i \left (d x +c \right )} a^{3} b}{2 d}-\frac {{\mathrm e}^{2 i \left (d x +c \right )} a \,b^{3}}{2 d}+\frac {8 i b \,a^{3} c}{d}-\frac {i {\mathrm e}^{-2 i \left (d x +c \right )} b^{4}}{8 d}-8 i x a \,b^{3}+\frac {{\mathrm e}^{-2 i \left (d x +c \right )} a^{3} b}{2 d}-\frac {{\mathrm e}^{-2 i \left (d x +c \right )} a \,b^{3}}{2 d}-\frac {i {\mathrm e}^{-2 i \left (d x +c \right )} a^{4}}{8 d}-\frac {3 i {\mathrm e}^{2 i \left (d x +c \right )} b^{2} a^{2}}{4 d}+\frac {i {\mathrm e}^{2 i \left (d x +c \right )} b^{4}}{8 d}+4 i x \,a^{3} b +\frac {i {\mathrm e}^{2 i \left (d x +c \right )} a^{4}}{8 d}-\frac {2 i b^{2} \left (-18 a^{2} {\mathrm e}^{4 i \left (d x +c \right )}+9 b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+12 i a b \,{\mathrm e}^{4 i \left (d x +c \right )}-36 a^{2} {\mathrm e}^{2 i \left (d x +c \right )}+12 b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+12 i a b \,{\mathrm e}^{2 i \left (d x +c \right )}-18 a^{2}+7 b^{2}\right )}{3 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{3}}-\frac {4 b \,a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}+\frac {8 b^{3} a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) \(406\)

Input:

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

Output:

1/d*(b^4*(1/3*sin(d*x+c)^7/cos(d*x+c)^3-4/3*sin(d*x+c)^7/cos(d*x+c)-4/3*(s 
in(d*x+c)^5+5/4*sin(d*x+c)^3+15/8*sin(d*x+c))*cos(d*x+c)+5/2*d*x+5/2*c)+4* 
a*b^3*(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(co 
s(d*x+c)))+6*b^2*a^2*(sin(d*x+c)^5/cos(d*x+c)+(sin(d*x+c)^3+3/2*sin(d*x+c) 
)*cos(d*x+c)-3/2*d*x-3/2*c)+4*a^3*b*(-1/2*sin(d*x+c)^2-ln(cos(d*x+c)))+a^4 
*(-1/2*cos(d*x+c)*sin(d*x+c)+1/2*d*x+1/2*c))
 

Fricas [A] (verification not implemented)

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

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

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [A] (verification not implemented)

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

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

Output:

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

Giac [A] (verification not implemented)

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

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

Output:

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

Mupad [B] (verification not implemented)

Time = 0.90 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.16 \[ \int \sin ^2(c+d x) (a+b \tan (c+d x))^4 \, dx=x\,\left (\frac {a^4}{2}-9\,a^2\,b^2+\frac {5\,b^4}{2}\right )-\frac {\ln \left ({\mathrm {tan}\left (c+d\,x\right )}^2+1\right )\,\left (4\,a\,b^3-2\,a^3\,b\right )}{d}-\frac {{\cos \left (c+d\,x\right )}^2\,\left (\mathrm {tan}\left (c+d\,x\right )\,\left (\frac {a^4}{2}-3\,a^2\,b^2+\frac {b^4}{2}\right )+2\,a\,b^3-2\,a^3\,b\right )}{d}+\frac {b^4\,{\mathrm {tan}\left (c+d\,x\right )}^3}{3\,d}-\frac {\mathrm {tan}\left (c+d\,x\right )\,\left (2\,b^4-6\,a^2\,b^2\right )}{d}+\frac {2\,a\,b^3\,{\mathrm {tan}\left (c+d\,x\right )}^2}{d} \] Input:

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

Output:

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

Reduce [B] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 780, normalized size of antiderivative = 5.61 \[ \int \sin ^2(c+d x) (a+b \tan (c+d x))^4 \, dx =\text {Too large to display} \] Input:

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

Output:

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