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

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 = 19, antiderivative size = 114 \[ \int (a+b \sin (c+d x)) \tan ^5(c+d x) \, dx=-\frac {(8 a+15 b) \log (1-\sin (c+d x))}{16 d}-\frac {(8 a-15 b) \log (1+\sin (c+d x))}{16 d}-\frac {b \sin (c+d x)}{d}+\frac {\sec ^4(c+d x) (a+b \sin (c+d x))}{4 d}-\frac {\sec ^2(c+d x) (8 a+9 b \sin (c+d x))}{8 d} \] Output:

-1/16*(8*a+15*b)*ln(1-sin(d*x+c))/d-1/16*(8*a-15*b)*ln(1+sin(d*x+c))/d-b*s 
in(d*x+c)/d+1/4*sec(d*x+c)^4*(a+b*sin(d*x+c))/d-1/8*sec(d*x+c)^2*(8*a+9*b* 
sin(d*x+c))/d
 

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.24 \[ \int (a+b \sin (c+d x)) \tan ^5(c+d x) \, dx=\frac {15 b \text {arctanh}(\sin (c+d x))}{8 d}-\frac {a \log (\cos (c+d x))}{d}-\frac {a \sec ^2(c+d x)}{d}+\frac {a \sec ^4(c+d x)}{4 d}+\frac {15 b \sec (c+d x) \tan (c+d x)}{8 d}-\frac {15 b \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {5 b \sec (c+d x) \tan ^3(c+d x)}{d}-\frac {b \sin (c+d x) \tan ^4(c+d x)}{d} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.43 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.25, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.316, Rules used = {3042, 3200, 530, 2345, 2341, 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 ^5(c+d x) (a+b \sin (c+d x)) \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3200

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

\(\Big \downarrow \) 530

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

\(\Big \downarrow \) 2345

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

\(\Big \downarrow \) 2341

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

((b^4*(a + b*Sin[c + d*x]))/(4*(b^2 - b^2*Sin[c + d*x]^2)^2) - (-1/2*(15*b 
^5*ArcTanh[Sin[c + d*x]] - 4*a*b^4*Log[b^2 - b^2*Sin[c + d*x]^2] - 8*b^5*S 
in[c + d*x])/b^2 + (b^4*(8*a + 9*b*Sin[c + d*x]))/(2*(b^2 - b^2*Sin[c + d* 
x]^2)))/(4*b^2))/d
 

Defintions of rubi rules used

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

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

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

rule 2345
Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuot 
ient[Pq, a + b*x^2, x], f = Coeff[PolynomialRemainder[Pq, a + b*x^2, x], x, 
 0], g = Coeff[PolynomialRemainder[Pq, a + b*x^2, x], x, 1]}, Simp[(a*g - b 
*f*x)*((a + b*x^2)^(p + 1)/(2*a*b*(p + 1))), x] + Simp[1/(2*a*(p + 1))   In 
t[(a + b*x^2)^(p + 1)*ExpandToSum[2*a*(p + 1)*Q + f*(2*p + 3), x], x], x]] 
/; FreeQ[{a, b}, x] && PolyQ[Pq, x] && LtQ[p, -1]
 

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 = 1.55 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.06

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

Input:

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

Output:

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

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.00 \[ \int (a+b \sin (c+d x)) \tan ^5(c+d x) \, dx=-\frac {{\left (8 \, a - 15 \, b\right )} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) + {\left (8 \, a + 15 \, b\right )} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 16 \, a \cos \left (d x + c\right )^{2} + 2 \, {\left (8 \, b \cos \left (d x + c\right )^{4} + 9 \, b \cos \left (d x + c\right )^{2} - 2 \, b\right )} \sin \left (d x + c\right ) - 4 \, a}{16 \, d \cos \left (d x + c\right )^{4}} \] Input:

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

Output:

-1/16*((8*a - 15*b)*cos(d*x + c)^4*log(sin(d*x + c) + 1) + (8*a + 15*b)*co 
s(d*x + c)^4*log(-sin(d*x + c) + 1) + 16*a*cos(d*x + c)^2 + 2*(8*b*cos(d*x 
 + c)^4 + 9*b*cos(d*x + c)^2 - 2*b)*sin(d*x + c) - 4*a)/(d*cos(d*x + c)^4)
 

