3.197 \(\int \frac {A+B \sec (x)}{(a+a \cos (x))^{3/2}} \, dx\)

Optimal. Leaf size=92 \[ \frac {(A-5 B) \tanh ^{-1}\left (\frac {\sqrt {a} \sin (x)}{\sqrt {2} \sqrt {a \cos (x)+a}}\right )}{2 \sqrt {2} a^{3/2}}+\frac {2 B \tanh ^{-1}\left (\frac {\sqrt {a} \sin (x)}{\sqrt {a \cos (x)+a}}\right )}{a^{3/2}}+\frac {(A-B) \sin (x)}{2 (a \cos (x)+a)^{3/2}} \]

[Out]

2*B*arctanh(sin(x)*a^(1/2)/(a+a*cos(x))^(1/2))/a^(3/2)+1/2*(A-B)*sin(x)/(a+a*cos(x))^(3/2)+1/4*(A-5*B)*arctanh
(1/2*sin(x)*a^(1/2)*2^(1/2)/(a+a*cos(x))^(1/2))/a^(3/2)*2^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.34, antiderivative size = 92, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.353, Rules used = {2828, 2978, 2985, 2649, 206, 2773} \[ \frac {(A-5 B) \tanh ^{-1}\left (\frac {\sqrt {a} \sin (x)}{\sqrt {2} \sqrt {a \cos (x)+a}}\right )}{2 \sqrt {2} a^{3/2}}+\frac {2 B \tanh ^{-1}\left (\frac {\sqrt {a} \sin (x)}{\sqrt {a \cos (x)+a}}\right )}{a^{3/2}}+\frac {(A-B) \sin (x)}{2 (a \cos (x)+a)^{3/2}} \]

Antiderivative was successfully verified.

[In]

Int[(A + B*Sec[x])/(a + a*Cos[x])^(3/2),x]

[Out]

(2*B*ArcTanh[(Sqrt[a]*Sin[x])/Sqrt[a + a*Cos[x]]])/a^(3/2) + ((A - 5*B)*ArcTanh[(Sqrt[a]*Sin[x])/(Sqrt[2]*Sqrt
[a + a*Cos[x]])])/(2*Sqrt[2]*a^(3/2)) + ((A - B)*Sin[x])/(2*(a + a*Cos[x])^(3/2))

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 2649

