### 3.19 $$\int \frac{\sec ^2(x)}{a+b \cos (x)+c \cos ^2(x)} \, dx$$

Optimal. Leaf size=275 $\frac{2 b c \left (\frac{b^2-2 a c}{b \sqrt{b^2-4 a c}}+1\right ) \tan ^{-1}\left (\frac{\tan \left (\frac{x}{2}\right ) \sqrt{-\sqrt{b^2-4 a c}+b-2 c}}{\sqrt{-\sqrt{b^2-4 a c}+b+2 c}}\right )}{a^2 \sqrt{-\sqrt{b^2-4 a c}+b-2 c} \sqrt{-\sqrt{b^2-4 a c}+b+2 c}}+\frac{2 b c \left (1-\frac{b^2-2 a c}{b \sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\tan \left (\frac{x}{2}\right ) \sqrt{\sqrt{b^2-4 a c}+b-2 c}}{\sqrt{\sqrt{b^2-4 a c}+b+2 c}}\right )}{a^2 \sqrt{\sqrt{b^2-4 a c}+b-2 c} \sqrt{\sqrt{b^2-4 a c}+b+2 c}}-\frac{b \tanh ^{-1}(\sin (x))}{a^2}+\frac{\tan (x)}{a}$

[Out]

(2*b*c*(1 + (b^2 - 2*a*c)/(b*Sqrt[b^2 - 4*a*c]))*ArcTan[(Sqrt[b - 2*c - Sqrt[b^2 - 4*a*c]]*Tan[x/2])/Sqrt[b +
2*c - Sqrt[b^2 - 4*a*c]]])/(a^2*Sqrt[b - 2*c - Sqrt[b^2 - 4*a*c]]*Sqrt[b + 2*c - Sqrt[b^2 - 4*a*c]]) + (2*b*c*
(1 - (b^2 - 2*a*c)/(b*Sqrt[b^2 - 4*a*c]))*ArcTan[(Sqrt[b - 2*c + Sqrt[b^2 - 4*a*c]]*Tan[x/2])/Sqrt[b + 2*c + S
qrt[b^2 - 4*a*c]]])/(a^2*Sqrt[b - 2*c + Sqrt[b^2 - 4*a*c]]*Sqrt[b + 2*c + Sqrt[b^2 - 4*a*c]]) - (b*ArcTanh[Sin
[x]])/a^2 + Tan[x]/a

________________________________________________________________________________________

Rubi [A]  time = 1.18899, antiderivative size = 275, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 7, integrand size = 19, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.368, Rules used = {3257, 3293, 2659, 205, 3770, 3767, 8} $\frac{2 b c \left (\frac{b^2-2 a c}{b \sqrt{b^2-4 a c}}+1\right ) \tan ^{-1}\left (\frac{\tan \left (\frac{x}{2}\right ) \sqrt{-\sqrt{b^2-4 a c}+b-2 c}}{\sqrt{-\sqrt{b^2-4 a c}+b+2 c}}\right )}{a^2 \sqrt{-\sqrt{b^2-4 a c}+b-2 c} \sqrt{-\sqrt{b^2-4 a c}+b+2 c}}+\frac{2 b c \left (1-\frac{b^2-2 a c}{b \sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\tan \left (\frac{x}{2}\right ) \sqrt{\sqrt{b^2-4 a c}+b-2 c}}{\sqrt{\sqrt{b^2-4 a c}+b+2 c}}\right )}{a^2 \sqrt{\sqrt{b^2-4 a c}+b-2 c} \sqrt{\sqrt{b^2-4 a c}+b+2 c}}-\frac{b \tanh ^{-1}(\sin (x))}{a^2}+\frac{\tan (x)}{a}$

Antiderivative was successfully veriﬁed.

[In]

Int[Sec[x]^2/(a + b*Cos[x] + c*Cos[x]^2),x]

[Out]

