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]

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

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 41, normalized size of antiderivative = 1.00, 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 12

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

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])

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 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]

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 = 4.38, size = 283, normalized size = 6.90 \[ -\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 (\operatorname {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

________________________________________________________________________________________

fricas [A]  time = 0.48, size = 32, normalized size = 0.78 \[ -\frac {1}{2} \, {\left (2 \, \cos \relax (x) - 1\right )} \arctan \left (\sqrt {\sec \relax (x) - 1}\right ) + \frac {1}{2} \, \sqrt {-\frac {\cos \relax (x) - 1}{\cos \relax (x)}} \cos \relax (x) \]

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)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \mathit {undef} \]

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

________________________________________________________________________________________

maple [A]  time = 0.07, size = 42, normalized size = 1.02 \[ \frac {\arctan \left (\sqrt {\sec \relax (x )-1}\right )}{2}-\frac {\arctan \left (\sqrt {-\left (\frac {1}{\sec \relax (x )}-1\right ) \sec \relax (x )}\right )}{\sec \relax (x )}+\frac {\sqrt {\sec \relax (x )-1}}{2 \sec \relax (x )} \]

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.01, size = 60, normalized size = 1.46 \[ -\arctan \left (\sqrt {-\frac {\cos \relax (x) - 1}{\cos \relax (x)}}\right ) \cos \relax (x) - \frac {\sqrt {-\frac {\cos \relax (x) - 1}{\cos \relax (x)}}}{2 \, {\left (\frac {\cos \relax (x) - 1}{\cos \relax (x)} - 1\right )}} + \frac {1}{2} \, \arctan \left (\sqrt {-\frac {\cos \relax (x) - 1}{\cos \relax (x)}}\right ) \]

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)))

________________________________________________________________________________________

mupad [B]  time = 0.42, size = 60, normalized size = 1.46 \[ -\mathrm {atan}\left (\sqrt {\frac {1}{\cos \relax (x)}-1}\right )\,\cos \relax (x)-\frac {\cos \relax (x)\,\left (\frac {3\,\mathrm {asin}\left (\sqrt {\cos \relax (x)}\right )}{2\,{\cos \relax (x)}^{3/2}}-\frac {3\,\sqrt {1-\cos \relax (x)}}{2\,\cos \relax (x)}\right )\,\sqrt {1-\cos \relax (x)}}{3\,\sqrt {\frac {1}{\cos \relax (x)}-1}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(atan((1/cos(x) - 1)^(1/2))*sin(x),x)

[Out]

- atan((1/cos(x) - 1)^(1/2))*cos(x) - (cos(x)*((3*asin(cos(x)^(1/2)))/(2*cos(x)^(3/2)) - (3*(1 - cos(x))^(1/2)
)/(2*cos(x)))*(1 - cos(x))^(1/2))/(3*(1/cos(x) - 1)^(1/2))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sin {\relax (x )} \operatorname {atan}{\left (\sqrt {\sec {\relax (x )} - 1} \right )}\, dx \]

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)

________________________________________________________________________________________