Int[1/Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Dist[-2/d, Subst[Int[1/(2*a - x^2), x], x, (b*C
os[c + d*x])/Sqrt[a + b*Sin[c + d*x]]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rule 2773

Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[(-2*
b)/f, Subst[Int[1/(b*c + a*d - d*x^2), x], x, (b*Cos[e + f*x])/Sqrt[a + b*Sin[e + f*x]]], x] /; FreeQ[{a, b, c
, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]

Rule 2828

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> In
t[((a + b*Sin[e + f*x])^m*(d + c*Sin[e + f*x])^n)/Sin[e + f*x]^n, x] /; FreeQ[{a, b, c, d, e, f, m}, x] && Int
egerQ[n]

Rule 2978

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(A*b - a*B)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*(c + d*Sin[e + f*
x])^(n + 1))/(a*f*(2*m + 1)*(b*c - a*d)), x] + Dist[1/(a*(2*m + 1)*(b*c - a*d)), Int[(a + b*Sin[e + f*x])^(m +
 1)*(c + d*Sin[e + f*x])^n*Simp[B*(a*c*m + b*d*(n + 1)) + A*(b*c*(m + 1) - a*d*(2*m + n + 2)) + d*(A*b - a*B)*
(m + n + 2)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2
- b^2, 0] && NeQ[c^2 - d^2, 0] && LtQ[m, -2^(-1)] &&  !GtQ[n, 0] && IntegerQ[2*m] && (IntegerQ[2*n] || EqQ[c,
0])

Rule 2985

Int[((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])/(Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*((c_.) + (d_.)*sin[(e_
.) + (f_.)*(x_)])), x_Symbol] :> Dist[(A*b - a*B)/(b*c - a*d), Int[1/Sqrt[a + b*Sin[e + f*x]], x], x] + Dist[(
B*c - A*d)/(b*c - a*d), Int[Sqrt[a + b*Sin[e + f*x]]/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f,
A, B}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.37, size = 73, normalized size = 0.79 \[ \frac {\frac {1}{2} (A-B) \sin (x)+(A-5 B) \cos ^3\left (\frac {x}{2}\right ) \tanh ^{-1}\left (\sin \left (\frac {x}{2}\right )\right )+4 \sqrt {2} B \cos ^3\left (\frac {x}{2}\right ) \tanh ^{-1}\left (\sqrt {2} \sin \left (\frac {x}{2}\right )\right )}{(a (\cos (x)+1))^{3/2}} \]

Antiderivative was successfully verified.

[In]

Integrate[(A + B*Sec[x])/(a + a*Cos[x])^(3/2),x]

[Out]

((A - 5*B)*ArcTanh[Sin[x/2]]*Cos[x/2]^3 + 4*Sqrt[2]*B*ArcTanh[Sqrt[2]*Sin[x/2]]*Cos[x/2]^3 + ((A - B)*Sin[x])/
2)/(a*(1 + Cos[x]))^(3/2)

________________________________________________________________________________________

fricas [B]  time = 0.70, size = 187, normalized size = 2.03 \[ -\frac {\sqrt {2} {\left ({\left (A - 5 \, B\right )} \cos \relax (x)^{2} + 2 \, {\left (A - 5 \, B\right )} \cos \relax (x) + A - 5 \, B\right )} \sqrt {a} \log \left (-\frac {a \cos \relax (x)^{2} + 2 \, \sqrt {2} \sqrt {a \cos \relax (x) + a} \sqrt {a} \sin \relax (x) - 2 \, a \cos \relax (x) - 3 \, a}{\cos \relax (x)^{2} + 2 \, \cos \relax (x) + 1}\right ) - 4 \, {\left (B \cos \relax (x)^{2} + 2 \, B \cos \relax (x) + B\right )} \sqrt {a} \log \left (\frac {a \cos \relax (x)^{3} - 7 \, a \cos \relax (x)^{2} - 4 \, \sqrt {a \cos \relax (x) + a} \sqrt {a} {\left (\cos \relax (x) - 2\right )} \sin \relax (x) + 8 \, a}{\cos \relax (x)^{3} + \cos \relax (x)^{2}}\right ) - 4 \, \sqrt {a \cos \relax (x) + a} {\left (A - B\right )} \sin \relax (x)}{8 \, {\left (a^{2} \cos \relax (x)^{2} + 2 \, a^{2} \cos \relax (x) + a^{2}\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sec(x))/(a+a*cos(x))^(3/2),x, algorithm="fricas")

[Out]

-1/8*(sqrt(2)*((A - 5*B)*cos(x)^2 + 2*(A - 5*B)*cos(x) + A - 5*B)*sqrt(a)*log(-(a*cos(x)^2 + 2*sqrt(2)*sqrt(a*
cos(x) + a)*sqrt(a)*sin(x) - 2*a*cos(x) - 3*a)/(cos(x)^2 + 2*cos(x) + 1)) - 4*(B*cos(x)^2 + 2*B*cos(x) + B)*sq
rt(a)*log((a*cos(x)^3 - 7*a*cos(x)^2 - 4*sqrt(a*cos(x) + a)*sqrt(a)*(cos(x) - 2)*sin(x) + 8*a)/(cos(x)^3 + cos
(x)^2)) - 4*sqrt(a*cos(x) + a)*(A - B)*sin(x))/(a^2*cos(x)^2 + 2*a^2*cos(x) + a^2)

________________________________________________________________________________________

giac [B]  time = 0.76, size = 168, normalized size = 1.83 \[ -\frac {\sqrt {2} {\left (A \sqrt {a} - 5 \, B \sqrt {a}\right )} \log \left ({\left (\sqrt {a} \tan \left (\frac {1}{2} \, x\right ) - \sqrt {a \tan \left (\frac {1}{2} \, x\right )^{2} + a}\right )}^{2}\right )}{8 \, a^{2}} + \frac {B \log \left ({\left | {\left (\sqrt {a} \tan \left (\frac {1}{2} \, x\right ) - \sqrt {a \tan \left (\frac {1}{2} \, x\right )^{2} + a}\right )}^{2} - a {\left (2 \, \sqrt {2} + 3\right )} \right |}\right )}{a^{\frac {3}{2}}} - \frac {B \log \left ({\left | {\left (\sqrt {a} \tan \left (\frac {1}{2} \, x\right ) - \sqrt {a \tan \left (\frac {1}{2} \, x\right )^{2} + a}\right )}^{2} + a {\left (2 \, \sqrt {2} - 3\right )} \right |}\right )}{a^{\frac {3}{2}}} + \frac {\sqrt {a \tan \left (\frac {1}{2} \, x\right )^{2} + a} {\left (\sqrt {2} A a - \sqrt {2} B a\right )} \tan \left (\frac {1}{2} \, x\right )}{4 \, a^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sec(x))/(a+a*cos(x))^(3/2),x, algorithm="giac")

[Out]

-1/8*sqrt(2)*(A*sqrt(a) - 5*B*sqrt(a))*log((sqrt(a)*tan(1/2*x) - sqrt(a*tan(1/2*x)^2 + a))^2)/a^2 + B*log(abs(
(sqrt(a)*tan(1/2*x) - sqrt(a*tan(1/2*x)^2 + a))^2 - a*(2*sqrt(2) + 3)))/a^(3/2) - B*log(abs((sqrt(a)*tan(1/2*x
) - sqrt(a*tan(1/2*x)^2 + a))^2 + a*(2*sqrt(2) - 3)))/a^(3/2) + 1/4*sqrt(a*tan(1/2*x)^2 + a)*(sqrt(2)*A*a - sq
rt(2)*B*a)*tan(1/2*x)/a^3

________________________________________________________________________________________

maple [B]  time = 0.34, size = 270, normalized size = 2.93 \[ \frac {\sqrt {a \left (\sin ^{2}\left (\frac {x}{2}\right )\right )}\, \left (A \sqrt {2}\, \ln \left (\frac {4 \sqrt {a}\, \sqrt {a \left (\sin ^{2}\left (\frac {x}{2}\right )\right )}+4 a}{\cos \left (\frac {x}{2}\right )}\right ) \left (\cos ^{2}\left (\frac {x}{2}\right )\right ) a -5 B \sqrt {2}\, \ln \left (\frac {4 \sqrt {a}\, \sqrt {a \left (\sin ^{2}\left (\frac {x}{2}\right )\right )}+4 a}{\cos \left (\frac {x}{2}\right )}\right ) \left (\cos ^{2}\left (\frac {x}{2}\right )\right ) a +4 B \ln \left (\frac {4 a \sqrt {2}\, \cos \left (\frac {x}{2}\right )+4 \sqrt {a}\, \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {x}{2}\right )\right )}+8 a}{2 \cos \left (\frac {x}{2}\right )+\sqrt {2}}\right ) \left (\cos ^{2}\left (\frac {x}{2}\right )\right ) a +4 B \ln \left (-\frac {4 \left (a \sqrt {2}\, \cos \left (\frac {x}{2}\right )-\sqrt {a}\, \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {x}{2}\right )\right )}-2 a \right )}{2 \cos \left (\frac {x}{2}\right )-\sqrt {2}}\right ) \left (\cos ^{2}\left (\frac {x}{2}\right )\right ) a +A \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {x}{2}\right )\right )}\, \sqrt {a}-B \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {x}{2}\right )\right )}\, \sqrt {a}\right )}{4 a^{\frac {5}{2}} \cos \left (\frac {x}{2}\right ) \sin \left (\frac {x}{2}\right ) \sqrt {\left (\cos ^{2}\left (\frac {x}{2}\right )\right ) a}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A+B*sec(x))/(a+a*cos(x))^(3/2),x)