(2*b*c*(1 + (b^2 - 2*a*c)/(b*Sqrt[b^2 - 4*a*c]))*ArcTan[(Sqrt[b - 2*c - Sqrt[b^2 - 4*a*c]]*Tan[x/2])/Sqrt[b +
2*c - Sqrt[b^2 - 4*a*c]]])/(a^2*Sqrt[b - 2*c - Sqrt[b^2 - 4*a*c]]*Sqrt[b + 2*c - Sqrt[b^2 - 4*a*c]]) + (2*b*c*
(1 - (b^2 - 2*a*c)/(b*Sqrt[b^2 - 4*a*c]))*ArcTan[(Sqrt[b - 2*c + Sqrt[b^2 - 4*a*c]]*Tan[x/2])/Sqrt[b + 2*c + S
qrt[b^2 - 4*a*c]]])/(a^2*Sqrt[b - 2*c + Sqrt[b^2 - 4*a*c]]*Sqrt[b + 2*c + Sqrt[b^2 - 4*a*c]]) - (b*ArcTanh[Sin
[x]])/a^2 + Tan[x]/a

Rule 3257

Int[cos[(d_.) + (e_.)*(x_)]^(m_.)*((a_.) + cos[(d_.) + (e_.)*(x_)]^(n_.)*(b_.) + cos[(d_.) + (e_.)*(x_)]^(n2_.
)*(c_.))^(p_), x_Symbol] :> Int[ExpandTrig[cos[d + e*x]^m*(a + b*cos[d + e*x]^n + c*cos[d + e*x]^(2*n))^p, x],
x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[n2, 2*n] && NeQ[b^2 - 4*a*c, 0] && IntegersQ[m, n, p]

Rule 3293

Int[(cos[(d_.) + (e_.)*(x_)]*(B_.) + (A_))/((a_.) + cos[(d_.) + (e_.)*(x_)]*(b_.) + cos[(d_.) + (e_.)*(x_)]^2*
(c_.)), x_Symbol] :> Module[{q = Rt[b^2 - 4*a*c, 2]}, Dist[B + (b*B - 2*A*c)/q, Int[1/(b + q + 2*c*Cos[d + e*x
]), x], x] + Dist[B - (b*B - 2*A*c)/q, Int[1/(b - q + 2*c*Cos[d + e*x]), x], x]] /; FreeQ[{a, b, c, d, e, A, B
}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 2659

Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x
]}, Dist[(2*e)/d, Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}
, x] && NeQ[a^2 - b^2, 0]

Rule 205

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

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

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

Mathematica [A]  time = 1.16246, size = 348, normalized size = 1.27 $\frac{-\frac{\sqrt{2} c \left (b \sqrt{b^2-4 a c}+2 a c-b^2\right ) \tanh ^{-1}\left (\frac{\tan \left (\frac{x}{2}\right ) \left (\sqrt{b^2-4 a c}+b-2 c\right )}{\sqrt{-2 b \sqrt{b^2-4 a c}+4 c (a+c)-2 b^2}}\right )}{\sqrt{b^2-4 a c} \sqrt{-b \sqrt{b^2-4 a c}+2 c (a+c)-b^2}}+\frac{\sqrt{2} c \left (b \sqrt{b^2-4 a c}-2 a c+b^2\right ) \tanh ^{-1}\left (\frac{\tan \left (\frac{x}{2}\right ) \left (\sqrt{b^2-4 a c}-b+2 c\right )}{\sqrt{2 b \sqrt{b^2-4 a c}+4 c (a+c)-2 b^2}}\right )}{\sqrt{b^2-4 a c} \sqrt{b \sqrt{b^2-4 a c}+2 c (a+c)-b^2}}+\frac{a \sin \left (\frac{x}{2}\right )}{\cos \left (\frac{x}{2}\right )-\sin \left (\frac{x}{2}\right )}+\frac{a \sin \left (\frac{x}{2}\right )}{\sin \left (\frac{x}{2}\right )+\cos \left (\frac{x}{2}\right )}+b \log \left (\cos \left (\frac{x}{2}\right )-\sin \left (\frac{x}{2}\right )\right )-b \log \left (\sin \left (\frac{x}{2}\right )+\cos \left (\frac{x}{2}\right )\right )}{a^2}$

Antiderivative was successfully veriﬁed.

