Integrand size = 22, antiderivative size = 108 \[ \int \sqrt {a+b \cos (d+e x)+c \sin (d+e x)} \, dx=\frac {2 E\left (\frac {1}{2} \left (d+e x-\tan ^{-1}(b,c)\right )|\frac {2 \sqrt {b^2+c^2}}{a+\sqrt {b^2+c^2}}\right ) \sqrt {a+b \cos (d+e x)+c \sin (d+e x)}}{e \sqrt {\frac {a+b \cos (d+e x)+c \sin (d+e x)}{a+\sqrt {b^2+c^2}}}} \]
[Out]
Time = 0.09 (sec) , antiderivative size = 108, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {3198, 2732} \[ \int \sqrt {a+b \cos (d+e x)+c \sin (d+e x)} \, dx=\frac {2 \sqrt {a+b \cos (d+e x)+c \sin (d+e x)} E\left (\frac {1}{2} \left (d+e x-\tan ^{-1}(b,c)\right )|\frac {2 \sqrt {b^2+c^2}}{a+\sqrt {b^2+c^2}}\right )}{e \sqrt {\frac {a+b \cos (d+e x)+c \sin (d+e x)}{a+\sqrt {b^2+c^2}}}} \]
[In]
[Out]
Rule 2732
Rule 3198
Rubi steps \begin{align*} \text {integral}& = \frac {\sqrt {a+b \cos (d+e x)+c \sin (d+e x)} \int \sqrt {\frac {a}{a+\sqrt {b^2+c^2}}+\frac {\sqrt {b^2+c^2} \cos \left (d+e x-\tan ^{-1}(b,c)\right )}{a+\sqrt {b^2+c^2}}} \, dx}{\sqrt {\frac {a+b \cos (d+e x)+c \sin (d+e x)}{a+\sqrt {b^2+c^2}}}} \\ & = \frac {2 E\left (\frac {1}{2} \left (d+e x-\tan ^{-1}(b,c)\right )|\frac {2 \sqrt {b^2+c^2}}{a+\sqrt {b^2+c^2}}\right ) \sqrt {a+b \cos (d+e x)+c \sin (d+e x)}}{e \sqrt {\frac {a+b \cos (d+e x)+c \sin (d+e x)}{a+\sqrt {b^2+c^2}}}} \\ \end{align*}
Result contains higher order function than in optimal. Order 6 vs. order 4 in optimal.
Time = 6.31 (sec) , antiderivative size = 1408, normalized size of antiderivative = 13.04 \[ \int \sqrt {a+b \cos (d+e x)+c \sin (d+e x)} \, dx=\frac {2 b \sqrt {a+b \cos (d+e x)+c \sin (d+e x)}}{c e}+\frac {2 a \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2},\frac {1}{2},\frac {3}{2},-\frac {a+\sqrt {1+\frac {b^2}{c^2}} c \sin \left (d+e x+\arctan \left (\frac {b}{c}\right )\right )}{\sqrt {1+\frac {b^2}{c^2}} \left (1-\frac {a}{\sqrt {1+\frac {b^2}{c^2}} c}\right ) c},-\frac {a+\sqrt {1+\frac {b^2}{c^2}} c \sin \left (d+e x+\arctan \left (\frac {b}{c}\right )\right )}{\sqrt {1+\frac {b^2}{c^2}} \left (-1-\frac {a}{\sqrt {1+\frac {b^2}{c^2}} c}\right ) c}\right ) \sec \left (d+e x+\arctan \left (\frac {b}{c}\right )\right ) \sqrt {\frac {c \sqrt {\frac {b^2+c^2}{c^2}}-c \sqrt {\frac {b^2+c^2}{c^2}} \sin \left (d+e x+\arctan \left (\frac {b}{c}\right )\right )}{a+c \sqrt {\frac {b^2+c^2}{c^2}}}} \sqrt {a+c \sqrt {\frac {b^2+c^2}{c^2}} \sin \left (d+e x+\arctan \left (\frac {b}{c}\right )\right )} \sqrt {\frac {c \sqrt {\frac {b^2+c^2}{c^2}}+c \sqrt {\frac {b^2+c^2}{c^2}} \sin \left (d+e x+\arctan \left (\frac {b}{c}\right )\right )}{-a+c \sqrt {\frac {b^2+c^2}{c^2}}}}}{\sqrt {1+\frac {b^2}{c^2}} c e}+\frac {b^2 \left (-\frac {c \operatorname {AppellF1}\left (-\frac {1}{2},-\frac {1}{2},-\frac {1}{2},\frac {1}{2},-\frac {a+b \sqrt {1+\frac {c^2}{b^2}} \cos \left (d+e x-\arctan \left (\frac {c}{b}\right )\right )}{b \sqrt {1+\frac {c^2}{b^2}} \left (1-\frac {a}{b \sqrt {1+\frac {c^2}{b^2}}}\right )},-\frac {a+b \sqrt {1+\frac {c^2}{b^2}} \cos \left (d+e x-\arctan \left (\frac {c}{b}\right )\right )}{b \sqrt {1+\frac {c^2}{b^2}} \left (-1-\frac {a}{b \sqrt {1+\frac {c^2}{b^2}}}\right )}\right ) \sin \left (d+e x-\arctan \left (\frac {c}{b}\right )\right )}{b \sqrt {1+\frac {c^2}{b^2}} \sqrt {\frac {b \sqrt {\frac {b^2+c^2}{b^2}}-b \sqrt {\frac {b^2+c^2}{b^2}} \cos \left (d+e x-\arctan \left (\frac {c}{b}\right )\right )}{a+b \sqrt {\frac {b^2+c^2}{b^2}}}} \sqrt {a+b \sqrt {\frac {b^2+c^2}{b^2}} \cos \left (d+e x-\arctan \left (\frac {c}{b}\right )\right )} \sqrt {\frac {b \sqrt {\frac {b^2+c^2}{b^2}}+b \sqrt {\frac {b^2+c^2}{b^2}} \cos \left (d+e x-\arctan \left (\frac {c}{b}\right )\right )}{-a+b \sqrt {\frac {b^2+c^2}{b^2}}}}}-\frac {\frac {2 b \left (a+b \sqrt {1+\frac {c^2}{b^2}} \cos \left (d+e x-\arctan \left (\frac {c}{b}\right )\right )\right )}{b^2+c^2}-\frac {c \sin \left (d+e x-\arctan \left (\frac {c}{b}\right )\right )}{b \sqrt {1+\frac {c^2}{b^2}}}}{\sqrt {a+b \sqrt {1+\frac {c^2}{b^2}} \cos \left (d+e x-\arctan \left (\frac {c}{b}\right )\right )}}\right )}{c e}+\frac {c \left (-\frac {c \operatorname {AppellF1}\left (-\frac {1}{2},-\frac {1}{2},-\frac {1}{2},\frac {1}{2},-\frac {a+b \sqrt {1+\frac {c^2}{b^2}} \cos \left (d+e x-\arctan \left (\frac {c}{b}\right )\right )}{b \sqrt {1+\frac {c^2}{b^2}} \left (1-\frac {a}{b \sqrt {1+\frac {c^2}{b^2}}}\right )},-\frac {a+b \sqrt {1+\frac {c^2}{b^2}} \cos \left (d+e x-\arctan \left (\frac {c}{b}\right )\right )}{b \sqrt {1+\frac {c^2}{b^2}} \left (-1-\frac {a}{b \sqrt {1+\frac {c^2}{b^2}}}\right )}\right ) \sin \left (d+e x-\arctan \left (\frac {c}{b}\right )\right )}{b \sqrt {1+\frac {c^2}{b^2}} \sqrt {\frac {b \sqrt {\frac {b^2+c^2}{b^2}}-b \sqrt {\frac {b^2+c^2}{b^2}} \cos \left (d+e x-\arctan \left (\frac {c}{b}\right )\right )}{a+b \sqrt {\frac {b^2+c^2}{b^2}}}} \sqrt {a+b \sqrt {\frac {b^2+c^2}{b^2}} \cos \left (d+e x-\arctan \left (\frac {c}{b}\right )\right )} \sqrt {\frac {b \sqrt {\frac {b^2+c^2}{b^2}}+b \sqrt {\frac {b^2+c^2}{b^2}} \cos \left (d+e x-\arctan \left (\frac {c}{b}\right )\right )}{-a+b \sqrt {\frac {b^2+c^2}{b^2}}}}}-\frac {\frac {2 b \left (a+b \sqrt {1+\frac {c^2}{b^2}} \cos \left (d+e x-\arctan \left (\frac {c}{b}\right )\right )\right )}{b^2+c^2}-\frac {c \sin \left (d+e x-\arctan \left (\frac {c}{b}\right )\right )}{b \sqrt {1+\frac {c^2}{b^2}}}}{\sqrt {a+b \sqrt {1+\frac {c^2}{b^2}} \cos \left (d+e x-\arctan \left (\frac {c}{b}\right )\right )}}\right )}{e} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(690\) vs. \(2(137)=274\).
Time = 5.31 (sec) , antiderivative size = 691, normalized size of antiderivative = 6.40
method | result | size |
default | \(\frac {2 \left (a +\sqrt {b^{2}+c^{2}}\right ) \sqrt {\frac {\sqrt {b^{2}+c^{2}}\, \sin \left (e x +d -\arctan \left (-b , c\right )\right )+a}{a +\sqrt {b^{2}+c^{2}}}}\, \sqrt {\frac {\left (\sin \left (e x +d -\arctan \left (-b , c\right )\right )+1\right ) \sqrt {b^{2}+c^{2}}}{-a +\sqrt {b^{2}+c^{2}}}}\, \sqrt {-\frac {\left (\sin \left (e x +d -\arctan \left (-b , c\right )\right )-1\right ) \sqrt {b^{2}+c^{2}}}{a +\sqrt {b^{2}+c^{2}}}}\, \sqrt {\sqrt {b^{2}+c^{2}}\, \cos \left (e x +d -\arctan \left (-b , c\right )\right )^{2} \sin \left (e x +d -\arctan \left (-b , c\right )\right )+\cos \left (e x +d -\arctan \left (-b , c\right )\right )^{2} a}\, \left (\sqrt {b^{2}+c^{2}}\, \operatorname {EllipticE}\left (\sqrt {\frac {\sqrt {b^{2}+c^{2}}\, \sin \left (e x +d -\arctan \left (-b , c\right )\right )}{a +\sqrt {b^{2}+c^{2}}}+\frac {a}{a +\sqrt {b^{2}+c^{2}}}}, \sqrt {-\frac {a +\sqrt {b^{2}+c^{2}}}{-a +\sqrt {b^{2}+c^{2}}}}\right )-\sqrt {b^{2}+c^{2}}\, \operatorname {EllipticF}\left (\sqrt {\frac {\sqrt {b^{2}+c^{2}}\, \sin \left (e x +d -\arctan \left (-b , c\right )\right )}{a +\sqrt {b^{2}+c^{2}}}+\frac {a}{a +\sqrt {b^{2}+c^{2}}}}, \sqrt {-\frac {a +\sqrt {b^{2}+c^{2}}}{-a +\sqrt {b^{2}+c^{2}}}}\right )-\operatorname {EllipticE}\left (\sqrt {\frac {\sqrt {b^{2}+c^{2}}\, \sin \left (e x +d -\arctan \left (-b , c\right )\right )}{a +\sqrt {b^{2}+c^{2}}}+\frac {a}{a +\sqrt {b^{2}+c^{2}}}}, \sqrt {-\frac {a +\sqrt {b^{2}+c^{2}}}{-a +\sqrt {b^{2}+c^{2}}}}\right ) a +\operatorname {EllipticF}\left (\sqrt {\frac {\sqrt {b^{2}+c^{2}}\, \sin \left (e x +d -\arctan \left (-b , c\right )\right )}{a +\sqrt {b^{2}+c^{2}}}+\frac {a}{a +\sqrt {b^{2}+c^{2}}}}, \sqrt {-\frac {a +\sqrt {b^{2}+c^{2}}}{-a +\sqrt {b^{2}+c^{2}}}}\right ) a \right )}{\sqrt {b^{2}+c^{2}}\, \sqrt {\left (\sqrt {b^{2}+c^{2}}\, \sin \left (e x +d -\arctan \left (-b , c\right )\right )+a \right ) \cos \left (e x +d -\arctan \left (-b , c\right )\right )^{2}}\, \cos \left (e x +d -\arctan \left (-b , c\right )\right ) \sqrt {\frac {b^{2} \sin \left (e x +d -\arctan \left (-b , c\right )\right )+c^{2} \sin \left (e x +d -\arctan \left (-b , c\right )\right )+a \sqrt {b^{2}+c^{2}}}{\sqrt {b^{2}+c^{2}}}}\, e}\) | \(691\) |
risch | \(\text {Expression too large to display}\) | \(2150\) |
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.12 (sec) , antiderivative size = 1371, normalized size of antiderivative = 12.69 \[ \int \sqrt {a+b \cos (d+e x)+c \sin (d+e x)} \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int \sqrt {a+b \cos (d+e x)+c \sin (d+e x)} \, dx=\int \sqrt {a + b \cos {\left (d + e x \right )} + c \sin {\left (d + e x \right )}}\, dx \]
[In]
[Out]
\[ \int \sqrt {a+b \cos (d+e x)+c \sin (d+e x)} \, dx=\int { \sqrt {b \cos \left (e x + d\right ) + c \sin \left (e x + d\right ) + a} \,d x } \]
[In]
[Out]
\[ \int \sqrt {a+b \cos (d+e x)+c \sin (d+e x)} \, dx=\int { \sqrt {b \cos \left (e x + d\right ) + c \sin \left (e x + d\right ) + a} \,d x } \]
[In]
[Out]
Timed out. \[ \int \sqrt {a+b \cos (d+e x)+c \sin (d+e x)} \, dx=\int \sqrt {a+b\,\cos \left (d+e\,x\right )+c\,\sin \left (d+e\,x\right )} \,d x \]
[In]
[Out]