Integrand size = 28, antiderivative size = 38 \[ \int \sqrt {-\sec (e+f x)} \sqrt {a-a \sec (e+f x)} \, dx=\frac {2 \sqrt {a} \text {arcsinh}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a-a \sec (e+f x)}}\right )}{f} \] Output:
2*a^(1/2)*arcsinh(a^(1/2)*tan(f*x+e)/(a-a*sec(f*x+e))^(1/2))/f
Time = 0.14 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.45 \[ \int \sqrt {-\sec (e+f x)} \sqrt {a-a \sec (e+f x)} \, dx=\frac {2 \arcsin \left (\sqrt {-\sec (e+f x)}\right ) \cot \left (\frac {1}{2} (e+f x)\right ) \sqrt {a-a \sec (e+f x)}}{f \sqrt {1+\sec (e+f x)}} \] Input:
Integrate[Sqrt[-Sec[e + f*x]]*Sqrt[a - a*Sec[e + f*x]],x]
Output:
(2*ArcSin[Sqrt[-Sec[e + f*x]]]*Cot[(e + f*x)/2]*Sqrt[a - a*Sec[e + f*x]])/ (f*Sqrt[1 + Sec[e + f*x]])
Time = 0.26 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.107, Rules used = {3042, 4288, 222}
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 {-\sec (e+f x)} \sqrt {a-a \sec (e+f x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sqrt {-\csc \left (e+f x+\frac {\pi }{2}\right )} \sqrt {a-a \csc \left (e+f x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 4288 |
\(\displaystyle \frac {2 \int \frac {1}{\sqrt {\frac {a \tan ^2(e+f x)}{a-a \sec (e+f x)}+1}}d\frac {a \tan (e+f x)}{\sqrt {a-a \sec (e+f x)}}}{f}\) |
\(\Big \downarrow \) 222 |
\(\displaystyle \frac {2 \sqrt {a} \text {arcsinh}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a-a \sec (e+f x)}}\right )}{f}\) |
Input:
Int[Sqrt[-Sec[e + f*x]]*Sqrt[a - a*Sec[e + f*x]],x]
Output:
(2*Sqrt[a]*ArcSinh[(Sqrt[a]*Tan[e + f*x])/Sqrt[a - a*Sec[e + f*x]]])/f
Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSinh[Rt[b, 2]*(x/Sqrt [a])]/Rt[b, 2], x] /; FreeQ[{a, b}, x] && GtQ[a, 0] && PosQ[b]
Int[Sqrt[csc[(e_.) + (f_.)*(x_)]*(d_.)]*Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Simp[-2*(a/(b*f))*Sqrt[a*(d/b)] Subst[Int[1/Sqrt[1 + x^2/a], x], x, b*(Cot[e + f*x]/Sqrt[a + b*Csc[e + f*x]])], x] /; FreeQ[{a , b, d, e, f}, x] && EqQ[a^2 - b^2, 0] && GtQ[a*(d/b), 0]
Leaf count of result is larger than twice the leaf count of optimal. \(110\) vs. \(2(32)=64\).
Time = 2.43 (sec) , antiderivative size = 111, normalized size of antiderivative = 2.92
method | result | size |
default | \(\frac {\left (\operatorname {arctanh}\left (\frac {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}{2 \sqrt {\frac {1}{\cos \left (f x +e \right )+1}}}\right )-\operatorname {arctanh}\left (\frac {-\cot \left (f x +e \right )+\csc \left (f x +e \right )-1}{2 \sqrt {\frac {1}{\cos \left (f x +e \right )+1}}}\right )\right ) \sqrt {-\sec \left (f x +e \right )}\, \sqrt {-a \left (-1+\sec \left (f x +e \right )\right )}\, \cot \left (f x +e \right )}{f \sqrt {\frac {1}{\cos \left (f x +e \right )+1}}}\) | \(111\) |
Input:
int((-sec(f*x+e))^(1/2)*(a-a*sec(f*x+e))^(1/2),x,method=_RETURNVERBOSE)
Output:
1/f*(arctanh(1/2*(-cot(f*x+e)+csc(f*x+e)+1)/(1/(cos(f*x+e)+1))^(1/2))-arct anh(1/2*(-cot(f*x+e)+csc(f*x+e)-1)/(1/(cos(f*x+e)+1))^(1/2)))*(-sec(f*x+e) )^(1/2)*(-a*(-1+sec(f*x+e)))^(1/2)/(1/(cos(f*x+e)+1))^(1/2)*cot(f*x+e)
Leaf count of result is larger than twice the leaf count of optimal. 81 vs. \(2 (32) = 64\).
Time = 0.10 (sec) , antiderivative size = 206, normalized size of antiderivative = 5.42 \[ \int \sqrt {-\sec (e+f x)} \sqrt {a-a \sec (e+f x)} \, dx=\left [\frac {\sqrt {a} \log \left (\frac {4 \, {\left (\cos \left (f x + e\right )^{3} + 3 \, \cos \left (f x + e\right )^{2} + 2 \, \cos \left (f x + e\right )\right )} \sqrt {a} \sqrt {\frac {a \cos \left (f x + e\right ) - a}{\cos \left (f x + e\right )}} \sqrt {-\frac {1}{\cos \left (f x + e\right )}} + {\left (a \cos \left (f x + e\right )^{2} + 8 \, a \cos \left (f x + e\right ) + 8 \, a\right )} \sin \left (f x + e\right )}{\cos \left (f x + e\right )^{2} \sin \left (f x + e\right )}\right )}{2 \, f}, -\frac {\sqrt {-a} \arctan \left (\frac {{\left (\cos \left (f x + e\right )^{2} + 2 \, \cos \left (f x + e\right )\right )} \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right ) - a}{\cos \left (f x + e\right )}} \sqrt {-\frac {1}{\cos \left (f x + e\right )}}}{2 \, a \sin \left (f x + e\right )}\right )}{f}\right ] \] Input:
integrate((-sec(f*x+e))^(1/2)*(a-a*sec(f*x+e))^(1/2),x, algorithm="fricas" )
Output:
[1/2*sqrt(a)*log((4*(cos(f*x + e)^3 + 3*cos(f*x + e)^2 + 2*cos(f*x + e))*s qrt(a)*sqrt((a*cos(f*x + e) - a)/cos(f*x + e))*sqrt(-1/cos(f*x + e)) + (a* cos(f*x + e)^2 + 8*a*cos(f*x + e) + 8*a)*sin(f*x + e))/(cos(f*x + e)^2*sin (f*x + e)))/f, -sqrt(-a)*arctan(1/2*(cos(f*x + e)^2 + 2*cos(f*x + e))*sqrt (-a)*sqrt((a*cos(f*x + e) - a)/cos(f*x + e))*sqrt(-1/cos(f*x + e))/(a*sin( f*x + e)))/f]
\[ \int \sqrt {-\sec (e+f x)} \sqrt {a-a \sec (e+f x)} \, dx=\int \sqrt {- \sec {\left (e + f x \right )}} \sqrt {- a \left (\sec {\left (e + f x \right )} - 1\right )}\, dx \] Input:
integrate((-sec(f*x+e))**(1/2)*(a-a*sec(f*x+e))**(1/2),x)
Output:
Integral(sqrt(-sec(e + f*x))*sqrt(-a*(sec(e + f*x) - 1)), x)
Leaf count of result is larger than twice the leaf count of optimal. 353 vs. \(2 (32) = 64\).
Time = 0.23 (sec) , antiderivative size = 353, normalized size of antiderivative = 9.29 \[ \int \sqrt {-\sec (e+f x)} \sqrt {a-a \sec (e+f x)} \, dx=-\frac {\sqrt {a} {\left (\log \left (2 \, \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (f x + e\right ), \cos \left (f x + e\right )\right )\right )^{2} + 2 \, \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (f x + e\right ), \cos \left (f x + e\right )\right )\right )^{2} + 2 \, \sqrt {2} \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (f x + e\right ), \cos \left (f x + e\right )\right )\right ) + 2 \, \sqrt {2} \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (f x + e\right ), \cos \left (f x + e\right )\right )\right ) + 2\right ) + \log \left (2 \, \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (f x + e\right ), \cos \left (f x + e\right )\right )\right )^{2} + 2 \, \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (f x + e\right ), \cos \left (f x + e\right )\right )\right )^{2} + 2 \, \sqrt {2} \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (f x + e\right ), \cos \left (f x + e\right )\right )\right ) - 2 \, \sqrt {2} \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (f x + e\right ), \cos \left (f x + e\right )\right )\right ) + 2\right ) - \log \left (2 \, \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (f x + e\right ), \cos \left (f x + e\right )\right )\right )^{2} + 2 \, \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (f x + e\right ), \cos \left (f x + e\right )\right )\right )^{2} - 2 \, \sqrt {2} \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (f x + e\right ), \cos \left (f x + e\right )\right )\right ) + 2 \, \sqrt {2} \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (f x + e\right ), \cos \left (f x + e\right )\right )\right ) + 2\right ) - \log \left (2 \, \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (f x + e\right ), \cos \left (f x + e\right )\right )\right )^{2} + 2 \, \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (f x + e\right ), \cos \left (f x + e\right )\right )\right )^{2} - 2 \, \sqrt {2} \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (f x + e\right ), \cos \left (f x + e\right )\right )\right ) - 2 \, \sqrt {2} \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (f x + e\right ), \cos \left (f x + e\right )\right )\right ) + 2\right )\right )}}{2 \, f} \] Input:
integrate((-sec(f*x+e))^(1/2)*(a-a*sec(f*x+e))^(1/2),x, algorithm="maxima" )
Output:
-1/2*sqrt(a)*(log(2*cos(1/2*arctan2(sin(f*x + e), cos(f*x + e)))^2 + 2*sin (1/2*arctan2(sin(f*x + e), cos(f*x + e)))^2 + 2*sqrt(2)*cos(1/2*arctan2(si n(f*x + e), cos(f*x + e))) + 2*sqrt(2)*sin(1/2*arctan2(sin(f*x + e), cos(f *x + e))) + 2) + log(2*cos(1/2*arctan2(sin(f*x + e), cos(f*x + e)))^2 + 2* sin(1/2*arctan2(sin(f*x + e), cos(f*x + e)))^2 + 2*sqrt(2)*cos(1/2*arctan2 (sin(f*x + e), cos(f*x + e))) - 2*sqrt(2)*sin(1/2*arctan2(sin(f*x + e), co s(f*x + e))) + 2) - log(2*cos(1/2*arctan2(sin(f*x + e), cos(f*x + e)))^2 + 2*sin(1/2*arctan2(sin(f*x + e), cos(f*x + e)))^2 - 2*sqrt(2)*cos(1/2*arct an2(sin(f*x + e), cos(f*x + e))) + 2*sqrt(2)*sin(1/2*arctan2(sin(f*x + e), cos(f*x + e))) + 2) - log(2*cos(1/2*arctan2(sin(f*x + e), cos(f*x + e)))^ 2 + 2*sin(1/2*arctan2(sin(f*x + e), cos(f*x + e)))^2 - 2*sqrt(2)*cos(1/2*a rctan2(sin(f*x + e), cos(f*x + e))) - 2*sqrt(2)*sin(1/2*arctan2(sin(f*x + e), cos(f*x + e))) + 2))/f
Leaf count of result is larger than twice the leaf count of optimal. 91 vs. \(2 (32) = 64\).
Time = 0.18 (sec) , antiderivative size = 91, normalized size of antiderivative = 2.39 \[ \int \sqrt {-\sec (e+f x)} \sqrt {a-a \sec (e+f x)} \, dx=\frac {\sqrt {2} {\left (\frac {\sqrt {2} a \arctan \left (\frac {\sqrt {2} \sqrt {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a}}{2 \, \sqrt {-a}}\right ) \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}{\sqrt {-a}} - \frac {\sqrt {2} a \arctan \left (\frac {\sqrt {2} \sqrt {a}}{2 \, \sqrt {-a}}\right ) \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}{\sqrt {-a}}\right )}}{f} \] Input:
integrate((-sec(f*x+e))^(1/2)*(a-a*sec(f*x+e))^(1/2),x, algorithm="giac")
Output:
sqrt(2)*(sqrt(2)*a*arctan(1/2*sqrt(2)*sqrt(a*tan(1/2*f*x + 1/2*e)^2 + a)/s qrt(-a))*sgn(tan(1/2*f*x + 1/2*e))/sqrt(-a) - sqrt(2)*a*arctan(1/2*sqrt(2) *sqrt(a)/sqrt(-a))*sgn(tan(1/2*f*x + 1/2*e))/sqrt(-a))/f
Timed out. \[ \int \sqrt {-\sec (e+f x)} \sqrt {a-a \sec (e+f x)} \, dx=\int \sqrt {a-\frac {a}{\cos \left (e+f\,x\right )}}\,\sqrt {-\frac {1}{\cos \left (e+f\,x\right )}} \,d x \] Input:
int((a - a/cos(e + f*x))^(1/2)*(-1/cos(e + f*x))^(1/2),x)
Output:
int((a - a/cos(e + f*x))^(1/2)*(-1/cos(e + f*x))^(1/2), x)
\[ \int \sqrt {-\sec (e+f x)} \sqrt {a-a \sec (e+f x)} \, dx=\sqrt {a}\, \left (\int \sqrt {\sec \left (f x +e \right )}\, \sqrt {-\sec \left (f x +e \right )+1}d x \right ) i \] Input:
int((-sec(f*x+e))^(1/2)*(a-a*sec(f*x+e))^(1/2),x)
Output:
sqrt(a)*int(sqrt(sec(e + f*x))*sqrt( - sec(e + f*x) + 1),x)*i