Integrand size = 19, antiderivative size = 163 \[ \int \cot (c+d x) (a+b \sec (c+d x))^n \, dx=\frac {\operatorname {Hypergeometric2F1}\left (1,1+n,2+n,\frac {a+b \sec (c+d x)}{a}\right ) (a+b \sec (c+d x))^{1+n}}{a d (1+n)}-\frac {\operatorname {Hypergeometric2F1}\left (1,1+n,2+n,\frac {a+b \sec (c+d x)}{a-b}\right ) (a+b \sec (c+d x))^{1+n}}{2 (a-b) d (1+n)}-\frac {\operatorname {Hypergeometric2F1}\left (1,1+n,2+n,\frac {a+b \sec (c+d x)}{a+b}\right ) (a+b \sec (c+d x))^{1+n}}{2 (a+b) d (1+n)} \] Output:
hypergeom([1, 1+n],[2+n],(a+b*sec(d*x+c))/a)*(a+b*sec(d*x+c))^(1+n)/a/d/(1 +n)-1/2*hypergeom([1, 1+n],[2+n],(a+b*sec(d*x+c))/(a-b))*(a+b*sec(d*x+c))^ (1+n)/(a-b)/d/(1+n)-1/2*hypergeom([1, 1+n],[2+n],(a+b*sec(d*x+c))/(a+b))*( a+b*sec(d*x+c))^(1+n)/(a+b)/d/(1+n)
Time = 0.29 (sec) , antiderivative size = 132, normalized size of antiderivative = 0.81 \[ \int \cot (c+d x) (a+b \sec (c+d x))^n \, dx=-\frac {\left (a (a+b) \operatorname {Hypergeometric2F1}\left (1,1+n,2+n,\frac {a+b \sec (c+d x)}{a-b}\right )+(a-b) \left (a \operatorname {Hypergeometric2F1}\left (1,1+n,2+n,\frac {a+b \sec (c+d x)}{a+b}\right )-2 (a+b) \operatorname {Hypergeometric2F1}\left (1,1+n,2+n,1+\frac {b \sec (c+d x)}{a}\right )\right )\right ) (a+b \sec (c+d x))^{1+n}}{2 a (a-b) (a+b) d (1+n)} \] Input:
Integrate[Cot[c + d*x]*(a + b*Sec[c + d*x])^n,x]
Output:
-1/2*((a*(a + b)*Hypergeometric2F1[1, 1 + n, 2 + n, (a + b*Sec[c + d*x])/( a - b)] + (a - b)*(a*Hypergeometric2F1[1, 1 + n, 2 + n, (a + b*Sec[c + d*x ])/(a + b)] - 2*(a + b)*Hypergeometric2F1[1, 1 + n, 2 + n, 1 + (b*Sec[c + d*x])/a]))*(a + b*Sec[c + d*x])^(1 + n))/(a*(a - b)*(a + b)*d*(1 + n))
Time = 0.37 (sec) , antiderivative size = 171, normalized size of antiderivative = 1.05, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.263, Rules used = {3042, 25, 4373, 615, 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 \cot (c+d x) (a+b \sec (c+d x))^n \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\frac {\left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^n}{\cot \left (c+d x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \frac {\left (a+b \csc \left (\frac {1}{2} (2 c+\pi )+d x\right )\right )^n}{\cot \left (\frac {1}{2} (2 c+\pi )+d x\right )}dx\) |
\(\Big \downarrow \) 4373 |
\(\displaystyle -\frac {b^2 \int \frac {\cos (c+d x) (a+b \sec (c+d x))^n}{b \left (b^2-b^2 \sec ^2(c+d x)\right )}d(b \sec (c+d x))}{d}\) |
\(\Big \downarrow \) 615 |
\(\displaystyle -\frac {b^2 \int \left (\frac {\cos (c+d x) (a+b \sec (c+d x))^n}{b^3}-\frac {\sec (c+d x) (a+b \sec (c+d x))^n}{b \left (b^2 \sec ^2(c+d x)-b^2\right )}\right )d(b \sec (c+d x))}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {b^2 \left (\frac {(a+b \sec (c+d x))^{n+1} \operatorname {Hypergeometric2F1}\left (1,n+1,n+2,\frac {a+b \sec (c+d x)}{a-b}\right )}{2 b^2 (n+1) (a-b)}+\frac {(a+b \sec (c+d x))^{n+1} \operatorname {Hypergeometric2F1}\left (1,n+1,n+2,\frac {a+b \sec (c+d x)}{a+b}\right )}{2 b^2 (n+1) (a+b)}-\frac {(a+b \sec (c+d x))^{n+1} \operatorname {Hypergeometric2F1}\left (1,n+1,n+2,\frac {b \sec (c+d x)}{a}+1\right )}{a b^2 (n+1)}\right )}{d}\) |
Input:
Int[Cot[c + d*x]*(a + b*Sec[c + d*x])^n,x]
Output:
-((b^2*((Hypergeometric2F1[1, 1 + n, 2 + n, (a + b*Sec[c + d*x])/(a - b)]* (a + b*Sec[c + d*x])^(1 + n))/(2*(a - b)*b^2*(1 + n)) + (Hypergeometric2F1 [1, 1 + n, 2 + n, (a + b*Sec[c + d*x])/(a + b)]*(a + b*Sec[c + d*x])^(1 + n))/(2*b^2*(a + b)*(1 + n)) - (Hypergeometric2F1[1, 1 + n, 2 + n, 1 + (b*S ec[c + d*x])/a]*(a + b*Sec[c + d*x])^(1 + n))/(a*b^2*(1 + n))))/d)
Int[((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(c + d*x)^n*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && ILtQ[p, 0]
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n _), x_Symbol] :> Simp[-(-1)^((m - 1)/2)/(d*b^(m - 1)) Subst[Int[(b^2 - x^ 2)^((m - 1)/2)*((a + x)^n/x), x], x, b*Csc[c + d*x]], x] /; FreeQ[{a, b, c, d, n}, x] && IntegerQ[(m - 1)/2] && NeQ[a^2 - b^2, 0]
\[\int \cot \left (d x +c \right ) \left (a +b \sec \left (d x +c \right )\right )^{n}d x\]
Input:
int(cot(d*x+c)*(a+b*sec(d*x+c))^n,x)
Output:
int(cot(d*x+c)*(a+b*sec(d*x+c))^n,x)
\[ \int \cot (c+d x) (a+b \sec (c+d x))^n \, dx=\int { {\left (b \sec \left (d x + c\right ) + a\right )}^{n} \cot \left (d x + c\right ) \,d x } \] Input:
integrate(cot(d*x+c)*(a+b*sec(d*x+c))^n,x, algorithm="fricas")
Output:
integral((b*sec(d*x + c) + a)^n*cot(d*x + c), x)
\[ \int \cot (c+d x) (a+b \sec (c+d x))^n \, dx=\int \left (a + b \sec {\left (c + d x \right )}\right )^{n} \cot {\left (c + d x \right )}\, dx \] Input:
integrate(cot(d*x+c)*(a+b*sec(d*x+c))**n,x)
Output:
Integral((a + b*sec(c + d*x))**n*cot(c + d*x), x)
\[ \int \cot (c+d x) (a+b \sec (c+d x))^n \, dx=\int { {\left (b \sec \left (d x + c\right ) + a\right )}^{n} \cot \left (d x + c\right ) \,d x } \] Input:
integrate(cot(d*x+c)*(a+b*sec(d*x+c))^n,x, algorithm="maxima")
Output:
integrate((b*sec(d*x + c) + a)^n*cot(d*x + c), x)
\[ \int \cot (c+d x) (a+b \sec (c+d x))^n \, dx=\int { {\left (b \sec \left (d x + c\right ) + a\right )}^{n} \cot \left (d x + c\right ) \,d x } \] Input:
integrate(cot(d*x+c)*(a+b*sec(d*x+c))^n,x, algorithm="giac")
Output:
integrate((b*sec(d*x + c) + a)^n*cot(d*x + c), x)
Timed out. \[ \int \cot (c+d x) (a+b \sec (c+d x))^n \, dx=\int \mathrm {cot}\left (c+d\,x\right )\,{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^n \,d x \] Input:
int(cot(c + d*x)*(a + b/cos(c + d*x))^n,x)
Output:
int(cot(c + d*x)*(a + b/cos(c + d*x))^n, x)
\[ \int \cot (c+d x) (a+b \sec (c+d x))^n \, dx=\int \left (\sec \left (d x +c \right ) b +a \right )^{n} \cot \left (d x +c \right )d x \] Input:
int(cot(d*x+c)*(a+b*sec(d*x+c))^n,x)
Output:
int((sec(c + d*x)*b + a)**n*cot(c + d*x),x)