[Out]

1/4/a^(5/2)/cos(1/2*x)*(a*sin(1/2*x)^2)^(1/2)*(A*2^(1/2)*ln(2*(2*a^(1/2)*(a*sin(1/2*x)^2)^(1/2)+2*a)/cos(1/2*x
))*cos(1/2*x)^2*a-5*B*2^(1/2)*ln(2*(2*a^(1/2)*(a*sin(1/2*x)^2)^(1/2)+2*a)/cos(1/2*x))*cos(1/2*x)^2*a+4*B*ln(4/
(2*cos(1/2*x)+2^(1/2))*(a*2^(1/2)*cos(1/2*x)+a^(1/2)*2^(1/2)*(a*sin(1/2*x)^2)^(1/2)+2*a))*cos(1/2*x)^2*a+4*B*l
n(-4*(a*2^(1/2)*cos(1/2*x)-a^(1/2)*2^(1/2)*(a*sin(1/2*x)^2)^(1/2)-2*a)/(2*cos(1/2*x)-2^(1/2)))*cos(1/2*x)^2*a+
A*2^(1/2)*(a*sin(1/2*x)^2)^(1/2)*a^(1/2)-B*2^(1/2)*(a*sin(1/2*x)^2)^(1/2)*a^(1/2))/sin(1/2*x)/(cos(1/2*x)^2*a)
^(1/2)

________________________________________________________________________________________

maxima [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sec(x))/(a+a*cos(x))^(3/2),x, algorithm="maxima")

[Out]

Timed out

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {A+\frac {B}{\cos \relax (x)}}{{\left (a+a\,\cos \relax (x)\right )}^{3/2}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B/cos(x))/(a + a*cos(x))^(3/2),x)

[Out]

int((A + B/cos(x))/(a + a*cos(x))^(3/2), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {A + B \sec {\relax (x )}}{\left (a \left (\cos {\relax (x )} + 1\right )\right )^{\frac {3}{2}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sec(x))/(a+a*cos(x))**(3/2),x)

[Out]

Integral((A + B*sec(x))/(a*(cos(x) + 1))**(3/2), x)

________________________________________________________________________________________