3.9 \(\int \tan ^{-1}(\sqrt{-1+\sec (x)}) \sin (x) \, dx\)

Optimal. Leaf size=41 \[ \frac{1}{2} \cos (x) \sqrt{\sec (x)-1}+\frac{1}{2} \tan ^{-1}\left (\sqrt{\sec (x)-1}\right )-\cos (x) \tan ^{-1}\left (\sqrt{\sec (x)-1}\right ) \]

[Out]

ArcTan[Sqrt[-1 + Sec[x]]]/2 - ArcTan[Sqrt[-1 + Sec[x]]]*Cos[x] + (Cos[x]*Sqrt[-1 + Sec[x]])/2

________________________________________________________________________________________

Rubi [A]  time = 0.0224725, antiderivative size = 41, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.583, Rules used = {4335, 5203, 12, 242, 51, 63, 203} \[ \frac{1}{2} \cos (x) \sqrt{\sec (x)-1}+\frac{1}{2} \tan ^{-1}\left (\sqrt{\sec (x)-1}\right )-\cos (x) \tan ^{-1}\left (\sqrt{\sec (x)-1}\right ) \]

Antiderivative was successfully verified.

[In]

Int[ArcTan[Sqrt[-1 + Sec[x]]]*Sin[x],x]

[Out]

ArcTan[Sqrt[-1 + Sec[x]]]/2 - ArcTan[Sqrt[-1 + Sec[x]]]*Cos[x] + (Cos[x]*Sqrt[-1 + Sec[x]])/2

Rule 4335

Int[(u_)*(F_)[(c_.)*((a_.) + (b_.)*(x_))], x_Symbol] :> With[{d = FreeFactors[Cos[c*(a + b*x)], x]}, -Dist[d/(
b*c), Subst[Int[SubstFor[1, Cos[c*(a + b*x)]/d, u, x], x], x, Cos[c*(a + b*x)]/d], x] /; FunctionOfQ[Cos[c*(a
+ b*x)]/d, u, x, True]] /; FreeQ[{a, b, c}, x] && (EqQ[F, Sin] || EqQ[F, sin])

Rule 5203

