Integrand size = 28, antiderivative size = 144 \[ \int \frac {\cos ^m(c+d x)}{a \sin (c+d x)+b \tan (c+d x)} \, dx=\frac {\cos ^{2+m}(c+d x) \operatorname {Hypergeometric2F1}(1,2+m,3+m,-\cos (c+d x))}{2 (a-b) d (2+m)}-\frac {\cos ^{2+m}(c+d x) \operatorname {Hypergeometric2F1}(1,2+m,3+m,\cos (c+d x))}{2 (a+b) d (2+m)}-\frac {a^2 \cos ^{2+m}(c+d x) \operatorname {Hypergeometric2F1}\left (1,2+m,3+m,-\frac {a \cos (c+d x)}{b}\right )}{b \left (a^2-b^2\right ) d (2+m)} \] Output:
1/2*cos(d*x+c)^(2+m)*hypergeom([1, 2+m],[3+m],-cos(d*x+c))/(a-b)/d/(2+m)-1 /2*cos(d*x+c)^(2+m)*hypergeom([1, 2+m],[3+m],cos(d*x+c))/(a+b)/d/(2+m)-a^2 *cos(d*x+c)^(2+m)*hypergeom([1, 2+m],[3+m],-a*cos(d*x+c)/b)/b/(a^2-b^2)/d/ (2+m)
Time = 0.93 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.74 \[ \int \frac {\cos ^m(c+d x)}{a \sin (c+d x)+b \tan (c+d x)} \, dx=\frac {\cos ^{2+m}(c+d x) \left (b (a+b) \operatorname {Hypergeometric2F1}(1,2+m,3+m,-\cos (c+d x))-(a-b) b \operatorname {Hypergeometric2F1}(1,2+m,3+m,\cos (c+d x))-2 a^2 \operatorname {Hypergeometric2F1}\left (1,2+m,3+m,-\frac {a \cos (c+d x)}{b}\right )\right )}{2 (a-b) b (a+b) d (2+m)} \] Input:
Integrate[Cos[c + d*x]^m/(a*Sin[c + d*x] + b*Tan[c + d*x]),x]
Output:
(Cos[c + d*x]^(2 + m)*(b*(a + b)*Hypergeometric2F1[1, 2 + m, 3 + m, -Cos[c + d*x]] - (a - b)*b*Hypergeometric2F1[1, 2 + m, 3 + m, Cos[c + d*x]] - 2* a^2*Hypergeometric2F1[1, 2 + m, 3 + m, -((a*Cos[c + d*x])/b)]))/(2*(a - b) *b*(a + b)*d*(2 + m))
Time = 0.64 (sec) , antiderivative size = 144, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3042, 4897, 3042, 3316, 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 \frac {\cos ^m(c+d x)}{a \sin (c+d x)+b \tan (c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (c+d x)^m}{a \sin (c+d x)+b \tan (c+d x)}dx\) |
\(\Big \downarrow \) 4897 |
\(\displaystyle \int \frac {\csc (c+d x) \cos ^{m+1}(c+d x)}{a \cos (c+d x)+b}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (-\sin \left (c+d x-\frac {\pi }{2}\right )\right )^{m+1}}{\cos \left (c+d x-\frac {\pi }{2}\right ) \left (b-a \sin \left (c+d x-\frac {\pi }{2}\right )\right )}dx\) |
\(\Big \downarrow \) 3316 |
\(\displaystyle -\frac {a \int \frac {\cos ^{m+1}(c+d x)}{(b+a \cos (c+d x)) \left (a^2-a^2 \cos ^2(c+d x)\right )}d(a \cos (c+d x))}{d}\) |
\(\Big \downarrow \) 615 |
\(\displaystyle -\frac {a \int \left (\frac {\cos ^{m+1}(c+d x)}{2 a (a+b) (a-a \cos (c+d x))}-\frac {\cos ^{m+1}(c+d x)}{2 a (a-b) (\cos (c+d x) a+a)}+\frac {\cos ^{m+1}(c+d x)}{(a-b) (a+b) (b+a \cos (c+d x))}\right )d(a \cos (c+d x))}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {a \left (\frac {a \cos ^{m+2}(c+d x) \operatorname {Hypergeometric2F1}\left (1,m+2,m+3,-\frac {a \cos (c+d x)}{b}\right )}{b (m+2) \left (a^2-b^2\right )}-\frac {\cos ^{m+2}(c+d x) \operatorname {Hypergeometric2F1}(1,m+2,m+3,-\cos (c+d x))}{2 a (m+2) (a-b)}+\frac {\cos ^{m+2}(c+d x) \operatorname {Hypergeometric2F1}(1,m+2,m+3,\cos (c+d x))}{2 a (m+2) (a+b)}\right )}{d}\) |
Input:
Int[Cos[c + d*x]^m/(a*Sin[c + d*x] + b*Tan[c + d*x]),x]
Output:
-((a*(-1/2*(Cos[c + d*x]^(2 + m)*Hypergeometric2F1[1, 2 + m, 3 + m, -Cos[c + d*x]])/(a*(a - b)*(2 + m)) + (Cos[c + d*x]^(2 + m)*Hypergeometric2F1[1, 2 + m, 3 + m, Cos[c + d*x]])/(2*a*(a + b)*(2 + m)) + (a*Cos[c + d*x]^(2 + m)*Hypergeometric2F1[1, 2 + m, 3 + m, -((a*Cos[c + d*x])/b)])/(b*(a^2 - b ^2)*(2 + m))))/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[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_ .)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[1/(b^p* f) Subst[Int[(a + x)^m*(c + (d/b)*x)^n*(b^2 - x^2)^((p - 1)/2), x], x, b* Sin[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IntegerQ[(p - 1) /2] && NeQ[a^2 - b^2, 0]
\[\int \frac {\cos \left (d x +c \right )^{m}}{a \sin \left (d x +c \right )+b \tan \left (d x +c \right )}d x\]
Input:
int(cos(d*x+c)^m/(a*sin(d*x+c)+b*tan(d*x+c)),x)
Output:
int(cos(d*x+c)^m/(a*sin(d*x+c)+b*tan(d*x+c)),x)
\[ \int \frac {\cos ^m(c+d x)}{a \sin (c+d x)+b \tan (c+d x)} \, dx=\int { \frac {\cos \left (d x + c\right )^{m}}{a \sin \left (d x + c\right ) + b \tan \left (d x + c\right )} \,d x } \] Input:
integrate(cos(d*x+c)^m/(a*sin(d*x+c)+b*tan(d*x+c)),x, algorithm="fricas")
Output:
integral(cos(d*x + c)^m/(a*sin(d*x + c) + b*tan(d*x + c)), x)
\[ \int \frac {\cos ^m(c+d x)}{a \sin (c+d x)+b \tan (c+d x)} \, dx=\int \frac {\cos ^{m}{\left (c + d x \right )}}{a \sin {\left (c + d x \right )} + b \tan {\left (c + d x \right )}}\, dx \] Input:
integrate(cos(d*x+c)**m/(a*sin(d*x+c)+b*tan(d*x+c)),x)
Output:
Integral(cos(c + d*x)**m/(a*sin(c + d*x) + b*tan(c + d*x)), x)
\[ \int \frac {\cos ^m(c+d x)}{a \sin (c+d x)+b \tan (c+d x)} \, dx=\int { \frac {\cos \left (d x + c\right )^{m}}{a \sin \left (d x + c\right ) + b \tan \left (d x + c\right )} \,d x } \] Input:
integrate(cos(d*x+c)^m/(a*sin(d*x+c)+b*tan(d*x+c)),x, algorithm="maxima")
Output:
integrate(cos(d*x + c)^m/(a*sin(d*x + c) + b*tan(d*x + c)), x)
\[ \int \frac {\cos ^m(c+d x)}{a \sin (c+d x)+b \tan (c+d x)} \, dx=\int { \frac {\cos \left (d x + c\right )^{m}}{a \sin \left (d x + c\right ) + b \tan \left (d x + c\right )} \,d x } \] Input:
integrate(cos(d*x+c)^m/(a*sin(d*x+c)+b*tan(d*x+c)),x, algorithm="giac")
Output:
integrate(cos(d*x + c)^m/(a*sin(d*x + c) + b*tan(d*x + c)), x)
Timed out. \[ \int \frac {\cos ^m(c+d x)}{a \sin (c+d x)+b \tan (c+d x)} \, dx=\int \frac {\cos \left (c+d\,x\right )\,{\cos \left (c+d\,x\right )}^m}{\sin \left (c+d\,x\right )\,\left (b+a\,\cos \left (c+d\,x\right )\right )} \,d x \] Input:
int(cos(c + d*x)^m/(a*sin(c + d*x) + b*tan(c + d*x)),x)
Output:
int((cos(c + d*x)*cos(c + d*x)^m)/(sin(c + d*x)*(b + a*cos(c + d*x))), x)
\[ \int \frac {\cos ^m(c+d x)}{a \sin (c+d x)+b \tan (c+d x)} \, dx=\int \frac {\cos \left (d x +c \right )^{m}}{\sin \left (d x +c \right ) a +\tan \left (d x +c \right ) b}d x \] Input:
int(cos(d*x+c)^m/(a*sin(d*x+c)+b*tan(d*x+c)),x)
Output:
int(cos(c + d*x)**m/(sin(c + d*x)*a + tan(c + d*x)*b),x)