Integrand size = 21, antiderivative size = 75 \[ \int \sqrt {a \cos (c+d x)+b \sin (c+d x)} \, dx=\frac {2 E\left (\left .\frac {1}{2} \left (c+d x-\tan ^{-1}(a,b)\right )\right |2\right ) \sqrt {a \cos (c+d x)+b \sin (c+d x)}}{d \sqrt {\frac {a \cos (c+d x)+b \sin (c+d x)}{\sqrt {a^2+b^2}}}} \]
2*(cos(1/2*c+1/2*d*x-1/2*arctan(a,b))^2)^(1/2)/cos(1/2*c+1/2*d*x-1/2*arcta n(a,b))*EllipticE(sin(1/2*c+1/2*d*x-1/2*arctan(a,b)),2^(1/2))*(a*cos(d*x+c )+b*sin(d*x+c))^(1/2)/d/((a*cos(d*x+c)+b*sin(d*x+c))/(a^2+b^2)^(1/2))^(1/2 )
Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.
Time = 0.88 (sec) , antiderivative size = 268, normalized size of antiderivative = 3.57 \[ \int \sqrt {a \cos (c+d x)+b \sin (c+d x)} \, dx=\frac {\cos \left (c+d x-\arctan \left (\frac {b}{a}\right )\right ) \left (-b \left (a^2+b^2\right ) \, _2F_1\left (-\frac {1}{2},-\frac {1}{4};\frac {3}{4};\cos ^2\left (c+d x-\arctan \left (\frac {b}{a}\right )\right )\right ) \sin \left (c+d x-\arctan \left (\frac {b}{a}\right )\right )+\sqrt {\sin ^2\left (c+d x-\arctan \left (\frac {b}{a}\right )\right )} \left (-2 a \left (a^2+b^2\right ) \cos \left (c+d x-\arctan \left (\frac {b}{a}\right )\right )+2 a^2 \sqrt {1+\frac {b^2}{a^2}} \sqrt {a \sqrt {1+\frac {b^2}{a^2}} \cos \left (c+d x-\arctan \left (\frac {b}{a}\right )\right )} \sqrt {a \cos (c+d x)+b \sin (c+d x)}+b \left (a^2+b^2\right ) \sin \left (c+d x-\arctan \left (\frac {b}{a}\right )\right )\right )\right )}{b d \left (a \sqrt {1+\frac {b^2}{a^2}} \cos \left (c+d x-\arctan \left (\frac {b}{a}\right )\right )\right )^{3/2} \sqrt {\sin ^2\left (c+d x-\arctan \left (\frac {b}{a}\right )\right )}} \]
(Cos[c + d*x - ArcTan[b/a]]*(-(b*(a^2 + b^2)*HypergeometricPFQ[{-1/2, -1/4 }, {3/4}, Cos[c + d*x - ArcTan[b/a]]^2]*Sin[c + d*x - ArcTan[b/a]]) + Sqrt [Sin[c + d*x - ArcTan[b/a]]^2]*(-2*a*(a^2 + b^2)*Cos[c + d*x - ArcTan[b/a] ] + 2*a^2*Sqrt[1 + b^2/a^2]*Sqrt[a*Sqrt[1 + b^2/a^2]*Cos[c + d*x - ArcTan[ b/a]]]*Sqrt[a*Cos[c + d*x] + b*Sin[c + d*x]] + b*(a^2 + b^2)*Sin[c + d*x - ArcTan[b/a]])))/(b*d*(a*Sqrt[1 + b^2/a^2]*Cos[c + d*x - ArcTan[b/a]])^(3/ 2)*Sqrt[Sin[c + d*x - ArcTan[b/a]]^2])
Time = 0.27 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3042, 3557, 3042, 3119}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sqrt {a \cos (c+d x)+b \sin (c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sqrt {a \cos (c+d x)+b \sin (c+d x)}dx\) |
\(\Big \downarrow \) 3557 |
\(\displaystyle \frac {\sqrt {a \cos (c+d x)+b \sin (c+d x)} \int \sqrt {\cos \left (c+d x-\tan ^{-1}(a,b)\right )}dx}{\sqrt {\frac {a \cos (c+d x)+b \sin (c+d x)}{\sqrt {a^2+b^2}}}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\sqrt {a \cos (c+d x)+b \sin (c+d x)} \int \sqrt {\sin \left (c+d x-\tan ^{-1}(a,b)+\frac {\pi }{2}\right )}dx}{\sqrt {\frac {a \cos (c+d x)+b \sin (c+d x)}{\sqrt {a^2+b^2}}}}\) |
\(\Big \downarrow \) 3119 |
\(\displaystyle \frac {2 \sqrt {a \cos (c+d x)+b \sin (c+d x)} E\left (\left .\frac {1}{2} \left (c+d x-\tan ^{-1}(a,b)\right )\right |2\right )}{d \sqrt {\frac {a \cos (c+d x)+b \sin (c+d x)}{\sqrt {a^2+b^2}}}}\) |
(2*EllipticE[(c + d*x - ArcTan[a, b])/2, 2]*Sqrt[a*Cos[c + d*x] + b*Sin[c + d*x]])/(d*Sqrt[(a*Cos[c + d*x] + b*Sin[c + d*x])/Sqrt[a^2 + b^2]])
3.3.35.3.1 Defintions of rubi rules used
Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticE[(1/2)* (c - Pi/2 + d*x), 2], x] /; FreeQ[{c, d}, x]
Int[(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x _Symbol] :> Simp[(a*Cos[c + d*x] + b*Sin[c + d*x])^n/((a*Cos[c + d*x] + b*S in[c + d*x])/Sqrt[a^2 + b^2])^n Int[Cos[c + d*x - ArcTan[a, b]]^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && !(GeQ[n, 1] || LeQ[n, -1]) && !(GtQ[a^2 + b^2, 0] || EqQ[a^2 + b^2, 0])
Time = 3.51 (sec) , antiderivative size = 163, normalized size of antiderivative = 2.17
method | result | size |
default | \(-\frac {\sqrt {a^{2}+b^{2}}\, \sqrt {-\sin \left (d x +c -\arctan \left (-a , b\right )\right )+1}\, \sqrt {2 \sin \left (d x +c -\arctan \left (-a , b\right )\right )+2}\, \sqrt {\sin \left (d x +c -\arctan \left (-a , b\right )\right )}\, \left (2 \operatorname {EllipticE}\left (\sqrt {-\sin \left (d x +c -\arctan \left (-a , b\right )\right )+1}, \frac {\sqrt {2}}{2}\right )-\operatorname {EllipticF}\left (\sqrt {-\sin \left (d x +c -\arctan \left (-a , b\right )\right )+1}, \frac {\sqrt {2}}{2}\right )\right )}{\cos \left (d x +c -\arctan \left (-a , b\right )\right ) \sqrt {\sin \left (d x +c -\arctan \left (-a , b\right )\right ) \sqrt {a^{2}+b^{2}}}\, d}\) | \(163\) |
risch | \(\text {Expression too large to display}\) | \(1175\) |
-(a^2+b^2)^(1/2)*(-sin(d*x+c-arctan(-a,b))+1)^(1/2)*(2*sin(d*x+c-arctan(-a ,b))+2)^(1/2)*sin(d*x+c-arctan(-a,b))^(1/2)*(2*EllipticE((-sin(d*x+c-arcta n(-a,b))+1)^(1/2),1/2*2^(1/2))-EllipticF((-sin(d*x+c-arctan(-a,b))+1)^(1/2 ),1/2*2^(1/2)))/cos(d*x+c-arctan(-a,b))/(sin(d*x+c-arctan(-a,b))*(a^2+b^2) ^(1/2))^(1/2)/d
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.09 (sec) , antiderivative size = 163, normalized size of antiderivative = 2.17 \[ \int \sqrt {a \cos (c+d x)+b \sin (c+d x)} \, dx=\frac {i \, \sqrt {2} \sqrt {a - i \, b} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (a^{2} + 2 i \, a b - b^{2}\right )}}{a^{2} + b^{2}}, 0, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (a^{2} + 2 i \, a b - b^{2}\right )}}{a^{2} + b^{2}}, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) - i \, \sqrt {2} \sqrt {a + i \, b} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (a^{2} - 2 i \, a b - b^{2}\right )}}{a^{2} + b^{2}}, 0, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (a^{2} - 2 i \, a b - b^{2}\right )}}{a^{2} + b^{2}}, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right )}{d} \]
(I*sqrt(2)*sqrt(a - I*b)*weierstrassZeta(-4*(a^2 + 2*I*a*b - b^2)/(a^2 + b ^2), 0, weierstrassPInverse(-4*(a^2 + 2*I*a*b - b^2)/(a^2 + b^2), 0, cos(d *x + c) + I*sin(d*x + c))) - I*sqrt(2)*sqrt(a + I*b)*weierstrassZeta(-4*(a ^2 - 2*I*a*b - b^2)/(a^2 + b^2), 0, weierstrassPInverse(-4*(a^2 - 2*I*a*b - b^2)/(a^2 + b^2), 0, cos(d*x + c) - I*sin(d*x + c))))/d
\[ \int \sqrt {a \cos (c+d x)+b \sin (c+d x)} \, dx=\int \sqrt {a \cos {\left (c + d x \right )} + b \sin {\left (c + d x \right )}}\, dx \]
\[ \int \sqrt {a \cos (c+d x)+b \sin (c+d x)} \, dx=\int { \sqrt {a \cos \left (d x + c\right ) + b \sin \left (d x + c\right )} \,d x } \]
\[ \int \sqrt {a \cos (c+d x)+b \sin (c+d x)} \, dx=\int { \sqrt {a \cos \left (d x + c\right ) + b \sin \left (d x + c\right )} \,d x } \]
Timed out. \[ \int \sqrt {a \cos (c+d x)+b \sin (c+d x)} \, dx=\int \sqrt {a\,\cos \left (c+d\,x\right )+b\,\sin \left (c+d\,x\right )} \,d x \]