Integrand size = 21, antiderivative size = 102 \[ \int \cot ^2(c+d x) (a+a \sec (c+d x))^n \, dx=-\frac {2^{-1+n} \operatorname {AppellF1}\left (-\frac {1}{2},-2+n,1,\frac {1}{2},-\frac {a-a \sec (c+d x)}{a+a \sec (c+d x)},\frac {a-a \sec (c+d x)}{a+a \sec (c+d x)}\right ) \cot (c+d x) \left (\frac {1}{1+\sec (c+d x)}\right )^{-1+n} (a+a \sec (c+d x))^n}{d} \] Output:
-2^(-1+n)*AppellF1(-1/2,1,-2+n,1/2,(a-a*sec(d*x+c))/(a+a*sec(d*x+c)),-(a-a *sec(d*x+c))/(a+a*sec(d*x+c)))*cot(d*x+c)*(1/(1+sec(d*x+c)))^(-1+n)*(a+a*s ec(d*x+c))^n/d
Leaf count is larger than twice the leaf count of optimal. \(893\) vs. \(2(102)=204\).
Time = 2.66 (sec) , antiderivative size = 893, normalized size of antiderivative = 8.75 \[ \int \cot ^2(c+d x) (a+a \sec (c+d x))^n \, dx =\text {Too large to display} \] Input:
Integrate[Cot[c + d*x]^2*(a + a*Sec[c + d*x])^n,x]
Output:
((a*(1 + Sec[c + d*x]))^n*(-((2^n*Cot[(c + d*x)/2]*Hypergeometric2F1[-1/2, n, 1/2, Tan[(c + d*x)/2]^2]*(Cos[c + d*x]*Sec[(c + d*x)/2]^2)^n*(Cos[(c + d*x)/2]^2*Sec[c + d*x])^n)/(1 + Sec[c + d*x])^n) + (2^n*Hypergeometric2F1 [1/2, n, 3/2, Tan[(c + d*x)/2]^2]*(Cos[c + d*x]*Sec[(c + d*x)/2]^2)^n*(Cos [(c + d*x)/2]^2*Sec[c + d*x])^n*Tan[(c + d*x)/2])/(1 + Sec[c + d*x])^n - ( 60*AppellF1[1/2, n, 1, 3/2, Tan[(c + d*x)/2]^2, -Tan[(c + d*x)/2]^2]*Cos[( c + d*x)/2]^2*Cos[c + d*x]*Sin[c + d*x]*(3*AppellF1[1/2, n, 1, 3/2, Tan[(c + d*x)/2]^2, -Tan[(c + d*x)/2]^2] - 2*(AppellF1[3/2, n, 2, 5/2, Tan[(c + d*x)/2]^2, -Tan[(c + d*x)/2]^2] - n*AppellF1[3/2, 1 + n, 1, 5/2, Tan[(c + d*x)/2]^2, -Tan[(c + d*x)/2]^2])*Tan[(c + d*x)/2]^2))/(45*AppellF1[1/2, n, 1, 3/2, Tan[(c + d*x)/2]^2, -Tan[(c + d*x)/2]^2]^2*Cos[(c + d*x)/2]^2*(1 + 2*n - 2*n*Cos[c + d*x] + Cos[2*(c + d*x)]) + 6*AppellF1[1/2, n, 1, 3/2, Tan[(c + d*x)/2]^2, -Tan[(c + d*x)/2]^2]*Sin[(c + d*x)/2]^2*(-5*AppellF1[3 /2, n, 2, 5/2, Tan[(c + d*x)/2]^2, -Tan[(c + d*x)/2]^2]*(1 + 2*n - 2*(2 + n)*Cos[c + d*x] + Cos[2*(c + d*x)]) + 5*n*AppellF1[3/2, 1 + n, 1, 5/2, Tan [(c + d*x)/2]^2, -Tan[(c + d*x)/2]^2]*(1 + 2*n - 2*(2 + n)*Cos[c + d*x] + Cos[2*(c + d*x)]) - 48*(2*AppellF1[5/2, n, 3, 7/2, Tan[(c + d*x)/2]^2, -Ta n[(c + d*x)/2]^2] - 2*n*AppellF1[5/2, 1 + n, 2, 7/2, Tan[(c + d*x)/2]^2, - Tan[(c + d*x)/2]^2] + n*(1 + n)*AppellF1[5/2, 2 + n, 1, 7/2, Tan[(c + d*x) /2]^2, -Tan[(c + d*x)/2]^2])*Cot[c + d*x]*Csc[c + d*x]*Sin[(c + d*x)/2]...
Time = 0.26 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {3042, 4377}
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 ^2(c+d x) (a \sec (c+d x)+a)^n \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^n}{\cot \left (c+d x+\frac {\pi }{2}\right )^2}dx\) |
\(\Big \downarrow \) 4377 |
\(\displaystyle -\frac {2^{n-1} \cot (c+d x) \left (\frac {1}{\sec (c+d x)+1}\right )^{n-1} (a \sec (c+d x)+a)^n \operatorname {AppellF1}\left (-\frac {1}{2},n-2,1,\frac {1}{2},-\frac {a-a \sec (c+d x)}{\sec (c+d x) a+a},\frac {a-a \sec (c+d x)}{\sec (c+d x) a+a}\right )}{d}\) |
Input:
Int[Cot[c + d*x]^2*(a + a*Sec[c + d*x])^n,x]
Output:
-((2^(-1 + n)*AppellF1[-1/2, -2 + n, 1, 1/2, -((a - a*Sec[c + d*x])/(a + a *Sec[c + d*x])), (a - a*Sec[c + d*x])/(a + a*Sec[c + d*x])]*Cot[c + d*x]*( (1 + Sec[c + d*x])^(-1))^(-1 + n)*(a + a*Sec[c + d*x])^n)/d)
Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + ( a_))^(n_), x_Symbol] :> Simp[(-2^(m + n + 1))*(e*Cot[c + d*x])^(m + 1)*((a + b*Csc[c + d*x])^n/(d*e*(m + 1)))*(a/(a + b*Csc[c + d*x]))^(m + n + 1)*App ellF1[(m + 1)/2, m + n, 1, (m + 3)/2, -(a - b*Csc[c + d*x])/(a + b*Csc[c + d*x]), (a - b*Csc[c + d*x])/(a + b*Csc[c + d*x])], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && EqQ[a^2 - b^2, 0] && !IntegerQ[n]
\[\int \cot \left (d x +c \right )^{2} \left (a +a \sec \left (d x +c \right )\right )^{n}d x\]
Input:
int(cot(d*x+c)^2*(a+a*sec(d*x+c))^n,x)
Output:
int(cot(d*x+c)^2*(a+a*sec(d*x+c))^n,x)
\[ \int \cot ^2(c+d x) (a+a \sec (c+d x))^n \, dx=\int { {\left (a \sec \left (d x + c\right ) + a\right )}^{n} \cot \left (d x + c\right )^{2} \,d x } \] Input:
integrate(cot(d*x+c)^2*(a+a*sec(d*x+c))^n,x, algorithm="fricas")
Output:
integral((a*sec(d*x + c) + a)^n*cot(d*x + c)^2, x)
\[ \int \cot ^2(c+d x) (a+a \sec (c+d x))^n \, dx=\int \left (a \left (\sec {\left (c + d x \right )} + 1\right )\right )^{n} \cot ^{2}{\left (c + d x \right )}\, dx \] Input:
integrate(cot(d*x+c)**2*(a+a*sec(d*x+c))**n,x)
Output:
Integral((a*(sec(c + d*x) + 1))**n*cot(c + d*x)**2, x)
\[ \int \cot ^2(c+d x) (a+a \sec (c+d x))^n \, dx=\int { {\left (a \sec \left (d x + c\right ) + a\right )}^{n} \cot \left (d x + c\right )^{2} \,d x } \] Input:
integrate(cot(d*x+c)^2*(a+a*sec(d*x+c))^n,x, algorithm="maxima")
Output:
integrate((a*sec(d*x + c) + a)^n*cot(d*x + c)^2, x)
\[ \int \cot ^2(c+d x) (a+a \sec (c+d x))^n \, dx=\int { {\left (a \sec \left (d x + c\right ) + a\right )}^{n} \cot \left (d x + c\right )^{2} \,d x } \] Input:
integrate(cot(d*x+c)^2*(a+a*sec(d*x+c))^n,x, algorithm="giac")
Output:
integrate((a*sec(d*x + c) + a)^n*cot(d*x + c)^2, x)
Timed out. \[ \int \cot ^2(c+d x) (a+a \sec (c+d x))^n \, dx=\int {\mathrm {cot}\left (c+d\,x\right )}^2\,{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^n \,d x \] Input:
int(cot(c + d*x)^2*(a + a/cos(c + d*x))^n,x)
Output:
int(cot(c + d*x)^2*(a + a/cos(c + d*x))^n, x)
\[ \int \cot ^2(c+d x) (a+a \sec (c+d x))^n \, dx=\int \left (\sec \left (d x +c \right ) a +a \right )^{n} \cot \left (d x +c \right )^{2}d x \] Input:
int(cot(d*x+c)^2*(a+a*sec(d*x+c))^n,x)
Output:
int((sec(c + d*x)*a + a)**n*cot(c + d*x)**2,x)