Optimal. Leaf size=119 \[ -\frac {\sqrt {2} (1-\sin (e+f x)) \cos (e+f x) (c+d \sin (e+f x))^n \left (\frac {c+d \sin (e+f x)}{c+d}\right )^{-n} F_1\left (\frac {3}{2};\frac {1}{2},-n;\frac {5}{2};\frac {1}{2} (1-\sin (e+f x)),\frac {d (1-\sin (e+f x))}{c+d}\right )}{3 a f \sqrt {\sin (e+f x)+1}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.23, antiderivative size = 119, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.121, Rules used = {2914, 2755, 139, 138} \[ -\frac {\sqrt {2} (1-\sin (e+f x)) \cos (e+f x) (c+d \sin (e+f x))^n \left (\frac {c+d \sin (e+f x)}{c+d}\right )^{-n} F_1\left (\frac {3}{2};\frac {1}{2},-n;\frac {5}{2};\frac {1}{2} (1-\sin (e+f x)),\frac {d (1-\sin (e+f x))}{c+d}\right )}{3 a f \sqrt {\sin (e+f x)+1}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 138
Rule 139
Rule 2755
Rule 2914
Rubi steps
\begin {align*} \int \frac {\cos ^2(e+f x) (c+d \sin (e+f x))^n}{a+a \sin (e+f x)} \, dx &=\frac {\int (a-a \sin (e+f x)) (c+d \sin (e+f x))^n \, dx}{a^2}\\ &=\frac {\cos (e+f x) \operatorname {Subst}\left (\int \frac {\sqrt {1-x} (c+d x)^n}{\sqrt {1+x}} \, dx,x,\sin (e+f x)\right )}{a f \sqrt {1-\sin (e+f x)} \sqrt {1+\sin (e+f x)}}\\ &=\frac {\left (\cos (e+f x) (c+d \sin (e+f x))^n \left (-\frac {c+d \sin (e+f x)}{-c-d}\right )^{-n}\right ) \operatorname {Subst}\left (\int \frac {\sqrt {1-x} \left (-\frac {c}{-c-d}-\frac {d x}{-c-d}\right )^n}{\sqrt {1+x}} \, dx,x,\sin (e+f x)\right )}{a f \sqrt {1-\sin (e+f x)} \sqrt {1+\sin (e+f x)}}\\ &=-\frac {\sqrt {2} F_1\left (\frac {3}{2};\frac {1}{2},-n;\frac {5}{2};\frac {1}{2} (1-\sin (e+f x)),\frac {d (1-\sin (e+f x))}{c+d}\right ) \cos (e+f x) (1-\sin (e+f x)) (c+d \sin (e+f x))^n \left (\frac {c+d \sin (e+f x)}{c+d}\right )^{-n}}{3 a f \sqrt {1+\sin (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.01, size = 229, normalized size = 1.92 \[ -\frac {\sec (e+f x) \left (\sin \left (\frac {1}{2} (e+f x)\right )+\cos \left (\frac {1}{2} (e+f x)\right )\right )^2 \sqrt {-\frac {d (\sin (e+f x)-1)}{c+d}} (c+d \sin (e+f x))^{n+1} \left ((n+1) (c+d \sin (e+f x)) F_1\left (n+2;\frac {1}{2},\frac {1}{2};n+3;\frac {c+d \sin (e+f x)}{c-d},\frac {c+d \sin (e+f x)}{c+d}\right )-(n+2) (c+d) F_1\left (n+1;\frac {1}{2},\frac {1}{2};n+2;\frac {c+d \sin (e+f x)}{c-d},\frac {c+d \sin (e+f x)}{c+d}\right )\right )}{a d f (n+1) (n+2) (d-c) \sqrt {\frac {d (\sin (e+f x)+1)}{d-c}}} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.48, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {{\left (d \sin \left (f x + e\right ) + c\right )}^{n} \cos \left (f x + e\right )^{2}}{a \sin \left (f x + e\right ) + a}, 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 \frac {{\left (d \sin \left (f x + e\right ) + c\right )}^{n} \cos \left (f x + e\right )^{2}}{a \sin \left (f x + e\right ) + a}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 1.33, size = 0, normalized size = 0.00 \[ \int \frac {\left (\cos ^{2}\left (f x +e \right )\right ) \left (c +d \sin \left (f x +e \right )\right )^{n}}{a +a \sin \left (f x +e \right )}\, 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 \frac {{\left (d \sin \left (f x + e\right ) + c\right )}^{n} \cos \left (f x + e\right )^{2}}{a \sin \left (f x + e\right ) + a}\,{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 \frac {{\cos \left (e+f\,x\right )}^2\,{\left (c+d\,\sin \left (e+f\,x\right )\right )}^n}{a+a\,\sin \left (e+f\,x\right )} \,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]
________________________________________________________________________________________