[In]

Integrate[Sec[x]^2/(a + b*Cos[x] + c*Cos[x]^2),x]

[Out]

(-((Sqrt[2]*c*(-b^2 + 2*a*c + b*Sqrt[b^2 - 4*a*c])*ArcTanh[((b - 2*c + Sqrt[b^2 - 4*a*c])*Tan[x/2])/Sqrt[-2*b^
2 + 4*c*(a + c) - 2*b*Sqrt[b^2 - 4*a*c]]])/(Sqrt[b^2 - 4*a*c]*Sqrt[-b^2 + 2*c*(a + c) - b*Sqrt[b^2 - 4*a*c]]))
+ (Sqrt[2]*c*(b^2 - 2*a*c + b*Sqrt[b^2 - 4*a*c])*ArcTanh[((-b + 2*c + Sqrt[b^2 - 4*a*c])*Tan[x/2])/Sqrt[-2*b^
2 + 4*c*(a + c) + 2*b*Sqrt[b^2 - 4*a*c]]])/(Sqrt[b^2 - 4*a*c]*Sqrt[-b^2 + 2*c*(a + c) + b*Sqrt[b^2 - 4*a*c]])
+ b*Log[Cos[x/2] - Sin[x/2]] - b*Log[Cos[x/2] + Sin[x/2]] + (a*Sin[x/2])/(Cos[x/2] - Sin[x/2]) + (a*Sin[x/2])/
(Cos[x/2] + Sin[x/2]))/a^2

________________________________________________________________________________________

Maple [B]  time = 0.065, size = 2530, normalized size = 9.2 \begin{align*} \text{result too large to display} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

int(sec(x)^2/(a+b*cos(x)+c*cos(x)^2),x)

[Out]

-c/(a-b+c)/(((-4*a*c+b^2)^(1/2)+a-c)*(a-b+c))^(1/2)*arctan((a-b+c)*tan(1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2)^(1/2)-a+c)*(a-b+c))^(1/2))*c^2+2/a^2/(-4*a*c+b^2)^(1/2)/(a
-b+c)/(((-4*a*c+b^2)^(1/2)+a-c)*(a-b+c))^(1/2)*arctan((a-b+c)*tan(1/2*x)/(((-4*a*c+b^2)^(1/2)+a-c)*(a-b+c))^(1
/2))*b^3*c-2/a^2/(-4*a*c+b^2)^(1/2)/(a-b+c)/(((-4*a*c+b^2)^(1/2)-a+c)*(a-b+c))^(1/2)*arctanh((-a+b-c)*tan(1/2*
x)/(((-4*a*c+b^2)^(1/2)-a+c)*(a-b+c))^(1/2))*b^3*c-1/a^2/(-4*a*c+b^2)^(1/2)/(a-b+c)/(((-4*a*c+b^2)^(1/2)+a-c)*
(a-b+c))^(1/2)*arctan((a-b+c)*tan(1/2*x)/(((-4*a*c+b^2)^(1/2)+a-c)*(a-b+c))^(1/2))*b^2*c^2+1/a^2/(-4*a*c+b^2)^
(1/2)/(a-b+c)/(((-4*a*c+b^2)^(1/2)-a+c)*(a-b+c))^(1/2)*arctanh((-a+b-c)*tan(1/2*x)/(((-4*a*c+b^2)^(1/2)-a+c)*(
a-b+c))^(1/2))*b^2*c^2-1/a^2/(a-b+c)/(((-4*a*c+b^2)^(1/2)+a-c)*(a-b+c))^(1/2)*arctan((a-b+c)*tan(1/2*x)/(((-4*
a*c+b^2)^(1/2)+a-c)*(a-b+c))^(1/2))*b^3-1/a^2/(a-b+c)/(((-4*a*c+b^2)^(1/2)-a+c)*(a-b+c))^(1/2)*arctanh((-a+b-c
)*tan(1/2*x)/(((-4*a*c+b^2)^(1/2)-a+c)*(a-b+c))^(1/2))*b^3

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{result too large to display} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^2/(a+b*cos(x)+c*cos(x)^2),x, algorithm="maxima")

