3.163 \(\int \frac {\sec (c+d x)}{\sqrt {a+a \sin (c+d x)}} \, dx\)

Optimal. Leaf size=60 \[ \frac {\tanh ^{-1}\left (\frac {\sqrt {a \sin (c+d x)+a}}{\sqrt {2} \sqrt {a}}\right )}{\sqrt {2} \sqrt {a} d}-\frac {1}{d \sqrt {a \sin (c+d x)+a}} \]

[Out]

1/2*arctanh(1/2*(a+a*sin(d*x+c))^(1/2)*2^(1/2)/a^(1/2))/d*2^(1/2)/a^(1/2)-1/d/(a+a*sin(d*x+c))^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {2667, 51, 63, 206} \[ \frac {\tanh ^{-1}\left (\frac {\sqrt {a \sin (c+d x)+a}}{\sqrt {2} \sqrt {a}}\right )}{\sqrt {2} \sqrt {a} d}-\frac {1}{d \sqrt {a \sin (c+d x)+a}} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]/Sqrt[a + a*Sin[c + d*x]],x]

[Out]

ArcTanh[Sqrt[a + a*Sin[c + d*x]]/(Sqrt[2]*Sqrt[a])]/(Sqrt[2]*Sqrt[a]*d) - 1/(d*Sqrt[a + a*Sin[c + d*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 206

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

Rule 2667

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2, 0] && (GeQ[p, -1] ||  !IntegerQ[m + 1/2])

Rubi steps

\begin {align*} \int \frac {\sec (c+d x)}{\sqrt {a+a \sin (c+d x)}} \, dx &=\frac {a \operatorname {Subst}\left (\int \frac {1}{(a-x) (a+x)^{3/2}} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=-\frac {1}{d \sqrt {a+a \sin (c+d x)}}+\frac {\operatorname {Subst}\left (\int \frac {1}{(a-x) \sqrt {a+x}} \, dx,x,a \sin (c+d x)\right )}{2 d}\\ &=-\frac {1}{d \sqrt {a+a \sin (c+d x)}}+\frac {\operatorname {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\sqrt {a+a \sin (c+d x)}\right )}{d}\\ &=\frac {\tanh ^{-1}\left (\frac {\sqrt {a+a \sin (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{\sqrt {2} \sqrt {a} d}-\frac {1}{d \sqrt {a+a \sin (c+d x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.05, size = 39, normalized size = 0.65 \[ -\frac {\, _2F_1\left (-\frac {1}{2},1;\frac {1}{2};\frac {1}{2} (\sin (c+d x)+1)\right )}{d \sqrt {a \sin (c+d x)+a}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]/Sqrt[a + a*Sin[c + d*x]],x]

[Out]

-(Hypergeometric2F1[-1/2, 1, 1/2, (1 + Sin[c + d*x])/2]/(d*Sqrt[a + a*Sin[c + d*x]]))

________________________________________________________________________________________

fricas [A]  time = 0.59, size = 90, normalized size = 1.50 \[ \frac {\frac {\sqrt {2} {\left (a \sin \left (d x + c\right ) + a\right )} \log \left (-\frac {\frac {2 \, \sqrt {2} \sqrt {a \sin \left (d x + c\right ) + a}}{\sqrt {a}} + \sin \left (d x + c\right ) + 3}{\sin \left (d x + c\right ) - 1}\right )}{\sqrt {a}} - 4 \, \sqrt {a \sin \left (d x + c\right ) + a}}{4 \, {\left (a d \sin \left (d x + c\right ) + a d\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a+a*sin(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

1/4*(sqrt(2)*(a*sin(d*x + c) + a)*log(-(2*sqrt(2)*sqrt(a*sin(d*x + c) + a)/sqrt(a) + sin(d*x + c) + 3)/(sin(d*
x + c) - 1))/sqrt(a) - 4*sqrt(a*sin(d*x + c) + a))/(a*d*sin(d*x + c) + a*d)

________________________________________________________________________________________

giac [B]  time = 1.44, size = 211, normalized size = 3.52 \[ -\frac {\frac {\sqrt {2} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a} - \sqrt {a}\right )}}{2 \, \sqrt {-a}}\right )}{\sqrt {-a} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )} + \frac {2 \, {\left (\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a} - \sqrt {a}\right )}}{{\left ({\left (\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} + 2 \, {\left (\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )} \sqrt {a} - a\right )} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a+a*sin(d*x+c))^(1/2),x, algorithm="giac")

[Out]

-(sqrt(2)*arctan(-1/2*sqrt(2)*(sqrt(a)*tan(1/2*d*x + 1/2*c) - sqrt(a*tan(1/2*d*x + 1/2*c)^2 + a) - sqrt(a))/sq
rt(-a))/(sqrt(-a)*sgn(tan(1/2*d*x + 1/2*c) + 1)) + 2*(sqrt(a)*tan(1/2*d*x + 1/2*c) - sqrt(a*tan(1/2*d*x + 1/2*
c)^2 + a) - sqrt(a))/(((sqrt(a)*tan(1/2*d*x + 1/2*c) - sqrt(a*tan(1/2*d*x + 1/2*c)^2 + a))^2 + 2*(sqrt(a)*tan(
1/2*d*x + 1/2*c) - sqrt(a*tan(1/2*d*x + 1/2*c)^2 + a))*sqrt(a) - a)*sgn(tan(1/2*d*x + 1/2*c) + 1)))/d

________________________________________________________________________________________

maple [A]  time = 0.15, size = 54, normalized size = 0.90 \[ -\frac {2 a \left (\frac {1}{2 a \sqrt {a +a \sin \left (d x +c \right )}}-\frac {\sqrt {2}\, \arctanh \left (\frac {\sqrt {a +a \sin \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )}{4 a^{\frac {3}{2}}}\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)/(a+a*sin(d*x+c))^(1/2),x)

[Out]

-2*a*(1/2/a/(a+a*sin(d*x+c))^(1/2)-1/4/a^(3/2)*2^(1/2)*arctanh(1/2*(a+a*sin(d*x+c))^(1/2)*2^(1/2)/a^(1/2)))/d

________________________________________________________________________________________

maxima [A]  time = 1.25, size = 78, normalized size = 1.30 \[ -\frac {\sqrt {2} \sqrt {a} \log \left (-\frac {\sqrt {2} \sqrt {a} - \sqrt {a \sin \left (d x + c\right ) + a}}{\sqrt {2} \sqrt {a} + \sqrt {a \sin \left (d x + c\right ) + a}}\right ) + \frac {4 \, a}{\sqrt {a \sin \left (d x + c\right ) + a}}}{4 \, a d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a+a*sin(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

-1/4*(sqrt(2)*sqrt(a)*log(-(sqrt(2)*sqrt(a) - sqrt(a*sin(d*x + c) + a))/(sqrt(2)*sqrt(a) + sqrt(a*sin(d*x + c)
 + a))) + 4*a/sqrt(a*sin(d*x + c) + a))/(a*d)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.02 \[ \int \frac {1}{\cos \left (c+d\,x\right )\,\sqrt {a+a\,\sin \left (c+d\,x\right )}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(c + d*x)*(a + a*sin(c + d*x))^(1/2)),x)

[Out]

int(1/(cos(c + d*x)*(a + a*sin(c + d*x))^(1/2)), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sec {\left (c + d x \right )}}{\sqrt {a \left (\sin {\left (c + d x \right )} + 1\right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a+a*sin(d*x+c))**(1/2),x)

[Out]

Integral(sec(c + d*x)/sqrt(a*(sin(c + d*x) + 1)), x)

________________________________________________________________________________________