Optimal. Leaf size=138 \[ \frac {c 2^{n-\frac {p}{2}+\frac {1}{2}} \cos (e+f x) (a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-1} (g \sec (e+f x))^p (1-\sin (e+f x))^{\frac {1}{2} (-2 n+p+1)} \, _2F_1\left (\frac {1}{2} (2 m-p+1),\frac {1}{2} (-2 n+p+1);\frac {1}{2} (2 m-p+3);\frac {1}{2} (\sin (e+f x)+1)\right )}{f (2 m-p+1)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.46, antiderivative size = 138, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.139, Rules used = {2926, 2853, 2689, 70, 69} \[ \frac {c 2^{n-\frac {p}{2}+\frac {1}{2}} \cos (e+f x) (a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-1} (g \sec (e+f x))^p (1-\sin (e+f x))^{\frac {1}{2} (-2 n+p+1)} \, _2F_1\left (\frac {1}{2} (2 m-p+1),\frac {1}{2} (-2 n+p+1);\frac {1}{2} (2 m-p+3);\frac {1}{2} (\sin (e+f x)+1)\right )}{f (2 m-p+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 69
Rule 70
Rule 2689
Rule 2853
Rule 2926
Rubi steps
\begin {align*} \int (g \sec (e+f x))^p (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n \, dx &=\left ((g \cos (e+f x))^p (g \sec (e+f x))^p\right ) \int (g \cos (e+f x))^{-p} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n \, dx\\ &=\left ((g \cos (e+f x))^{-2 m+p} (g \sec (e+f x))^p (a+a \sin (e+f x))^m (c-c \sin (e+f x))^m\right ) \int (g \cos (e+f x))^{2 m-p} (c-c \sin (e+f x))^{-m+n} \, dx\\ &=\frac {\left (c^2 \cos (e+f x) (g \sec (e+f x))^p (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{m+\frac {1}{2} (-1-2 m+p)} (c+c \sin (e+f x))^{\frac {1}{2} (-1-2 m+p)}\right ) \operatorname {Subst}\left (\int (c-c x)^{-m+n+\frac {1}{2} (-1+2 m-p)} (c+c x)^{\frac {1}{2} (-1+2 m-p)} \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac {\left (2^{-\frac {1}{2}+n-\frac {p}{2}} c^2 \cos (e+f x) (g \sec (e+f x))^p (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-\frac {1}{2}+m+n-\frac {p}{2}+\frac {1}{2} (-1-2 m+p)} \left (\frac {c-c \sin (e+f x)}{c}\right )^{\frac {1}{2}-n+\frac {p}{2}} (c+c \sin (e+f x))^{\frac {1}{2} (-1-2 m+p)}\right ) \operatorname {Subst}\left (\int \left (\frac {1}{2}-\frac {x}{2}\right )^{-m+n+\frac {1}{2} (-1+2 m-p)} (c+c x)^{\frac {1}{2} (-1+2 m-p)} \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac {2^{\frac {1}{2}+n-\frac {p}{2}} c \cos (e+f x) \, _2F_1\left (\frac {1}{2} (1+2 m-p),\frac {1}{2} (1-2 n+p);\frac {1}{2} (3+2 m-p);\frac {1}{2} (1+\sin (e+f x))\right ) (g \sec (e+f x))^p (1-\sin (e+f x))^{\frac {1}{2} (1-2 n+p)} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1+n}}{f (1+2 m-p)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 42.54, size = 139, normalized size = 1.01 \[ \frac {2 \tan \left (\frac {1}{4} (2 e+2 f x-\pi )\right ) (a (\sin (e+f x)+1))^m (c-c \sin (e+f x))^n (g \sec (e+f x))^p \sec ^2\left (\frac {1}{4} (2 e+2 f x-\pi )\right )^{m+n-p} \, _2F_1\left (m+n-p+1,n-\frac {p}{2}+\frac {1}{2};n-\frac {p}{2}+\frac {3}{2};-\tan ^2\left (\frac {1}{4} (2 e+2 f x-\pi )\right )\right )}{f (2 n-p+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.52, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\left (g \sec \left (f x + e\right )\right )^{p} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} {\left (-c \sin \left (f x + e\right ) + c\right )}^{n}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (g \sec \left (f x + e\right )\right )^{p} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} {\left (-c \sin \left (f x + e\right ) + c\right )}^{n}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 10.49, size = 0, normalized size = 0.00 \[ \int \left (g \sec \left (f x +e \right )\right )^{p} \left (a +a \sin \left (f x +e \right )\right )^{m} \left (c -c \sin \left (f x +e \right )\right )^{n}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (g \sec \left (f x + e\right )\right )^{p} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} {\left (-c \sin \left (f x + e\right ) + c\right )}^{n}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int {\left (\frac {g}{\cos \left (e+f\,x\right )}\right )}^p\,{\left (a+a\,\sin \left (e+f\,x\right )\right )}^m\,{\left (c-c\,\sin \left (e+f\,x\right )\right )}^n \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________