Integrand size = 23, antiderivative size = 207 \[ \int \frac {(e \sin (c+d x))^m}{(a+a \sec (c+d x))^2} \, dx=\frac {2 e^3 (e \sin (c+d x))^{-3+m}}{a^2 d (3-m)}-\frac {e^3 \cos (c+d x) \operatorname {Hypergeometric2F1}\left (-\frac {3}{2},\frac {1}{2} (-3+m),\frac {1}{2} (-1+m),\sin ^2(c+d x)\right ) (e \sin (c+d x))^{-3+m}}{a^2 d (3-m) \sqrt {\cos ^2(c+d x)}}-\frac {e^3 \cos (c+d x) \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},\frac {1}{2} (-3+m),\frac {1}{2} (-1+m),\sin ^2(c+d x)\right ) (e \sin (c+d x))^{-3+m}}{a^2 d (3-m) \sqrt {\cos ^2(c+d x)}}-\frac {2 e (e \sin (c+d x))^{-1+m}}{a^2 d (1-m)} \] Output:
2*e^3*(e*sin(d*x+c))^(-3+m)/a^2/d/(3-m)-e^3*cos(d*x+c)*hypergeom([-3/2, -3 /2+1/2*m],[-1/2+1/2*m],sin(d*x+c)^2)*(e*sin(d*x+c))^(-3+m)/a^2/d/(3-m)/(co s(d*x+c)^2)^(1/2)-e^3*cos(d*x+c)*hypergeom([-1/2, -3/2+1/2*m],[-1/2+1/2*m] ,sin(d*x+c)^2)*(e*sin(d*x+c))^(-3+m)/a^2/d/(3-m)/(cos(d*x+c)^2)^(1/2)-2*e* (e*sin(d*x+c))^(-1+m)/a^2/d/(1-m)
Result contains complex when optimal does not.
Time = 3.66 (sec) , antiderivative size = 612, normalized size of antiderivative = 2.96 \[ \int \frac {(e \sin (c+d x))^m}{(a+a \sec (c+d x))^2} \, dx=-\frac {i 2^{4-m} \left (-i e^{-i (c+d x)} \left (-1+e^{2 i (c+d x)}\right )\right )^m \cos ^4\left (\frac {1}{2} (c+d x)\right ) \left (\frac {\left (-1+e^{2 i (c+d x)}\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {2+m}{2},1-\frac {m}{2},e^{2 i (c+d x)}\right )}{4 m}+\frac {e^{i (c+d x)} \left (1-e^{2 i (c+d x)}\right )^{-m} \left (\left (6-5 m+m^2\right ) \operatorname {Hypergeometric2F1}\left (\frac {1-m}{2},2-m,\frac {3-m}{2},e^{2 i (c+d x)}\right )+e^{i (c+d x)} (-1+m) \left (e^{i (c+d x)} (-2+m) \operatorname {Hypergeometric2F1}\left (2-m,\frac {3-m}{2},\frac {5-m}{2},e^{2 i (c+d x)}\right )-2 (-3+m) \operatorname {Hypergeometric2F1}\left (2-m,1-\frac {m}{2},2-\frac {m}{2},e^{2 i (c+d x)}\right )\right )\right )}{(-3+m) (-2+m) (-1+m)}+e^{2 i (c+d x)} \left (1-e^{2 i (c+d x)}\right )^{-m} \left (\frac {4 e^{i (c+d x)} \operatorname {Hypergeometric2F1}\left (\frac {3-m}{2},4-m,\frac {5-m}{2},e^{2 i (c+d x)}\right )}{-3+m}+\frac {4 e^{3 i (c+d x)} \operatorname {Hypergeometric2F1}\left (4-m,\frac {5-m}{2},\frac {7-m}{2},e^{2 i (c+d x)}\right )}{-5+m}-\frac {\operatorname {Hypergeometric2F1}\left (4-m,1-\frac {m}{2},2-\frac {m}{2},e^{2 i (c+d x)}\right )}{-2+m}-\frac {6 e^{2 i (c+d x)} \operatorname {Hypergeometric2F1}\left (4-m,2-\frac {m}{2},3-\frac {m}{2},e^{2 i (c+d x)}\right )}{-4+m}-\frac {e^{4 i (c+d x)} \operatorname {Hypergeometric2F1}\left (4-m,3-\frac {m}{2},4-\frac {m}{2},e^{2 i (c+d x)}\right )}{-6+m}\right )\right ) \sec ^2(c+d x) \sin ^{-m}(c+d x) (e \sin (c+d x))^m}{a^2 d (1+\sec (c+d x))^2} \] Input:
Integrate[(e*Sin[c + d*x])^m/(a + a*Sec[c + d*x])^2,x]
Output:
((-I)*2^(4 - m)*(((-I)*(-1 + E^((2*I)*(c + d*x))))/E^(I*(c + d*x)))^m*Cos[ (c + d*x)/2]^4*(((-1 + E^((2*I)*(c + d*x)))*Hypergeometric2F1[1, (2 + m)/2 , 1 - m/2, E^((2*I)*(c + d*x))])/(4*m) + (E^(I*(c + d*x))*((6 - 5*m + m^2) *Hypergeometric2F1[(1 - m)/2, 2 - m, (3 - m)/2, E^((2*I)*(c + d*x))] + E^( I*(c + d*x))*(-1 + m)*(E^(I*(c + d*x))*(-2 + m)*Hypergeometric2F1[2 - m, ( 3 - m)/2, (5 - m)/2, E^((2*I)*(c + d*x))] - 2*(-3 + m)*Hypergeometric2F1[2 - m, 1 - m/2, 2 - m/2, E^((2*I)*(c + d*x))])))/((1 - E^((2*I)*(c + d*x))) ^m*(-3 + m)*(-2 + m)*(-1 + m)) + (E^((2*I)*(c + d*x))*((4*E^(I*(c + d*x))* Hypergeometric2F1[(3 - m)/2, 4 - m, (5 - m)/2, E^((2*I)*(c + d*x))])/(-3 + m) + (4*E^((3*I)*(c + d*x))*Hypergeometric2F1[4 - m, (5 - m)/2, (7 - m)/2 , E^((2*I)*(c + d*x))])/(-5 + m) - Hypergeometric2F1[4 - m, 1 - m/2, 2 - m /2, E^((2*I)*(c + d*x))]/(-2 + m) - (6*E^((2*I)*(c + d*x))*Hypergeometric2 F1[4 - m, 2 - m/2, 3 - m/2, E^((2*I)*(c + d*x))])/(-4 + m) - (E^((4*I)*(c + d*x))*Hypergeometric2F1[4 - m, 3 - m/2, 4 - m/2, E^((2*I)*(c + d*x))])/( -6 + m)))/(1 - E^((2*I)*(c + d*x)))^m)*Sec[c + d*x]^2*(e*Sin[c + d*x])^m)/ (a^2*d*(1 + Sec[c + d*x])^2*Sin[c + d*x]^m)
Time = 0.89 (sec) , antiderivative size = 216, normalized size of antiderivative = 1.04, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {3042, 4360, 3042, 3354, 3042, 3352, 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 {(e \sin (c+d x))^m}{(a \sec (c+d x)+a)^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (e \cos \left (c+d x-\frac {\pi }{2}\right )\right )^m}{\left (a-a \csc \left (c+d x-\frac {\pi }{2}\right )\right )^2}dx\) |
\(\Big \downarrow \) 4360 |
\(\displaystyle \int \frac {\cos ^2(c+d x) (e \sin (c+d x))^m}{(a (-\cos (c+d x))-a)^2}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin \left (c+d x+\frac {\pi }{2}\right )^2 \left (-e \cos \left (c+d x+\frac {\pi }{2}\right )\right )^m}{\left (a \left (-\sin \left (c+d x+\frac {\pi }{2}\right )\right )-a\right )^2}dx\) |
\(\Big \downarrow \) 3354 |
\(\displaystyle \frac {e^4 \int \cos ^2(c+d x) (a-a \cos (c+d x))^2 (e \sin (c+d x))^{m-4}dx}{a^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {e^4 \int \left (-e \cos \left (c+d x+\frac {\pi }{2}\right )\right )^{m-4} \sin \left (c+d x+\frac {\pi }{2}\right )^2 \left (a-a \sin \left (c+d x+\frac {\pi }{2}\right )\right )^2dx}{a^4}\) |
\(\Big \downarrow \) 3352 |
\(\displaystyle \frac {e^4 \int \left (a^2 \cos ^4(c+d x) (e \sin (c+d x))^{m-4}-2 a^2 \cos ^3(c+d x) (e \sin (c+d x))^{m-4}+a^2 \cos ^2(c+d x) (e \sin (c+d x))^{m-4}\right )dx}{a^4}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {e^4 \left (-\frac {2 a^2 (e \sin (c+d x))^{m-1}}{d e^3 (1-m)}-\frac {a^2 \cos (c+d x) (e \sin (c+d x))^{m-3} \operatorname {Hypergeometric2F1}\left (-\frac {3}{2},\frac {m-3}{2},\frac {m-1}{2},\sin ^2(c+d x)\right )}{d e (3-m) \sqrt {\cos ^2(c+d x)}}-\frac {a^2 \cos (c+d x) (e \sin (c+d x))^{m-3} \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},\frac {m-3}{2},\frac {m-1}{2},\sin ^2(c+d x)\right )}{d e (3-m) \sqrt {\cos ^2(c+d x)}}+\frac {2 a^2 (e \sin (c+d x))^{m-3}}{d e (3-m)}\right )}{a^4}\) |
Input:
Int[(e*Sin[c + d*x])^m/(a + a*Sec[c + d*x])^2,x]
Output:
(e^4*((2*a^2*(e*Sin[c + d*x])^(-3 + m))/(d*e*(3 - m)) - (a^2*Cos[c + d*x]* Hypergeometric2F1[-3/2, (-3 + m)/2, (-1 + m)/2, Sin[c + d*x]^2]*(e*Sin[c + d*x])^(-3 + m))/(d*e*(3 - m)*Sqrt[Cos[c + d*x]^2]) - (a^2*Cos[c + d*x]*Hy pergeometric2F1[-1/2, (-3 + m)/2, (-1 + m)/2, Sin[c + d*x]^2]*(e*Sin[c + d *x])^(-3 + m))/(d*e*(3 - m)*Sqrt[Cos[c + d*x]^2]) - (2*a^2*(e*Sin[c + d*x] )^(-1 + m))/(d*e^3*(1 - m))))/a^4
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n _)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Int[ExpandTrig [(g*cos[e + f*x])^p, (d*sin[e + f*x])^n*(a + b*sin[e + f*x])^m, x], x] /; F reeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && IGtQ[m, 0]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n _)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[(a/g)^(2* m) Int[(g*Cos[e + f*x])^(2*m + p)*((d*Sin[e + f*x])^n/(a - b*Sin[e + f*x] )^m), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && ILtQ[m, 0]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[(g*Cos[e + f*x])^p*((b + a*Sin[e + f*x])^m/Si n[e + f*x]^m), x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]
\[\int \frac {\left (e \sin \left (d x +c \right )\right )^{m}}{\left (a +a \sec \left (d x +c \right )\right )^{2}}d x\]
Input:
int((e*sin(d*x+c))^m/(a+a*sec(d*x+c))^2,x)
Output:
int((e*sin(d*x+c))^m/(a+a*sec(d*x+c))^2,x)
\[ \int \frac {(e \sin (c+d x))^m}{(a+a \sec (c+d x))^2} \, dx=\int { \frac {\left (e \sin \left (d x + c\right )\right )^{m}}{{\left (a \sec \left (d x + c\right ) + a\right )}^{2}} \,d x } \] Input:
integrate((e*sin(d*x+c))^m/(a+a*sec(d*x+c))^2,x, algorithm="fricas")
Output:
integral((e*sin(d*x + c))^m/(a^2*sec(d*x + c)^2 + 2*a^2*sec(d*x + c) + a^2 ), x)
\[ \int \frac {(e \sin (c+d x))^m}{(a+a \sec (c+d x))^2} \, dx=\frac {\int \frac {\left (e \sin {\left (c + d x \right )}\right )^{m}}{\sec ^{2}{\left (c + d x \right )} + 2 \sec {\left (c + d x \right )} + 1}\, dx}{a^{2}} \] Input:
integrate((e*sin(d*x+c))**m/(a+a*sec(d*x+c))**2,x)
Output:
Integral((e*sin(c + d*x))**m/(sec(c + d*x)**2 + 2*sec(c + d*x) + 1), x)/a* *2
\[ \int \frac {(e \sin (c+d x))^m}{(a+a \sec (c+d x))^2} \, dx=\int { \frac {\left (e \sin \left (d x + c\right )\right )^{m}}{{\left (a \sec \left (d x + c\right ) + a\right )}^{2}} \,d x } \] Input:
integrate((e*sin(d*x+c))^m/(a+a*sec(d*x+c))^2,x, algorithm="maxima")
Output:
integrate((e*sin(d*x + c))^m/(a*sec(d*x + c) + a)^2, x)
Exception generated. \[ \int \frac {(e \sin (c+d x))^m}{(a+a \sec (c+d x))^2} \, dx=\text {Exception raised: TypeError} \] Input:
integrate((e*sin(d*x+c))^m/(a+a*sec(d*x+c))^2,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,2,0]%%%}+%%%{-3,[0,1,0,0]%%%} / %%%{4,[0,0,0,2]%%%} Error: B
Timed out. \[ \int \frac {(e \sin (c+d x))^m}{(a+a \sec (c+d x))^2} \, dx=\int \frac {{\cos \left (c+d\,x\right )}^2\,{\left (e\,\sin \left (c+d\,x\right )\right )}^m}{a^2\,{\left (\cos \left (c+d\,x\right )+1\right )}^2} \,d x \] Input:
int((e*sin(c + d*x))^m/(a + a/cos(c + d*x))^2,x)
Output:
int((cos(c + d*x)^2*(e*sin(c + d*x))^m)/(a^2*(cos(c + d*x) + 1)^2), x)
\[ \int \frac {(e \sin (c+d x))^m}{(a+a \sec (c+d x))^2} \, dx=\frac {e^{m} \left (\int \frac {\sin \left (d x +c \right )^{m}}{\sec \left (d x +c \right )^{2}+2 \sec \left (d x +c \right )+1}d x \right )}{a^{2}} \] Input:
int((e*sin(d*x+c))^m/(a+a*sec(d*x+c))^2,x)
Output:
(e**m*int(sin(c + d*x)**m/(sec(c + d*x)**2 + 2*sec(c + d*x) + 1),x))/a**2