Int[ArcTan[u_], x_Symbol] :> Simp[x*ArcTan[u], x] - Int[SimplifyIntegrand[(x*D[u, x])/(1 + u^2), x], x] /; Inv
erseFunctionFreeQ[u, x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 242

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> -Subst[Int[(a + b/x^n)^p/x^2, x], x, 1/x] /; FreeQ[{a, b, p},
x] && ILtQ[n, 0]

Rule 51

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^(n + 1
))/((b*c - a*d)*(m + 1)), x] - Dist[(d*(m + n + 2))/((b*c - a*d)*(m + 1)), Int[(a + b*x)^(m + 1)*(c + d*x)^n,
x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && LtQ[m, -1] &&  !(LtQ[n, -1] && (EqQ[a, 0] || (NeQ[
c, 0] && LtQ[m - n, 0] && IntegerQ[n]))) && IntLinearQ[a, b, c, d, m, n, x]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

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

Mathematica [C]  time = 3.812, size = 285, normalized size = 6.95 \[ -\frac{1}{2} \left (-3-2 \sqrt{2}\right ) \left (\left (\sqrt{2}-2\right ) \cos \left (\frac{x}{2}\right )-\sqrt{2}+1\right ) \cos ^2\left (\frac{x}{4}\right ) \sqrt{-\tan ^2\left (\frac{x}{4}\right )-2 \sqrt{2}+3} \sqrt{\left (2 \sqrt{2}-3\right ) \tan ^2\left (\frac{x}{4}\right )+1} \cot \left (\frac{x}{4}\right ) \sqrt{\sec (x)-1} \sec (x) \sqrt{\left (\left (10-7 \sqrt{2}\right ) \cos \left (\frac{x}{2}\right )-5 \sqrt{2}+7\right ) \sec ^2\left (\frac{x}{4}\right )} \sqrt{\left (\left (2+\sqrt{2}\right ) \cos \left (\frac{x}{2}\right )-\sqrt{2}-1\right ) \sec ^2\left (\frac{x}{4}\right )} \left (\text{EllipticF}\left (\sin ^{-1}\left (\frac{\tan \left (\frac{x}{4}\right )}{\sqrt{3-2 \sqrt{2}}}\right ),17-12 \sqrt{2}\right )+2 \Pi \left (-3+2 \sqrt{2};-\sin ^{-1}\left (\frac{\tan \left (\frac{x}{4}\right )}{\sqrt{3-2 \sqrt{2}}}\right )|17-12 \sqrt{2}\right )\right )+\frac{1}{2} \cos (x) \sqrt{\sec (x)-1}-\cos (x) \tan ^{-1}\left (\sqrt{\sec (x)-1}\right ) \]

Warning: Unable to verify antiderivative.

[In]

Integrate[ArcTan[Sqrt[-1 + Sec[x]]]*Sin[x],x]

[Out]

-(ArcTan[Sqrt[-1 + Sec[x]]]*Cos[x]) + (Cos[x]*Sqrt[-1 + Sec[x]])/2 - ((-3 - 2*Sqrt[2])*Cos[x/4]^2*(1 - Sqrt[2]
 + (-2 + Sqrt[2])*Cos[x/2])*Cot[x/4]*(EllipticF[ArcSin[Tan[x/4]/Sqrt[3 - 2*Sqrt[2]]], 17 - 12*Sqrt[2]] + 2*Ell
ipticPi[-3 + 2*Sqrt[2], -ArcSin[Tan[x/4]/Sqrt[3 - 2*Sqrt[2]]], 17 - 12*Sqrt[2]])*Sqrt[(7 - 5*Sqrt[2] + (10 - 7
*Sqrt[2])*Cos[x/2])*Sec[x/4]^2]*Sqrt[(-1 - Sqrt[2] + (2 + Sqrt[2])*Cos[x/2])*Sec[x/4]^2]*Sqrt[-1 + Sec[x]]*Sec
[x]*Sqrt[3 - 2*Sqrt[2] - Tan[x/4]^2]*Sqrt[1 + (-3 + 2*Sqrt[2])*Tan[x/4]^2])/2

________________________________________________________________________________________

Maple [A]  time = 0.041, size = 42, normalized size = 1. \begin{align*} -{\frac{1}{\sec \left ( x \right ) }\arctan \left ( \sqrt{- \left ( \left ( \sec \left ( x \right ) \right ) ^{-1}-1 \right ) \sec \left ( x \right ) } \right ) }+{\frac{1}{2\,\sec \left ( x \right ) }\sqrt{-1+\sec \left ( x \right ) }}+{\frac{1}{2}\arctan \left ( \sqrt{-1+\sec \left ( x \right ) } \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(arctan((-1+sec(x))^(1/2))*sin(x),x)

[Out]

-1/sec(x)*arctan((-(1/sec(x)-1)*sec(x))^(1/2))+1/2*(-1+sec(x))^(1/2)/sec(x)+1/2*arctan((-1+sec(x))^(1/2))

________________________________________________________________________________________

Maxima [A]  time = 1.43953, size = 81, normalized size = 1.98 \begin{align*} -\arctan \left (\sqrt{-\frac{\cos \left (x\right ) - 1}{\cos \left (x\right )}}\right ) \cos \left (x\right ) - \frac{\sqrt{-\frac{\cos \left (x\right ) - 1}{\cos \left (x\right )}}}{2 \,{\left (\frac{\cos \left (x\right ) - 1}{\cos \left (x\right )} - 1\right )}} + \frac{1}{2} \, \arctan \left (\sqrt{-\frac{\cos \left (x\right ) - 1}{\cos \left (x\right )}}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-arctan(sqrt(-(cos(x) - 1)/cos(x)))*cos(x) - 1/2*sqrt(-(cos(x) - 1)/cos(x))/((cos(x) - 1)/cos(x) - 1) + 1/2*ar
ctan(sqrt(-(cos(x) - 1)/cos(x)))

________________________________________________________________________________________

Fricas [A]  time = 2.82467, size = 116, normalized size = 2.83 \begin{align*} -\frac{1}{2} \,{\left (2 \, \cos \left (x\right ) - 1\right )} \arctan \left (\sqrt{\sec \left (x\right ) - 1}\right ) + \frac{1}{2} \, \sqrt{-\frac{\cos \left (x\right ) - 1}{\cos \left (x\right )}} \cos \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*(2*cos(x) - 1)*arctan(sqrt(sec(x) - 1)) + 1/2*sqrt(-(cos(x) - 1)/cos(x))*cos(x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sin{\left (x \right )} \operatorname{atan}{\left (\sqrt{\sec{\left (x \right )} - 1} \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(atan((-1+sec(x))**(1/2))*sin(x),x)

[Out]

Integral(sin(x)*atan(sqrt(sec(x) - 1)), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \mathit{undef} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

undef