Integrand size = 38, antiderivative size = 46 \[ \int \frac {\sec ^2(e+f x)}{\sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}} \, dx=\frac {\log (\tan (e+f x)) \tan (e+f x)}{f \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}} \] Output:
ln(tan(f*x+e))*tan(f*x+e)/f/(a+a*sec(f*x+e))^(1/2)/(c-c*sec(f*x+e))^(1/2)
Result contains complex when optimal does not.
Time = 1.66 (sec) , antiderivative size = 94, normalized size of antiderivative = 2.04 \[ \int \frac {\sec ^2(e+f x)}{\sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}} \, dx=\frac {4 i \left (-1+e^{i (e+f x)}\right ) \text {arctanh}\left (e^{2 i (e+f x)}\right ) \cos ^2\left (\frac {1}{2} (e+f x)\right ) \sec (e+f x)}{\left (1+e^{i (e+f x)}\right ) f \sqrt {a (1+\sec (e+f x))} \sqrt {c-c \sec (e+f x)}} \] Input:
Integrate[Sec[e + f*x]^2/(Sqrt[a + a*Sec[e + f*x]]*Sqrt[c - c*Sec[e + f*x] ]),x]
Output:
((4*I)*(-1 + E^(I*(e + f*x)))*ArcTanh[E^((2*I)*(e + f*x))]*Cos[(e + f*x)/2 ]^2*Sec[e + f*x])/((1 + E^(I*(e + f*x)))*f*Sqrt[a*(1 + Sec[e + f*x])]*Sqrt [c - c*Sec[e + f*x]])
Time = 0.47 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {3042, 4451, 25, 3042, 3100, 14}
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 \frac {\sec ^2(e+f x)}{\sqrt {a \sec (e+f x)+a} \sqrt {c-c \sec (e+f x)}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\csc \left (e+f x+\frac {\pi }{2}\right )^2}{\sqrt {a \csc \left (e+f x+\frac {\pi }{2}\right )+a} \sqrt {c-c \csc \left (e+f x+\frac {\pi }{2}\right )}}dx\) |
\(\Big \downarrow \) 4451 |
\(\displaystyle -\frac {\tan (e+f x) \int -\csc (e+f x) \sec (e+f x)dx}{\sqrt {a \sec (e+f x)+a} \sqrt {c-c \sec (e+f x)}}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\tan (e+f x) \int \csc (e+f x) \sec (e+f x)dx}{\sqrt {a \sec (e+f x)+a} \sqrt {c-c \sec (e+f x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\tan (e+f x) \int \csc (e+f x) \sec (e+f x)dx}{\sqrt {a \sec (e+f x)+a} \sqrt {c-c \sec (e+f x)}}\) |
\(\Big \downarrow \) 3100 |
\(\displaystyle \frac {\tan (e+f x) \int \cot (e+f x)d\tan (e+f x)}{f \sqrt {a \sec (e+f x)+a} \sqrt {c-c \sec (e+f x)}}\) |
\(\Big \downarrow \) 14 |
\(\displaystyle \frac {\tan (e+f x) \log (\tan (e+f x))}{f \sqrt {a \sec (e+f x)+a} \sqrt {c-c \sec (e+f x)}}\) |
Input:
Int[Sec[e + f*x]^2/(Sqrt[a + a*Sec[e + f*x]]*Sqrt[c - c*Sec[e + f*x]]),x]
Output:
(Log[Tan[e + f*x]]*Tan[e + f*x])/(f*Sqrt[a + a*Sec[e + f*x]]*Sqrt[c - c*Se c[e + f*x]])
Int[csc[(e_.) + (f_.)*(x_)]^(m_.)*sec[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Simp[1/f Subst[Int[(1 + x^2)^((m + n)/2 - 1)/x^m, x], x, Tan[e + f*x]] , x] /; FreeQ[{e, f}, x] && IntegersQ[m, n, (m + n)/2]
Int[(csc[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(m_), x_Symbol] :> Simp[( (-a)*c)^(m + 1/2)*(Cot[e + f*x]/(Sqrt[a + b*Csc[e + f*x]]*Sqrt[c + d*Csc[e + f*x]])) Int[(g*Csc[e + f*x])^p*Cot[e + f*x]^(2*m), x], x] /; FreeQ[{a, b, c, d, e, f, g, p}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && Integ erQ[m + 1/2]
Result contains complex when optimal does not.
Time = 2.50 (sec) , antiderivative size = 228, normalized size of antiderivative = 4.96
method | result | size |
risch | \(-\frac {i \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) \left ({\mathrm e}^{i \left (f x +e \right )}-1\right ) \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )}{\sqrt {\frac {a \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )^{2}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) \sqrt {\frac {c \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )^{2}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, f}+\frac {i \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) \left ({\mathrm e}^{i \left (f x +e \right )}-1\right ) \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{\sqrt {\frac {a \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )^{2}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) \sqrt {\frac {c \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )^{2}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, f}\) | \(228\) |
default | \(\frac {\sin \left (\frac {f x}{2}+\frac {e}{2}\right ) \left (\ln \left (-\cot \left (\frac {f x}{2}+\frac {e}{2}\right )+\csc \left (\frac {f x}{2}+\frac {e}{2}\right )\right )-\ln \left (-\frac {2 \left (\cos \left (\frac {f x}{2}+\frac {e}{2}\right )+\sin \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{\cos \left (\frac {f x}{2}+\frac {e}{2}\right )+1}\right )-\ln \left (-\frac {2 \left (\cos \left (\frac {f x}{2}+\frac {e}{2}\right )-\sin \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{\cos \left (\frac {f x}{2}+\frac {e}{2}\right )+1}\right )+\ln \left (-\cot \left (\frac {f x}{2}+\frac {e}{2}\right )+\csc \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )+\ln \left (-\cot \left (\frac {f x}{2}+\frac {e}{2}\right )+\csc \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )\right ) \cos \left (\frac {f x}{2}+\frac {e}{2}\right )}{f \left (2 \cos \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1\right ) \sqrt {\frac {a \cos \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{2 \cos \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1}}\, \sqrt {-\frac {c \sin \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{2 \cos \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1}}}\) | \(250\) |
Input:
int(sec(f*x+e)^2/(a+a*sec(f*x+e))^(1/2)/(c-c*sec(f*x+e))^(1/2),x,method=_R ETURNVERBOSE)
Output:
-I/(a*(exp(I*(f*x+e))+1)^2/(exp(2*I*(f*x+e))+1))^(1/2)/(exp(2*I*(f*x+e))+1 )*(exp(I*(f*x+e))+1)/(c*(exp(I*(f*x+e))-1)^2/(exp(2*I*(f*x+e))+1))^(1/2)*( exp(I*(f*x+e))-1)/f*ln(exp(2*I*(f*x+e))-1)+I/(a*(exp(I*(f*x+e))+1)^2/(exp( 2*I*(f*x+e))+1))^(1/2)/(exp(2*I*(f*x+e))+1)*(exp(I*(f*x+e))+1)/(c*(exp(I*( f*x+e))-1)^2/(exp(2*I*(f*x+e))+1))^(1/2)*(exp(I*(f*x+e))-1)/f*ln(exp(2*I*( f*x+e))+1)
Leaf count of result is larger than twice the leaf count of optimal. 99 vs. \(2 (42) = 84\).
Time = 0.25 (sec) , antiderivative size = 255, normalized size of antiderivative = 5.54 \[ \int \frac {\sec ^2(e+f x)}{\sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}} \, dx=\left [-\frac {\sqrt {-a c} \log \left (-\frac {8 \, {\left ({\left (2 \, \cos \left (f x + e\right )^{3} - \cos \left (f x + e\right )\right )} \sqrt {-a c} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {\frac {c \cos \left (f x + e\right ) - c}{\cos \left (f x + e\right )}} + {\left (2 \, a c \cos \left (f x + e\right )^{4} - 2 \, a c \cos \left (f x + e\right )^{2} + a c\right )} \sin \left (f x + e\right )\right )}}{{\left (\cos \left (f x + e\right )^{4} - \cos \left (f x + e\right )^{2}\right )} \sin \left (f x + e\right )}\right )}{2 \, a c f}, \frac {\sqrt {a c} \arctan \left (\frac {\sqrt {a c} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {\frac {c \cos \left (f x + e\right ) - c}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{{\left (2 \, a c \cos \left (f x + e\right )^{2} - a c\right )} \sin \left (f x + e\right )}\right )}{a c f}\right ] \] Input:
integrate(sec(f*x+e)^2/(a+a*sec(f*x+e))^(1/2)/(c-c*sec(f*x+e))^(1/2),x, al gorithm="fricas")
Output:
[-1/2*sqrt(-a*c)*log(-8*((2*cos(f*x + e)^3 - cos(f*x + e))*sqrt(-a*c)*sqrt ((a*cos(f*x + e) + a)/cos(f*x + e))*sqrt((c*cos(f*x + e) - c)/cos(f*x + e) ) + (2*a*c*cos(f*x + e)^4 - 2*a*c*cos(f*x + e)^2 + a*c)*sin(f*x + e))/((co s(f*x + e)^4 - cos(f*x + e)^2)*sin(f*x + e)))/(a*c*f), sqrt(a*c)*arctan(sq rt(a*c)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*sqrt((c*cos(f*x + e) - c)/ cos(f*x + e))*cos(f*x + e)/((2*a*c*cos(f*x + e)^2 - a*c)*sin(f*x + e)))/(a *c*f)]
\[ \int \frac {\sec ^2(e+f x)}{\sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}} \, dx=\int \frac {\sec ^{2}{\left (e + f x \right )}}{\sqrt {a \left (\sec {\left (e + f x \right )} + 1\right )} \sqrt {- c \left (\sec {\left (e + f x \right )} - 1\right )}}\, dx \] Input:
integrate(sec(f*x+e)**2/(a+a*sec(f*x+e))**(1/2)/(c-c*sec(f*x+e))**(1/2),x)
Output:
Integral(sec(e + f*x)**2/(sqrt(a*(sec(e + f*x) + 1))*sqrt(-c*(sec(e + f*x) - 1))), x)
Time = 0.21 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.22 \[ \int \frac {\sec ^2(e+f x)}{\sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}} \, dx=-\frac {\arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right ) + 1\right ) - \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right ) - 1\right )}{\sqrt {a} \sqrt {c} f} \] Input:
integrate(sec(f*x+e)^2/(a+a*sec(f*x+e))^(1/2)/(c-c*sec(f*x+e))^(1/2),x, al gorithm="maxima")
Output:
-(arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e) + 1) - arctan2(sin(2*f*x + 2* e), cos(2*f*x + 2*e) - 1))/(sqrt(a)*sqrt(c)*f)
Exception generated. \[ \int \frac {\sec ^2(e+f x)}{\sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}} \, dx=\text {Exception raised: TypeError} \] Input:
integrate(sec(f*x+e)^2/(a+a*sec(f*x+e))^(1/2)/(c-c*sec(f*x+e))^(1/2),x, al gorithm="giac")
Output:
Exception raised: TypeError >> an error occurred running a Giac command:IN PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Limit: Max order reached or unable to make series expansion Error: Bad Argument Value
Timed out. \[ \int \frac {\sec ^2(e+f x)}{\sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}} \, dx=\int \frac {1}{{\cos \left (e+f\,x\right )}^2\,\sqrt {a+\frac {a}{\cos \left (e+f\,x\right )}}\,\sqrt {c-\frac {c}{\cos \left (e+f\,x\right )}}} \,d x \] Input:
int(1/(cos(e + f*x)^2*(a + a/cos(e + f*x))^(1/2)*(c - c/cos(e + f*x))^(1/2 )),x)
Output:
int(1/(cos(e + f*x)^2*(a + a/cos(e + f*x))^(1/2)*(c - c/cos(e + f*x))^(1/2 )), x)
\[ \int \frac {\sec ^2(e+f x)}{\sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}} \, dx=-\frac {\sqrt {c}\, \sqrt {a}\, \left (\int \frac {\sqrt {\sec \left (f x +e \right )+1}\, \sqrt {-\sec \left (f x +e \right )+1}\, \sec \left (f x +e \right )^{2}}{\sec \left (f x +e \right )^{2}-1}d x \right )}{a c} \] Input:
int(sec(f*x+e)^2/(a+a*sec(f*x+e))^(1/2)/(c-c*sec(f*x+e))^(1/2),x)
Output:
( - sqrt(c)*sqrt(a)*int((sqrt(sec(e + f*x) + 1)*sqrt( - sec(e + f*x) + 1)* sec(e + f*x)**2)/(sec(e + f*x)**2 - 1),x))/(a*c)