[Out]

1/2*(2*(a^2*cos(2*x)^2 + a^2*sin(2*x)^2 + 2*a^2*cos(2*x) + a^2)*integrate(2*(2*b^2*c*cos(3*x)^2 + 2*b^2*c*cos(
x)^2 + 2*b^2*c*sin(3*x)^2 + 2*b^2*c*sin(x)^2 + b*c^2*cos(x) + 4*(2*a*b^2 - a*c^2 - (2*a^2 - b^2)*c)*cos(2*x)^2
+ 4*(2*a*b^2 - a*c^2 - (2*a^2 - b^2)*c)*sin(2*x)^2 + 2*(2*b^3 + b*c^2)*sin(2*x)*sin(x) + (b*c^2*cos(3*x) + b*
c^2*cos(x) + 2*(b^2*c - a*c^2)*cos(2*x))*cos(4*x) + (4*b^2*c*cos(x) + b*c^2 + 2*(2*b^3 + b*c^2)*cos(2*x))*cos(
3*x) + 2*(b^2*c - a*c^2 + (2*b^3 + b*c^2)*cos(x))*cos(2*x) + (b*c^2*sin(3*x) + b*c^2*sin(x) + 2*(b^2*c - a*c^2
)*sin(2*x))*sin(4*x) + 2*(2*b^2*c*sin(x) + (2*b^3 + b*c^2)*sin(2*x))*sin(3*x))/(a^2*c^2*cos(4*x)^2 + 4*a^2*b^2
*cos(3*x)^2 + 4*a^2*b^2*cos(x)^2 + a^2*c^2*sin(4*x)^2 + 4*a^2*b^2*sin(3*x)^2 + 4*a^2*b^2*sin(x)^2 + 4*a^2*b*c*
cos(x) + a^2*c^2 + 4*(4*a^4 + 4*a^3*c + a^2*c^2)*cos(2*x)^2 + 4*(4*a^4 + 4*a^3*c + a^2*c^2)*sin(2*x)^2 + 8*(2*
a^3*b + a^2*b*c)*sin(2*x)*sin(x) + 2*(2*a^2*b*c*cos(3*x) + 2*a^2*b*c*cos(x) + a^2*c^2 + 2*(2*a^3*c + a^2*c^2)*
cos(2*x))*cos(4*x) + 4*(2*a^2*b^2*cos(x) + a^2*b*c + 2*(2*a^3*b + a^2*b*c)*cos(2*x))*cos(3*x) + 4*(2*a^3*c + a
^2*c^2 + 2*(2*a^3*b + a^2*b*c)*cos(x))*cos(2*x) + 4*(a^2*b*c*sin(3*x) + a^2*b*c*sin(x) + (2*a^3*c + a^2*c^2)*s
in(2*x))*sin(4*x) + 8*(a^2*b^2*sin(x) + (2*a^3*b + a^2*b*c)*sin(2*x))*sin(3*x)), x) - (b*cos(2*x)^2 + b*sin(2*
x)^2 + 2*b*cos(2*x) + b)*log(cos(x)^2 + sin(x)^2 + 2*sin(x) + 1) + (b*cos(2*x)^2 + b*sin(2*x)^2 + 2*b*cos(2*x)
+ b)*log(cos(x)^2 + sin(x)^2 - 2*sin(x) + 1) + 4*a*sin(2*x))/(a^2*cos(2*x)^2 + a^2*sin(2*x)^2 + 2*a^2*cos(2*x
) + a^2)

________________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^2/(a+b*cos(x)+c*cos(x)^2),x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sec ^{2}{\left (x \right )}}{a + b \cos{\left (x \right )} + c \cos ^{2}{\left (x \right )}}\, dx \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)**2/(a+b*cos(x)+c*cos(x)**2),x)

[Out]

Integral(sec(x)**2/(a + b*cos(x) + c*cos(x)**2), x)

________________________________________________________________________________________

Giac [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^2/(a+b*cos(x)+c*cos(x)^2),x, algorithm="giac")

[Out]

Timed out