Optimal. Leaf size=157 \[ -\frac {\left (a^2 (p+2)+b^2\right ) \sin (c+d x) (e \cos (c+d x))^{p+1} \, _2F_1\left (\frac {1}{2},\frac {p+1}{2};\frac {p+3}{2};\cos ^2(c+d x)\right )}{d e (p+1) (p+2) \sqrt {\sin ^2(c+d x)}}-\frac {a b (p+3) (e \cos (c+d x))^{p+1}}{d e (p+1) (p+2)}-\frac {b (a+b \sin (c+d x)) (e \cos (c+d x))^{p+1}}{d e (p+2)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.15, antiderivative size = 157, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {2692, 2669, 2643} \[ -\frac {\left (a^2 (p+2)+b^2\right ) \sin (c+d x) (e \cos (c+d x))^{p+1} \, _2F_1\left (\frac {1}{2},\frac {p+1}{2};\frac {p+3}{2};\cos ^2(c+d x)\right )}{d e (p+1) (p+2) \sqrt {\sin ^2(c+d x)}}-\frac {a b (p+3) (e \cos (c+d x))^{p+1}}{d e (p+1) (p+2)}-\frac {b (a+b \sin (c+d x)) (e \cos (c+d x))^{p+1}}{d e (p+2)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2643
Rule 2669
Rule 2692
Rubi steps
\begin {align*} \int (e \cos (c+d x))^p (a+b \sin (c+d x))^2 \, dx &=-\frac {b (e \cos (c+d x))^{1+p} (a+b \sin (c+d x))}{d e (2+p)}+\frac {\int (e \cos (c+d x))^p \left (b^2+a^2 (2+p)+a b (3+p) \sin (c+d x)\right ) \, dx}{2+p}\\ &=-\frac {a b (3+p) (e \cos (c+d x))^{1+p}}{d e (1+p) (2+p)}-\frac {b (e \cos (c+d x))^{1+p} (a+b \sin (c+d x))}{d e (2+p)}+\frac {\left (b^2+a^2 (2+p)\right ) \int (e \cos (c+d x))^p \, dx}{2+p}\\ &=-\frac {a b (3+p) (e \cos (c+d x))^{1+p}}{d e (1+p) (2+p)}-\frac {\left (b^2+a^2 (2+p)\right ) (e \cos (c+d x))^{1+p} \, _2F_1\left (\frac {1}{2},\frac {1+p}{2};\frac {3+p}{2};\cos ^2(c+d x)\right ) \sin (c+d x)}{d e (1+p) (2+p) \sqrt {\sin ^2(c+d x)}}-\frac {b (e \cos (c+d x))^{1+p} (a+b \sin (c+d x))}{d e (2+p)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 1.05, size = 285, normalized size = 1.82 \[ -\frac {(e \cos (c+d x))^p \left (-\frac {1}{2} a^2 (p-1) \sin (2 (c+d x)) \, _2F_1\left (\frac {1}{2},\frac {p+1}{2};\frac {p+3}{2};\cos ^2(c+d x)\right )+a b 2^{-p} \left (1+e^{2 i (c+d x)}\right ) \left (e^{-i (c+d x)}+e^{i (c+d x)}\right )^p \sqrt {\sin ^2(c+d x)} \left ((p+1) e^{i (c+d x)} \, _2F_1\left (1,\frac {p+3}{2};\frac {3-p}{2};-e^{2 i (c+d x)}\right )-(p-1) e^{-i (c+d x)} \, _2F_1\left (1,\frac {p+1}{2};\frac {1-p}{2};-e^{2 i (c+d x)}\right )\right ) \cos ^{-p}(c+d x)-\frac {1}{2} b^2 (p-1) \sin (2 (c+d x)) \, _2F_1\left (-\frac {1}{2},\frac {p+1}{2};\frac {p+3}{2};\cos ^2(c+d x)\right )\right )}{\left (d-d p^2\right ) \sqrt {\sin ^2(c+d x)}} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.63, size = 0, normalized size = 0.00 \[ {\rm integral}\left (-{\left (b^{2} \cos \left (d x + c\right )^{2} - 2 \, a b \sin \left (d x + c\right ) - a^{2} - b^{2}\right )} \left (e \cos \left (d x + c\right )\right )^{p}, 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 (b \sin \left (d x + c\right ) + a\right )}^{2} \left (e \cos \left (d x + c\right )\right )^{p}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 4.43, size = 0, normalized size = 0.00 \[ \int \left (e \cos \left (d x +c \right )\right )^{p} \left (a +b \sin \left (d x +c \right )\right )^{2}\, 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 (b \sin \left (d x + c\right ) + a\right )}^{2} \left (e \cos \left (d x + c\right )\right )^{p}\,{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 (e\,\cos \left (c+d\,x\right )\right )}^p\,{\left (a+b\,\sin \left (c+d\,x\right )\right )}^2 \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (e \cos {\left (c + d x \right )}\right )^{p} \left (a + b \sin {\left (c + d x \right )}\right )^{2}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________