Integrand size = 23, antiderivative size = 107 \[ \int \frac {\cos (e+f x)}{\sqrt {a+b \sec ^2(e+f x)}} \, dx=\frac {\sqrt {a+b} E\left (\arcsin \left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )|\frac {a+b}{a}\right ) \sqrt {\frac {a+b-a \sin ^2(e+f x)}{a+b}}}{\sqrt {a} f \sqrt {\cos ^2(e+f x)} \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )}} \] Output:
(a+b)^(1/2)*EllipticE(a^(1/2)*sin(f*x+e)/(a+b)^(1/2),((a+b)/a)^(1/2))*((a+ b-a*sin(f*x+e)^2)/(a+b))^(1/2)/a^(1/2)/f/(cos(f*x+e)^2)^(1/2)/(sec(f*x+e)^ 2*(a+b-a*sin(f*x+e)^2))^(1/2)
Result contains complex when optimal does not.
Time = 7.27 (sec) , antiderivative size = 274, normalized size of antiderivative = 2.56 \[ \int \frac {\cos (e+f x)}{\sqrt {a+b \sec ^2(e+f x)}} \, dx=\frac {\csc (2 (e+f x)) \sin (e+f x) \left (a^2 \sqrt {-\frac {1}{b}} \sqrt {\frac {a+2 b+a \cos (2 (e+f x))}{a+b}} \operatorname {EllipticF}\left (e+f x,\frac {a}{a+b}\right )-2 i \sqrt {-\frac {a \cos ^2(e+f x)}{b}} \sqrt {a+2 b+a \cos (2 (e+f x))} \csc (2 (e+f x)) \left (2 (a+b) E\left (i \text {arcsinh}\left (\frac {\sqrt {-\frac {1}{b}} \sqrt {a+2 b+a \cos (2 (e+f x))}}{\sqrt {2}}\right )|\frac {b}{a+b}\right )-a \operatorname {EllipticF}\left (i \text {arcsinh}\left (\frac {\sqrt {-\frac {1}{b}} \sqrt {a+2 b+a \cos (2 (e+f x))}}{\sqrt {2}}\right ),\frac {b}{a+b}\right )\right ) \sqrt {\frac {a \sin ^2(e+f x)}{a+b}}\right )}{\sqrt {2} a^2 \sqrt {-\frac {1}{b}} f \sqrt {a+b \sec ^2(e+f x)}} \] Input:
Integrate[Cos[e + f*x]/Sqrt[a + b*Sec[e + f*x]^2],x]
Output:
(Csc[2*(e + f*x)]*Sin[e + f*x]*(a^2*Sqrt[-b^(-1)]*Sqrt[(a + 2*b + a*Cos[2* (e + f*x)])/(a + b)]*EllipticF[e + f*x, a/(a + b)] - (2*I)*Sqrt[-((a*Cos[e + f*x]^2)/b)]*Sqrt[a + 2*b + a*Cos[2*(e + f*x)]]*Csc[2*(e + f*x)]*(2*(a + b)*EllipticE[I*ArcSinh[(Sqrt[-b^(-1)]*Sqrt[a + 2*b + a*Cos[2*(e + f*x)]]) /Sqrt[2]], b/(a + b)] - a*EllipticF[I*ArcSinh[(Sqrt[-b^(-1)]*Sqrt[a + 2*b + a*Cos[2*(e + f*x)]])/Sqrt[2]], b/(a + b)])*Sqrt[(a*Sin[e + f*x]^2)/(a + b)]))/(Sqrt[2]*a^2*Sqrt[-b^(-1)]*f*Sqrt[a + b*Sec[e + f*x]^2])
Time = 0.33 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.07, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3042, 4636, 2057, 2058, 331, 327}
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 {\cos (e+f x)}{\sqrt {a+b \sec ^2(e+f x)}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sec (e+f x) \sqrt {a+b \sec (e+f x)^2}}dx\) |
\(\Big \downarrow \) 4636 |
\(\displaystyle \frac {\int \frac {1}{\sqrt {a+\frac {b}{1-\sin ^2(e+f x)}}}d\sin (e+f x)}{f}\) |
\(\Big \downarrow \) 2057 |
\(\displaystyle \frac {\int \frac {1}{\sqrt {\frac {-a \sin ^2(e+f x)+a+b}{1-\sin ^2(e+f x)}}}d\sin (e+f x)}{f}\) |
\(\Big \downarrow \) 2058 |
\(\displaystyle \frac {\sqrt {-a \sin ^2(e+f x)+a+b} \int \frac {\sqrt {1-\sin ^2(e+f x)}}{\sqrt {-a \sin ^2(e+f x)+a+b}}d\sin (e+f x)}{f \sqrt {1-\sin ^2(e+f x)} \sqrt {\frac {-a \sin ^2(e+f x)+a+b}{1-\sin ^2(e+f x)}}}\) |
\(\Big \downarrow \) 331 |
\(\displaystyle \frac {\sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}} \int \frac {\sqrt {1-\sin ^2(e+f x)}}{\sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}}}d\sin (e+f x)}{f \sqrt {1-\sin ^2(e+f x)} \sqrt {\frac {-a \sin ^2(e+f x)+a+b}{1-\sin ^2(e+f x)}}}\) |
\(\Big \downarrow \) 327 |
\(\displaystyle \frac {\sqrt {a+b} \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}} E\left (\arcsin \left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )|\frac {a+b}{a}\right )}{\sqrt {a} f \sqrt {1-\sin ^2(e+f x)} \sqrt {\frac {-a \sin ^2(e+f x)+a+b}{1-\sin ^2(e+f x)}}}\) |
Input:
Int[Cos[e + f*x]/Sqrt[a + b*Sec[e + f*x]^2],x]
Output:
(Sqrt[a + b]*EllipticE[ArcSin[(Sqrt[a]*Sin[e + f*x])/Sqrt[a + b]], (a + b) /a]*Sqrt[1 - (a*Sin[e + f*x]^2)/(a + b)])/(Sqrt[a]*f*Sqrt[1 - Sin[e + f*x] ^2]*Sqrt[(a + b - a*Sin[e + f*x]^2)/(1 - Sin[e + f*x]^2)])
Int[Sqrt[(a_) + (b_.)*(x_)^2]/Sqrt[(c_) + (d_.)*(x_)^2], x_Symbol] :> Simp[ (Sqrt[a]/(Sqrt[c]*Rt[-d/c, 2]))*EllipticE[ArcSin[Rt[-d/c, 2]*x], b*(c/(a*d) )], x] /; FreeQ[{a, b, c, d}, x] && NegQ[d/c] && GtQ[c, 0] && GtQ[a, 0]
Int[Sqrt[(a_) + (b_.)*(x_)^2]/Sqrt[(c_) + (d_.)*(x_)^2], x_Symbol] :> Simp[ Sqrt[1 + (d/c)*x^2]/Sqrt[c + d*x^2] Int[Sqrt[a + b*x^2]/Sqrt[1 + (d/c)*x^ 2], x], x] /; FreeQ[{a, b, c, d}, x] && NegQ[d/c] && !GtQ[c, 0]
Int[(u_.)*((a_) + (b_.)/((c_) + (d_.)*(x_)^(n_)))^(p_), x_Symbol] :> Int[u* ((b + a*c + a*d*x^n)/(c + d*x^n))^p, x] /; FreeQ[{a, b, c, d, n, p}, x]
Int[(u_.)*((e_.)*((a_.) + (b_.)*(x_)^(n_.))^(q_.)*((c_) + (d_.)*(x_)^(n_))^ (r_.))^(p_), x_Symbol] :> Simp[Simp[(e*(a + b*x^n)^q*(c + d*x^n)^r)^p/((a + b*x^n)^(p*q)*(c + d*x^n)^(p*r))] Int[u*(a + b*x^n)^(p*q)*(c + d*x^n)^(p* r), x], x] /; FreeQ[{a, b, c, d, e, n, p, q, r}, x]
Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_ ))^(p_), x_Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Simp[ff/f Subst[Int[(a + b/(1 - ff^2*x^2)^(n/2))^p/(1 - ff^2*x^2)^((m + 1)/2), x], x , Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2] && IntegerQ[n/2] && !IntegerQ[p]
Result contains complex when optimal does not.
Time = 5.54 (sec) , antiderivative size = 1526, normalized size of antiderivative = 14.26
Input:
int(cos(f*x+e)/(a+b*sec(f*x+e)^2)^(1/2),x,method=_RETURNVERBOSE)
Output:
-1/f/((2*I*a^(1/2)*b^(1/2)+a-b)/(a+b))^(1/2)/a/(2*I*a^(1/2)*b^(1/2)-a+b)/( 1+cos(f*x+e))/(a+b*sec(f*x+e)^2)^(1/2)*((-1/(a+b)*(I*a^(1/2)*b^(1/2)*cos(f *x+e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/2)*b^(1/2)*(-1/(a+b)*(I *a^(1/2)*b^(1/2)*cos(f*x+e)-I*a^(1/2)*b^(1/2)-cos(f*x+e)*a-b)/(1+cos(f*x+e )))^(1/2)*(1/(a+b)*(I*a^(1/2)*b^(1/2)*cos(f*x+e)-I*a^(1/2)*b^(1/2)+cos(f*x +e)*a+b)/(1+cos(f*x+e)))^(1/2)*EllipticF(((2*I*a^(1/2)*b^(1/2)+a-b)/(a+...
\[ \int \frac {\cos (e+f x)}{\sqrt {a+b \sec ^2(e+f x)}} \, dx=\int { \frac {\cos \left (f x + e\right )}{\sqrt {b \sec \left (f x + e\right )^{2} + a}} \,d x } \] Input:
integrate(cos(f*x+e)/(a+b*sec(f*x+e)^2)^(1/2),x, algorithm="fricas")
Output:
integral(cos(f*x + e)/sqrt(b*sec(f*x + e)^2 + a), x)
\[ \int \frac {\cos (e+f x)}{\sqrt {a+b \sec ^2(e+f x)}} \, dx=\int \frac {\cos {\left (e + f x \right )}}{\sqrt {a + b \sec ^{2}{\left (e + f x \right )}}}\, dx \] Input:
integrate(cos(f*x+e)/(a+b*sec(f*x+e)**2)**(1/2),x)
Output:
Integral(cos(e + f*x)/sqrt(a + b*sec(e + f*x)**2), x)
\[ \int \frac {\cos (e+f x)}{\sqrt {a+b \sec ^2(e+f x)}} \, dx=\int { \frac {\cos \left (f x + e\right )}{\sqrt {b \sec \left (f x + e\right )^{2} + a}} \,d x } \] Input:
integrate(cos(f*x+e)/(a+b*sec(f*x+e)^2)^(1/2),x, algorithm="maxima")
Output:
integrate(cos(f*x + e)/sqrt(b*sec(f*x + e)^2 + a), x)
\[ \int \frac {\cos (e+f x)}{\sqrt {a+b \sec ^2(e+f x)}} \, dx=\int { \frac {\cos \left (f x + e\right )}{\sqrt {b \sec \left (f x + e\right )^{2} + a}} \,d x } \] Input:
integrate(cos(f*x+e)/(a+b*sec(f*x+e)^2)^(1/2),x, algorithm="giac")
Output:
integrate(cos(f*x + e)/sqrt(b*sec(f*x + e)^2 + a), x)
Timed out. \[ \int \frac {\cos (e+f x)}{\sqrt {a+b \sec ^2(e+f x)}} \, dx=\int \frac {\cos \left (e+f\,x\right )}{\sqrt {a+\frac {b}{{\cos \left (e+f\,x\right )}^2}}} \,d x \] Input:
int(cos(e + f*x)/(a + b/cos(e + f*x)^2)^(1/2),x)
Output:
int(cos(e + f*x)/(a + b/cos(e + f*x)^2)^(1/2), x)
\[ \int \frac {\cos (e+f x)}{\sqrt {a+b \sec ^2(e+f x)}} \, dx=\int \frac {\sqrt {\sec \left (f x +e \right )^{2} b +a}\, \cos \left (f x +e \right )}{\sec \left (f x +e \right )^{2} b +a}d x \] Input:
int(cos(f*x+e)/(a+b*sec(f*x+e)^2)^(1/2),x)
Output:
int((sqrt(sec(e + f*x)**2*b + a)*cos(e + f*x))/(sec(e + f*x)**2*b + a),x)