Sympy [F]

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

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

Output:

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

Maxima [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 108, normalized size of antiderivative = 0.95 \[ \int (a+b \sin (c+d x)) \tan ^5(c+d x) \, dx=-\frac {{\left (8 \, a - 15 \, b\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + {\left (8 \, a + 15 \, b\right )} \log \left (\sin \left (d x + c\right ) - 1\right ) + 16 \, b \sin \left (d x + c\right ) - \frac {2 \, {\left (9 \, b \sin \left (d x + c\right )^{3} + 8 \, a \sin \left (d x + c\right )^{2} - 7 \, b \sin \left (d x + c\right ) - 6 \, a\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1}}{16 \, d} \] Input:

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

Output:

-1/16*((8*a - 15*b)*log(sin(d*x + c) + 1) + (8*a + 15*b)*log(sin(d*x + c) 
- 1) + 16*b*sin(d*x + c) - 2*(9*b*sin(d*x + c)^3 + 8*a*sin(d*x + c)^2 - 7* 
b*sin(d*x + c) - 6*a)/(sin(d*x + c)^4 - 2*sin(d*x + c)^2 + 1))/d
 

Giac [A] (verification not implemented)

Time = 0.44 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.03 \[ \int (a+b \sin (c+d x)) \tan ^5(c+d x) \, dx=-\frac {{\left (8 \, a - 15 \, b\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{16 \, d} - \frac {{\left (8 \, a + 15 \, b\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{16 \, d} - \frac {b \sin \left (d x + c\right )}{d} + \frac {9 \, b \sin \left (d x + c\right )^{3} + 8 \, a \sin \left (d x + c\right )^{2} - 7 \, b \sin \left (d x + c\right ) - 6 \, a}{8 \, d {\left (\sin \left (d x + c\right ) + 1\right )}^{2} {\left (\sin \left (d x + c\right ) - 1\right )}^{2}} \] Input:

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

Output:

-1/16*(8*a - 15*b)*log(abs(sin(d*x + c) + 1))/d - 1/16*(8*a + 15*b)*log(ab 
s(sin(d*x + c) - 1))/d - b*sin(d*x + c)/d + 1/8*(9*b*sin(d*x + c)^3 + 8*a* 
sin(d*x + c)^2 - 7*b*sin(d*x + c) - 6*a)/(d*(sin(d*x + c) + 1)^2*(sin(d*x 
+ c) - 1)^2)
 

Mupad [B] (verification not implemented)

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

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

Output:

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

Reduce [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.29 \[ \int (a+b \sin (c+d x)) \tan ^5(c+d x) \, dx=\frac {-2 \cos \left (d x +c \right ) \tan \left (d x +c \right )^{3} b +19 \cos \left (d x +c \right ) \tan \left (d x +c \right ) b +12 \,\mathrm {log}\left (\tan \left (d x +c \right )^{2}+1\right ) a -45 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) b +45 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) b +6 \sin \left (d x +c \right ) \tan \left (d x +c \right )^{4} b -13 \sin \left (d x +c \right ) \tan \left (d x +c \right )^{2} b -64 \sin \left (d x +c \right ) b +6 \tan \left (d x +c \right )^{4} a -12 \tan \left (d x +c \right )^{2} a}{24 d} \] Input:

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

Output:

( - 2*cos(c + d*x)*tan(c + d*x)**3*b + 19*cos(c + d*x)*tan(c + d*x)*b + 12 
*log(tan(c + d*x)**2 + 1)*a - 45*log(tan((c + d*x)/2) - 1)*b + 45*log(tan( 
(c + d*x)/2) + 1)*b + 6*sin(c + d*x)*tan(c + d*x)**4*b - 13*sin(c + d*x)*t 
an(c + d*x)**2*b - 64*sin(c + d*x)*b + 6*tan(c + d*x)**4*a - 12*tan(c + d* 
x)**2*a)/(24*d)