3.861 \(\int \sec (x) \sqrt{\sec (x)+\tan (x)} \, dx\)

Optimal. Leaf size=13 \[ 2 \sqrt{(\sin (x)+1) \sec (x)} \]

[Out]

2*Sqrt[Sec[x]*(1 + Sin[x])]

________________________________________________________________________________________

Rubi [A]  time = 0.145602, antiderivative size = 13, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {4397, 4400, 2705, 2671} \[ 2 \sqrt{(\sin (x)+1) \sec (x)} \]

Antiderivative was successfully verified.

[In]

Int[Sec[x]*Sqrt[Sec[x] + Tan[x]],x]

[Out]

2*Sqrt[Sec[x]*(1 + Sin[x])]

Rule 4397

Int[u_, x_Symbol] :> Int[TrigSimplify[u], x] /; TrigSimplifyQ[u]

Rule 4400

Int[(u_.)*((v_)^(m_.)*(w_)^(n_.))^(p_), x_Symbol] :> With[{uu = ActivateTrig[u], vv = ActivateTrig[v], ww = Ac
tivateTrig[w]}, Dist[(vv^m*ww^n)^FracPart[p]/(vv^(m*FracPart[p])*ww^(n*FracPart[p])), Int[uu*vv^(m*p)*ww^(n*p)
, x], x]] /; FreeQ[{m, n, p}, x] &&  !IntegerQ[p] && ( !InertTrigFreeQ[v] ||  !InertTrigFreeQ[w])

Rule 2705

Int[((g_.)*sec[(e_.) + (f_.)*(x_)])^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[g^(2*
IntPart[p])*(g*Cos[e + f*x])^FracPart[p]*(g*Sec[e + f*x])^FracPart[p], Int[(a + b*Sin[e + f*x])^m/(g*Cos[e + f
*x])^p, x], x] /; FreeQ[{a, b, e, f, g, m, p}, x] &&  !IntegerQ[p]

Rule 2671

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[(b*(g*
Cos[e + f*x])^(p + 1)*(a + b*Sin[e + f*x])^m)/(a*f*g*m), x] /; FreeQ[{a, b, e, f, g, m, p}, x] && EqQ[a^2 - b^
2, 0] && EqQ[Simplify[m + p + 1], 0] &&  !ILtQ[p, 0]

Rubi steps

\begin{align*} \int \sec (x) \sqrt{\sec (x)+\tan (x)} \, dx &=\int \sec (x) \sqrt{\sec (x) (1+\sin (x))} \, dx\\ &=\frac{\sqrt{\sec (x) (1+\sin (x))} \int \sec ^{\frac{3}{2}}(x) \sqrt{1+\sin (x)} \, dx}{\sqrt{\sec (x)} \sqrt{1+\sin (x)}}\\ &=\frac{\left (\sqrt{\cos (x)} \sqrt{\sec (x) (1+\sin (x))}\right ) \int \frac{\sqrt{1+\sin (x)}}{\cos ^{\frac{3}{2}}(x)} \, dx}{\sqrt{1+\sin (x)}}\\ &=2 \sqrt{\sec (x) (1+\sin (x))}\\ \end{align*}

Mathematica [B]  time = 0.0446157, size = 37, normalized size = 2.85 \[ 2 \sqrt{\frac{\sin \left (\frac{x}{2}\right )+\cos \left (\frac{x}{2}\right )}{\cos \left (\frac{x}{2}\right )-\sin \left (\frac{x}{2}\right )}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[x]*Sqrt[Sec[x] + Tan[x]],x]

[Out]

2*Sqrt[(Cos[x/2] + Sin[x/2])/(Cos[x/2] - Sin[x/2])]

________________________________________________________________________________________

Maple [A]  time = 0.058, size = 10, normalized size = 0.8 \begin{align*} 2\,\sqrt{\sec \left ( x \right ) +\tan \left ( x \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(x)*(sec(x)+tan(x))^(1/2),x)

[Out]

2*(sec(x)+tan(x))^(1/2)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{\sec \left (x\right ) + \tan \left (x\right )} \sec \left (x\right )\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)*(sec(x)+tan(x))^(1/2),x, algorithm="maxima")

[Out]

integrate(sqrt(sec(x) + tan(x))*sec(x), x)

________________________________________________________________________________________

Fricas [A]  time = 2.03483, size = 72, normalized size = 5.54 \begin{align*} 2 \, \sqrt{\frac{\cos \left (x\right ) + \sin \left (x\right ) + 1}{\cos \left (x\right ) - \sin \left (x\right ) + 1}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)*(sec(x)+tan(x))^(1/2),x, algorithm="fricas")

[Out]

2*sqrt((cos(x) + sin(x) + 1)/(cos(x) - sin(x) + 1))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{\tan{\left (x \right )} + \sec{\left (x \right )}} \sec{\left (x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)*(sec(x)+tan(x))**(1/2),x)

[Out]

Integral(sqrt(tan(x) + sec(x))*sec(x), x)

________________________________________________________________________________________

Giac [B]  time = 1.29174, size = 74, normalized size = 5.69 \begin{align*} -\frac{4 \, \mathrm{sgn}\left (-\tan \left (\frac{1}{2} \, x\right )^{3} - \tan \left (\frac{1}{2} \, x\right )^{2} - \tan \left (\frac{1}{2} \, x\right ) - 1\right ) \mathrm{sgn}\left (\cos \left (x\right )\right )}{\frac{\sqrt{-\tan \left (\frac{1}{2} \, x\right )^{2} + 1} - 1}{\tan \left (\frac{1}{2} \, x\right )} + 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)*(sec(x)+tan(x))^(1/2),x, algorithm="giac")

[Out]

-4*sgn(-tan(1/2*x)^3 - tan(1/2*x)^2 - tan(1/2*x) - 1)*sgn(cos(x))/((sqrt(-tan(1/2*x)^2 + 1) - 1)/tan(1/2*x) +
1)