Integrand size = 23, antiderivative size = 178 \[ \int \frac {(d \cos (e+f x))^n}{a+a \sec (e+f x)} \, dx=\frac {(d \cos (e+f x))^n \sin (e+f x)}{f (a+a \sec (e+f x))}-\frac {\cos (e+f x) (d \cos (e+f x))^n \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1+n}{2},\frac {3+n}{2},\cos ^2(e+f x)\right ) \sin (e+f x)}{a f \sqrt {\sin ^2(e+f x)}}+\frac {(1+n) \cos ^2(e+f x) (d \cos (e+f x))^n \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2+n}{2},\frac {4+n}{2},\cos ^2(e+f x)\right ) \sin (e+f x)}{a f (2+n) \sqrt {\sin ^2(e+f x)}} \] Output:
(d*cos(f*x+e))^n*sin(f*x+e)/f/(a+a*sec(f*x+e))-cos(f*x+e)*(d*cos(f*x+e))^n *hypergeom([1/2, 1/2+1/2*n],[3/2+1/2*n],cos(f*x+e)^2)*sin(f*x+e)/a/f/(sin( f*x+e)^2)^(1/2)+(1+n)*cos(f*x+e)^2*(d*cos(f*x+e))^n*hypergeom([1/2, 1+1/2* n],[2+1/2*n],cos(f*x+e)^2)*sin(f*x+e)/a/f/(2+n)/(sin(f*x+e)^2)^(1/2)
Time = 0.48 (sec) , antiderivative size = 165, normalized size of antiderivative = 0.93 \[ \int \frac {(d \cos (e+f x))^n}{a+a \sec (e+f x)} \, dx=\frac {\cos (e+f x) (d \cos (e+f x))^n \sin (e+f x) \left (-2 (2+n) \cos ^2\left (\frac {1}{2} (e+f x)\right ) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1+n}{2},\frac {3+n}{2},\cos ^2(e+f x)\right )+2 (1+n) \cos ^2\left (\frac {1}{2} (e+f x)\right ) \cos (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2+n}{2},\frac {4+n}{2},\cos ^2(e+f x)\right )+(2+n) \sqrt {\sin ^2(e+f x)}\right )}{a f (2+n) (1+\cos (e+f x)) \sqrt {\sin ^2(e+f x)}} \] Input:
Integrate[(d*Cos[e + f*x])^n/(a + a*Sec[e + f*x]),x]
Output:
(Cos[e + f*x]*(d*Cos[e + f*x])^n*Sin[e + f*x]*(-2*(2 + n)*Cos[(e + f*x)/2] ^2*Hypergeometric2F1[1/2, (1 + n)/2, (3 + n)/2, Cos[e + f*x]^2] + 2*(1 + n )*Cos[(e + f*x)/2]^2*Cos[e + f*x]*Hypergeometric2F1[1/2, (2 + n)/2, (4 + n )/2, Cos[e + f*x]^2] + (2 + n)*Sqrt[Sin[e + f*x]^2]))/(a*f*(2 + n)*(1 + Co s[e + f*x])*Sqrt[Sin[e + f*x]^2])
Time = 0.89 (sec) , antiderivative size = 207, normalized size of antiderivative = 1.16, number of steps used = 10, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.435, Rules used = {3042, 4752, 3042, 4307, 3042, 4274, 3042, 4259, 3042, 3122}
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 \frac {(d \cos (e+f x))^n}{a \sec (e+f x)+a} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (d \sin \left (e+f x+\frac {\pi }{2}\right )\right )^n}{a \csc \left (e+f x+\frac {\pi }{2}\right )+a}dx\) |
\(\Big \downarrow \) 4752 |
\(\displaystyle (d \cos (e+f x))^n (d \sec (e+f x))^n \int \frac {(d \sec (e+f x))^{-n}}{\sec (e+f x) a+a}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (d \cos (e+f x))^n (d \sec (e+f x))^n \int \frac {\left (d \csc \left (e+f x+\frac {\pi }{2}\right )\right )^{-n}}{\csc \left (e+f x+\frac {\pi }{2}\right ) a+a}dx\) |
\(\Big \downarrow \) 4307 |
\(\displaystyle (d \cos (e+f x))^n (d \sec (e+f x))^n \left (\frac {d \tan (e+f x) (d \sec (e+f x))^{-n-1}}{f (a \sec (e+f x)+a)}-\frac {d (n+1) \int (d \sec (e+f x))^{-n-1} (a-a \sec (e+f x))dx}{a^2}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (d \cos (e+f x))^n (d \sec (e+f x))^n \left (\frac {d \tan (e+f x) (d \sec (e+f x))^{-n-1}}{f (a \sec (e+f x)+a)}-\frac {d (n+1) \int \left (d \csc \left (e+f x+\frac {\pi }{2}\right )\right )^{-n-1} \left (a-a \csc \left (e+f x+\frac {\pi }{2}\right )\right )dx}{a^2}\right )\) |
\(\Big \downarrow \) 4274 |
\(\displaystyle (d \cos (e+f x))^n (d \sec (e+f x))^n \left (\frac {d \tan (e+f x) (d \sec (e+f x))^{-n-1}}{f (a \sec (e+f x)+a)}-\frac {d (n+1) \left (a \int (d \sec (e+f x))^{-n-1}dx-\frac {a \int (d \sec (e+f x))^{-n}dx}{d}\right )}{a^2}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (d \cos (e+f x))^n (d \sec (e+f x))^n \left (\frac {d \tan (e+f x) (d \sec (e+f x))^{-n-1}}{f (a \sec (e+f x)+a)}-\frac {d (n+1) \left (a \int \left (d \csc \left (e+f x+\frac {\pi }{2}\right )\right )^{-n-1}dx-\frac {a \int \left (d \csc \left (e+f x+\frac {\pi }{2}\right )\right )^{-n}dx}{d}\right )}{a^2}\right )\) |
\(\Big \downarrow \) 4259 |
\(\displaystyle (d \cos (e+f x))^n (d \sec (e+f x))^n \left (\frac {d \tan (e+f x) (d \sec (e+f x))^{-n-1}}{f (a \sec (e+f x)+a)}-\frac {d (n+1) \left (a \left (\frac {\cos (e+f x)}{d}\right )^{-n} (d \sec (e+f x))^{-n} \int \left (\frac {\cos (e+f x)}{d}\right )^{n+1}dx-\frac {a \left (\frac {\cos (e+f x)}{d}\right )^{-n} (d \sec (e+f x))^{-n} \int \left (\frac {\cos (e+f x)}{d}\right )^ndx}{d}\right )}{a^2}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (d \cos (e+f x))^n (d \sec (e+f x))^n \left (\frac {d \tan (e+f x) (d \sec (e+f x))^{-n-1}}{f (a \sec (e+f x)+a)}-\frac {d (n+1) \left (a \left (\frac {\cos (e+f x)}{d}\right )^{-n} (d \sec (e+f x))^{-n} \int \left (\frac {\sin \left (e+f x+\frac {\pi }{2}\right )}{d}\right )^{n+1}dx-\frac {a \left (\frac {\cos (e+f x)}{d}\right )^{-n} (d \sec (e+f x))^{-n} \int \left (\frac {\sin \left (e+f x+\frac {\pi }{2}\right )}{d}\right )^ndx}{d}\right )}{a^2}\right )\) |
\(\Big \downarrow \) 3122 |
\(\displaystyle (d \cos (e+f x))^n (d \sec (e+f x))^n \left (\frac {d \tan (e+f x) (d \sec (e+f x))^{-n-1}}{f (a \sec (e+f x)+a)}-\frac {d (n+1) \left (\frac {a \sin (e+f x) (d \sec (e+f x))^{-n-1} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {n+1}{2},\frac {n+3}{2},\cos ^2(e+f x)\right )}{f (n+1) \sqrt {\sin ^2(e+f x)}}-\frac {a d \sin (e+f x) (d \sec (e+f x))^{-n-2} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {n+2}{2},\frac {n+4}{2},\cos ^2(e+f x)\right )}{f (n+2) \sqrt {\sin ^2(e+f x)}}\right )}{a^2}\right )\) |
Input:
Int[(d*Cos[e + f*x])^n/(a + a*Sec[e + f*x]),x]
Output:
(d*Cos[e + f*x])^n*(d*Sec[e + f*x])^n*(-((d*(1 + n)*(-((a*d*Hypergeometric 2F1[1/2, (2 + n)/2, (4 + n)/2, Cos[e + f*x]^2]*(d*Sec[e + f*x])^(-2 - n)*S in[e + f*x])/(f*(2 + n)*Sqrt[Sin[e + f*x]^2])) + (a*Hypergeometric2F1[1/2, (1 + n)/2, (3 + n)/2, Cos[e + f*x]^2]*(d*Sec[e + f*x])^(-1 - n)*Sin[e + f *x])/(f*(1 + n)*Sqrt[Sin[e + f*x]^2])))/a^2) + (d*(d*Sec[e + f*x])^(-1 - n )*Tan[e + f*x])/(f*(a + a*Sec[e + f*x])))
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[Cos[c + d*x]*(( b*Sin[c + d*x])^(n + 1)/(b*d*(n + 1)*Sqrt[Cos[c + d*x]^2]))*Hypergeometric2 F1[1/2, (n + 1)/2, (n + 3)/2, Sin[c + d*x]^2], x] /; FreeQ[{b, c, d, n}, x] && !IntegerQ[2*n]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(b*Csc[c + d*x] )^(n - 1)*((Sin[c + d*x]/b)^(n - 1) Int[1/(Sin[c + d*x]/b)^n, x]), x] /; FreeQ[{b, c, d, n}, x] && !IntegerQ[n]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[a Int[(d*Csc[e + f*x])^n, x], x] + Simp[b/d In t[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)/(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_)), x_Symbol] :> Simp[(-b)*d*Cot[e + f*x]*((d*Csc[e + f*x])^(n - 1)/(a*f* (a + b*Csc[e + f*x]))), x] + Simp[d*((n - 1)/(a*b)) Int[(d*Csc[e + f*x])^ (n - 1)*(a - b*Csc[e + f*x]), x], x] /; FreeQ[{a, b, d, e, f, n}, x] && EqQ [a^2 - b^2, 0]
Int[(u_)*((c_.)*sin[(a_.) + (b_.)*(x_)])^(m_.), x_Symbol] :> Simp[(c*Csc[a + b*x])^m*(c*Sin[a + b*x])^m Int[ActivateTrig[u]/(c*Csc[a + b*x])^m, x], x] /; FreeQ[{a, b, c, m}, x] && !IntegerQ[m] && KnownSecantIntegrandQ[u, x ]
\[\int \frac {\left (d \cos \left (f x +e \right )\right )^{n}}{a +a \sec \left (f x +e \right )}d x\]
Input:
int((d*cos(f*x+e))^n/(a+a*sec(f*x+e)),x)
Output:
int((d*cos(f*x+e))^n/(a+a*sec(f*x+e)),x)
\[ \int \frac {(d \cos (e+f x))^n}{a+a \sec (e+f x)} \, dx=\int { \frac {\left (d \cos \left (f x + e\right )\right )^{n}}{a \sec \left (f x + e\right ) + a} \,d x } \] Input:
integrate((d*cos(f*x+e))^n/(a+a*sec(f*x+e)),x, algorithm="fricas")
Output:
integral((d*cos(f*x + e))^n/(a*sec(f*x + e) + a), x)
\[ \int \frac {(d \cos (e+f x))^n}{a+a \sec (e+f x)} \, dx=\frac {\int \frac {\left (d \cos {\left (e + f x \right )}\right )^{n}}{\sec {\left (e + f x \right )} + 1}\, dx}{a} \] Input:
integrate((d*cos(f*x+e))**n/(a+a*sec(f*x+e)),x)
Output:
Integral((d*cos(e + f*x))**n/(sec(e + f*x) + 1), x)/a
\[ \int \frac {(d \cos (e+f x))^n}{a+a \sec (e+f x)} \, dx=\int { \frac {\left (d \cos \left (f x + e\right )\right )^{n}}{a \sec \left (f x + e\right ) + a} \,d x } \] Input:
integrate((d*cos(f*x+e))^n/(a+a*sec(f*x+e)),x, algorithm="maxima")
Output:
integrate((d*cos(f*x + e))^n/(a*sec(f*x + e) + a), x)
Exception generated. \[ \int \frac {(d \cos (e+f x))^n}{a+a \sec (e+f x)} \, dx=\text {Exception raised: TypeError} \] Input:
integrate((d*cos(f*x+e))^n/(a+a*sec(f*x+e)),x, algorithm="giac")
Output:
Exception raised: TypeError >> an error occurred running a Giac command:IN PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Unable to divide, perhaps due to ro unding error%%%{-1,[0,1,0]%%%} / %%%{2,[0,0,1]%%%} Error: Bad Argument Val ue
Timed out. \[ \int \frac {(d \cos (e+f x))^n}{a+a \sec (e+f x)} \, dx=\int \frac {{\left (d\,\cos \left (e+f\,x\right )\right )}^n}{a+\frac {a}{\cos \left (e+f\,x\right )}} \,d x \] Input:
int((d*cos(e + f*x))^n/(a + a/cos(e + f*x)),x)
Output:
int((d*cos(e + f*x))^n/(a + a/cos(e + f*x)), x)
\[ \int \frac {(d \cos (e+f x))^n}{a+a \sec (e+f x)} \, dx=\frac {d^{n} \left (\int \frac {\cos \left (f x +e \right )^{n}}{\sec \left (f x +e \right )+1}d x \right )}{a} \] Input:
int((d*cos(f*x+e))^n/(a+a*sec(f*x+e)),x)
Output:
(d**n*int(cos(e + f*x)**n/(sec(e + f*x) + 1),x))/a