Integrand size = 37, antiderivative size = 555 \[ \int \frac {(g+h x)^2 \sqrt {a-a \sin (e+f x)}}{\sqrt {c+c \sin (e+f x)}} \, dx=-\frac {i a (g+h x)^3 \cos (e+f x)}{3 h \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}-\frac {2 i a (g+h x)^2 \arctan \left (e^{i (e+f x)}\right ) \cos (e+f x)}{f \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}+\frac {a (g+h x)^2 \cos (e+f x) \log \left (1+e^{2 i (e+f x)}\right )}{f \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}+\frac {2 i a h (g+h x) \cos (e+f x) \operatorname {PolyLog}\left (2,-i e^{i (e+f x)}\right )}{f^2 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}-\frac {2 i a h (g+h x) \cos (e+f x) \operatorname {PolyLog}\left (2,i e^{i (e+f x)}\right )}{f^2 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}-\frac {i a h (g+h x) \cos (e+f x) \operatorname {PolyLog}\left (2,-e^{2 i (e+f x)}\right )}{f^2 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}-\frac {2 a h^2 \cos (e+f x) \operatorname {PolyLog}\left (3,-i e^{i (e+f x)}\right )}{f^3 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}+\frac {2 a h^2 \cos (e+f x) \operatorname {PolyLog}\left (3,i e^{i (e+f x)}\right )}{f^3 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}+\frac {a h^2 \cos (e+f x) \operatorname {PolyLog}\left (3,-e^{2 i (e+f x)}\right )}{2 f^3 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}} \]
[Out]
Time = 1.06 (sec) , antiderivative size = 555, normalized size of antiderivative = 1.00, number of steps used = 17, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.270, Rules used = {4700, 6873, 12, 6874, 4266, 2611, 2320, 6724, 3800, 2221} \[ \int \frac {(g+h x)^2 \sqrt {a-a \sin (e+f x)}}{\sqrt {c+c \sin (e+f x)}} \, dx=-\frac {2 i a (g+h x)^2 \arctan \left (e^{i (e+f x)}\right ) \cos (e+f x)}{f \sqrt {a-a \sin (e+f x)} \sqrt {c \sin (e+f x)+c}}-\frac {2 a h^2 \operatorname {PolyLog}\left (3,-i e^{i (e+f x)}\right ) \cos (e+f x)}{f^3 \sqrt {a-a \sin (e+f x)} \sqrt {c \sin (e+f x)+c}}+\frac {2 a h^2 \operatorname {PolyLog}\left (3,i e^{i (e+f x)}\right ) \cos (e+f x)}{f^3 \sqrt {a-a \sin (e+f x)} \sqrt {c \sin (e+f x)+c}}+\frac {a h^2 \operatorname {PolyLog}\left (3,-e^{2 i (e+f x)}\right ) \cos (e+f x)}{2 f^3 \sqrt {a-a \sin (e+f x)} \sqrt {c \sin (e+f x)+c}}+\frac {2 i a h (g+h x) \operatorname {PolyLog}\left (2,-i e^{i (e+f x)}\right ) \cos (e+f x)}{f^2 \sqrt {a-a \sin (e+f x)} \sqrt {c \sin (e+f x)+c}}-\frac {2 i a h (g+h x) \operatorname {PolyLog}\left (2,i e^{i (e+f x)}\right ) \cos (e+f x)}{f^2 \sqrt {a-a \sin (e+f x)} \sqrt {c \sin (e+f x)+c}}-\frac {i a h (g+h x) \operatorname {PolyLog}\left (2,-e^{2 i (e+f x)}\right ) \cos (e+f x)}{f^2 \sqrt {a-a \sin (e+f x)} \sqrt {c \sin (e+f x)+c}}-\frac {i a (g+h x)^3 \cos (e+f x)}{3 h \sqrt {a-a \sin (e+f x)} \sqrt {c \sin (e+f x)+c}}+\frac {a (g+h x)^2 \log \left (1+e^{2 i (e+f x)}\right ) \cos (e+f x)}{f \sqrt {a-a \sin (e+f x)} \sqrt {c \sin (e+f x)+c}} \]
[In]
[Out]
Rule 12
Rule 2221
Rule 2320
Rule 2611
Rule 3800
Rule 4266
Rule 4700
Rule 6724
Rule 6873
Rule 6874
Rubi steps \begin{align*} \text {integral}& = \frac {\cos (e+f x) \int (g+h x)^2 \sec (e+f x) (a-a \sin (e+f x)) \, dx}{\sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}} \\ & = \frac {\cos (e+f x) \int a (g+h x)^2 \sec (e+f x) (1-\sin (e+f x)) \, dx}{\sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}} \\ & = \frac {(a \cos (e+f x)) \int (g+h x)^2 \sec (e+f x) (1-\sin (e+f x)) \, dx}{\sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}} \\ & = \frac {(a \cos (e+f x)) \int \left ((g+h x)^2 \sec (e+f x)-(g+h x)^2 \tan (e+f x)\right ) \, dx}{\sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}} \\ & = \frac {(a \cos (e+f x)) \int (g+h x)^2 \sec (e+f x) \, dx}{\sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}-\frac {(a \cos (e+f x)) \int (g+h x)^2 \tan (e+f x) \, dx}{\sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}} \\ & = -\frac {i a (g+h x)^3 \cos (e+f x)}{3 h \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}-\frac {2 i a (g+h x)^2 \arctan \left (e^{i (e+f x)}\right ) \cos (e+f x)}{f \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}+\frac {(2 i a \cos (e+f x)) \int \frac {e^{2 i (e+f x)} (g+h x)^2}{1+e^{2 i (e+f x)}} \, dx}{\sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}-\frac {(2 a h \cos (e+f x)) \int (g+h x) \log \left (1-i e^{i (e+f x)}\right ) \, dx}{f \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}+\frac {(2 a h \cos (e+f x)) \int (g+h x) \log \left (1+i e^{i (e+f x)}\right ) \, dx}{f \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}} \\ & = -\frac {i a (g+h x)^3 \cos (e+f x)}{3 h \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}-\frac {2 i a (g+h x)^2 \arctan \left (e^{i (e+f x)}\right ) \cos (e+f x)}{f \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}+\frac {a (g+h x)^2 \cos (e+f x) \log \left (1+e^{2 i (e+f x)}\right )}{f \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}+\frac {2 i a h (g+h x) \cos (e+f x) \operatorname {PolyLog}\left (2,-i e^{i (e+f x)}\right )}{f^2 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}-\frac {2 i a h (g+h x) \cos (e+f x) \operatorname {PolyLog}\left (2,i e^{i (e+f x)}\right )}{f^2 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}-\frac {(2 a h \cos (e+f x)) \int (g+h x) \log \left (1+e^{2 i (e+f x)}\right ) \, dx}{f \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}-\frac {\left (2 i a h^2 \cos (e+f x)\right ) \int \operatorname {PolyLog}\left (2,-i e^{i (e+f x)}\right ) \, dx}{f^2 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}+\frac {\left (2 i a h^2 \cos (e+f x)\right ) \int \operatorname {PolyLog}\left (2,i e^{i (e+f x)}\right ) \, dx}{f^2 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}} \\ & = -\frac {i a (g+h x)^3 \cos (e+f x)}{3 h \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}-\frac {2 i a (g+h x)^2 \arctan \left (e^{i (e+f x)}\right ) \cos (e+f x)}{f \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}+\frac {a (g+h x)^2 \cos (e+f x) \log \left (1+e^{2 i (e+f x)}\right )}{f \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}+\frac {2 i a h (g+h x) \cos (e+f x) \operatorname {PolyLog}\left (2,-i e^{i (e+f x)}\right )}{f^2 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}-\frac {2 i a h (g+h x) \cos (e+f x) \operatorname {PolyLog}\left (2,i e^{i (e+f x)}\right )}{f^2 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}-\frac {i a h (g+h x) \cos (e+f x) \operatorname {PolyLog}\left (2,-e^{2 i (e+f x)}\right )}{f^2 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}-\frac {\left (2 a h^2 \cos (e+f x)\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(2,-i x)}{x} \, dx,x,e^{i (e+f x)}\right )}{f^3 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}+\frac {\left (2 a h^2 \cos (e+f x)\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(2,i x)}{x} \, dx,x,e^{i (e+f x)}\right )}{f^3 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}+\frac {\left (i a h^2 \cos (e+f x)\right ) \int \operatorname {PolyLog}\left (2,-e^{2 i (e+f x)}\right ) \, dx}{f^2 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}} \\ & = -\frac {i a (g+h x)^3 \cos (e+f x)}{3 h \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}-\frac {2 i a (g+h x)^2 \arctan \left (e^{i (e+f x)}\right ) \cos (e+f x)}{f \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}+\frac {a (g+h x)^2 \cos (e+f x) \log \left (1+e^{2 i (e+f x)}\right )}{f \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}+\frac {2 i a h (g+h x) \cos (e+f x) \operatorname {PolyLog}\left (2,-i e^{i (e+f x)}\right )}{f^2 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}-\frac {2 i a h (g+h x) \cos (e+f x) \operatorname {PolyLog}\left (2,i e^{i (e+f x)}\right )}{f^2 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}-\frac {i a h (g+h x) \cos (e+f x) \operatorname {PolyLog}\left (2,-e^{2 i (e+f x)}\right )}{f^2 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}-\frac {2 a h^2 \cos (e+f x) \operatorname {PolyLog}\left (3,-i e^{i (e+f x)}\right )}{f^3 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}+\frac {2 a h^2 \cos (e+f x) \operatorname {PolyLog}\left (3,i e^{i (e+f x)}\right )}{f^3 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}+\frac {\left (a h^2 \cos (e+f x)\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(2,-x)}{x} \, dx,x,e^{2 i (e+f x)}\right )}{2 f^3 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}} \\ & = -\frac {i a (g+h x)^3 \cos (e+f x)}{3 h \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}-\frac {2 i a (g+h x)^2 \arctan \left (e^{i (e+f x)}\right ) \cos (e+f x)}{f \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}+\frac {a (g+h x)^2 \cos (e+f x) \log \left (1+e^{2 i (e+f x)}\right )}{f \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}+\frac {2 i a h (g+h x) \cos (e+f x) \operatorname {PolyLog}\left (2,-i e^{i (e+f x)}\right )}{f^2 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}-\frac {2 i a h (g+h x) \cos (e+f x) \operatorname {PolyLog}\left (2,i e^{i (e+f x)}\right )}{f^2 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}-\frac {i a h (g+h x) \cos (e+f x) \operatorname {PolyLog}\left (2,-e^{2 i (e+f x)}\right )}{f^2 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}-\frac {2 a h^2 \cos (e+f x) \operatorname {PolyLog}\left (3,-i e^{i (e+f x)}\right )}{f^3 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}+\frac {2 a h^2 \cos (e+f x) \operatorname {PolyLog}\left (3,i e^{i (e+f x)}\right )}{f^3 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}+\frac {a h^2 \cos (e+f x) \operatorname {PolyLog}\left (3,-e^{2 i (e+f x)}\right )}{2 f^3 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}} \\ \end{align*}
Time = 2.50 (sec) , antiderivative size = 194, normalized size of antiderivative = 0.35 \[ \int \frac {(g+h x)^2 \sqrt {a-a \sin (e+f x)}}{\sqrt {c+c \sin (e+f x)}} \, dx=\frac {\sqrt {2} \left (i+e^{i (e+f x)}\right ) \left (f^2 (g+h x)^2 \left (f (g+h x)-6 i h \log \left (1+i e^{-i (e+f x)}\right )\right )+12 f h^2 (g+h x) \operatorname {PolyLog}\left (2,-i e^{-i (e+f x)}\right )-12 i h^3 \operatorname {PolyLog}\left (3,-i e^{-i (e+f x)}\right )\right ) \sqrt {a-a \sin (e+f x)}}{3 \left (-i+e^{i (e+f x)}\right ) \sqrt {-i c e^{-i (e+f x)} \left (i+e^{i (e+f x)}\right )^2} f^3 h} \]
[In]
[Out]
\[\int \frac {\left (h x +g \right )^{2} \sqrt {a -\sin \left (f x +e \right ) a}}{\sqrt {c +c \sin \left (f x +e \right )}}d x\]
[In]
[Out]
Exception generated. \[ \int \frac {(g+h x)^2 \sqrt {a-a \sin (e+f x)}}{\sqrt {c+c \sin (e+f x)}} \, dx=\text {Exception raised: TypeError} \]
[In]
[Out]
\[ \int \frac {(g+h x)^2 \sqrt {a-a \sin (e+f x)}}{\sqrt {c+c \sin (e+f x)}} \, dx=\int \frac {\sqrt {- a \left (\sin {\left (e + f x \right )} - 1\right )} \left (g + h x\right )^{2}}{\sqrt {c \left (\sin {\left (e + f x \right )} + 1\right )}}\, dx \]
[In]
[Out]
\[ \int \frac {(g+h x)^2 \sqrt {a-a \sin (e+f x)}}{\sqrt {c+c \sin (e+f x)}} \, dx=\int { \frac {{\left (h x + g\right )}^{2} \sqrt {-a \sin \left (f x + e\right ) + a}}{\sqrt {c \sin \left (f x + e\right ) + c}} \,d x } \]
[In]
[Out]
\[ \int \frac {(g+h x)^2 \sqrt {a-a \sin (e+f x)}}{\sqrt {c+c \sin (e+f x)}} \, dx=\int { \frac {{\left (h x + g\right )}^{2} \sqrt {-a \sin \left (f x + e\right ) + a}}{\sqrt {c \sin \left (f x + e\right ) + c}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {(g+h x)^2 \sqrt {a-a \sin (e+f x)}}{\sqrt {c+c \sin (e+f x)}} \, dx=\int \frac {{\left (g+h\,x\right )}^2\,\sqrt {a-a\,\sin \left (e+f\,x\right )}}{\sqrt {c+c\,\sin \left (e+f\,x\right )}} \,d x \]
[In]
[Out]