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

Optimal. Leaf size=230 $\frac{2 \left (1-\frac{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 )}{\sqrt{-\sqrt{b^2-4 a c}+b-2 c} \sqrt{-\sqrt{b^2-4 a c}+b+2 c}}+\frac{2 \left (\frac{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 )}{\sqrt{\sqrt{b^2-4 a c}+b-2 c} \sqrt{\sqrt{b^2-4 a c}+b+2 c}}$

[Out]

(2*(1 - 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]]])/(Sqrt[b - 2*c - Sqrt[b^2 - 4*a*c]]*Sqrt[b + 2*c - Sqrt[b^2 - 4*a*c]]) + (2*(1 + b/Sqrt[b^2 - 4*a*c])*Ar
cTan[(Sqrt[b - 2*c + Sqrt[b^2 - 4*a*c]]*Tan[x/2])/Sqrt[b + 2*c + Sqrt[b^2 - 4*a*c]]])/(Sqrt[b - 2*c + Sqrt[b^2
- 4*a*c]]*Sqrt[b + 2*c + Sqrt[b^2 - 4*a*c]])

________________________________________________________________________________________

Rubi [A]  time = 0.546158, antiderivative size = 230, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 3, integrand size = 17, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.176, Rules used = {3257, 2659, 205} $\frac{2 \left (1-\frac{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 )}{\sqrt{-\sqrt{b^2-4 a c}+b-2 c} \sqrt{-\sqrt{b^2-4 a c}+b+2 c}}+\frac{2 \left (\frac{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 )}{\sqrt{\sqrt{b^2-4 a c}+b-2 c} \sqrt{\sqrt{b^2-4 a c}+b+2 c}}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(2*(1 - 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]]])/(Sqrt[b - 2*c - Sqrt[b^2 - 4*a*c]]*Sqrt[b + 2*c - Sqrt[b^2 - 4*a*c]]) + (2*(1 + b/Sqrt[b^2 - 4*a*c])*Ar
cTan[(Sqrt[b - 2*c + Sqrt[b^2 - 4*a*c]]*Tan[x/2])/Sqrt[b + 2*c + Sqrt[b^2 - 4*a*c]]])/(Sqrt[b - 2*c + Sqrt[b^2
- 4*a*c]]*Sqrt[b + 2*c + Sqrt[b^2 - 4*a*c]])

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

Rubi steps

\begin{align*} \int \frac{\cos (x)}{a+b \cos (x)+c \cos ^2(x)} \, dx &=\int \left (\frac{1-\frac{b}{\sqrt{b^2-4 a c}}}{b-\sqrt{b^2-4 a c}+2 c \cos (x)}+\frac{1+\frac{b}{\sqrt{b^2-4 a c}}}{b+\sqrt{b^2-4 a c}+2 c \cos (x)}\right ) \, dx\\ &=\left (1-\frac{b}{\sqrt{b^2-4 a c}}\right ) \int \frac{1}{b-\sqrt{b^2-4 a c}+2 c \cos (x)} \, dx+\left (1+\frac{b}{\sqrt{b^2-4 a c}}\right ) \int \frac{1}{b+\sqrt{b^2-4 a c}+2 c \cos (x)} \, dx\\ &=\left (2 \left (1-\frac{b}{\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 )+\left (2 \left (1+\frac{b}{\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 )\\ &=\frac{2 \left (1-\frac{b}{\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 )}{\sqrt{b-2 c-\sqrt{b^2-4 a c}} \sqrt{b+2 c-\sqrt{b^2-4 a c}}}+\frac{2 \left (1+\frac{b}{\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 )}{\sqrt{b-2 c+\sqrt{b^2-4 a c}} \sqrt{b+2 c+\sqrt{b^2-4 a c}}}\\ \end{align*}

Mathematica [A]  time = 0.570758, size = 227, normalized size = 0.99 $\frac{\sqrt{2} \left (\frac{\left (\sqrt{b^2-4 a c}-b\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 \sqrt{b^2-4 a c}+2 c (a+c)-b^2}}-\frac{\left (\sqrt{b^2-4 a c}+b\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 \sqrt{b^2-4 a c}+2 c (a+c)-b^2}}\right )}{\sqrt{b^2-4 a c}}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(Sqrt[2]*(-(((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 + 2*c*(a + c) - b*Sqrt[b^2 - 4*a*c]]) + ((-b + Sqrt[b^2 - 4*a*c])*ArcTa
nh[((-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 +
2*c*(a + c) + b*Sqrt[b^2 - 4*a*c]]))/Sqrt[b^2 - 4*a*c]

________________________________________________________________________________________

Maple [B]  time = 0.036, size = 1264, normalized size = 5.5 \begin{align*} \text{result too large to display} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

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

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

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B]  time = 3.45143, size = 7050, normalized size = 30.65 \begin{align*} \text{result too large to display} \end{align*}

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

[In]

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

[Out]

-1/4*sqrt(2)*sqrt(-(2*a^2 - b^2 + 2*a*c - (a^2*b^2 - b^4 - 4*a*c^3 - (8*a^2 - b^2)*c^2 - 2*(2*a^3 - 3*a*b^2)*c
)*sqrt(b^2/(a^4*b^2 - 2*a^2*b^4 + b^6 - 4*a*c^5 - (16*a^2 - b^2)*c^4 - 12*(2*a^3 - a*b^2)*c^3 - 2*(8*a^4 - 11*
a^2*b^2 + b^4)*c^2 - 4*(a^5 - 3*a^3*b^2 + 2*a*b^4)*c)))/(a^2*b^2 - b^4 - 4*a*c^3 - (8*a^2 - b^2)*c^2 - 2*(2*a^
3 - 3*a*b^2)*c))*log(a*b^2*cos(x) + 2*a*b*c + (a^3*b^2 - a*b^4 - 4*a^2*c^3 - (8*a^3 - a*b^2)*c^2 - 2*(2*a^4 -
3*a^2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2 - 4*(a^5 - 3*a^3*b^2 + 2*a*b^4)*c))*sin(x) - (a
*b^3 - 4*a*b*c^2 - (4*a^2*b - b^3)*c)*sin(x))*sqrt(-(2*a^2 - b^2 + 2*a*c + (a^2*b^2 - b^4 - 4*a*c^3 - (8*a^2 -
b^2)*c^2 - 2*(2*a^3 - 3*a*b^2)*c)*sqrt(b^2/(a^4*b^2 - 2*a^2*b^4 + b^6 - 4*a*c^5 - (16*a^2 - b^2)*c^4 - 12*(2*
a^3 - a*b^2)*c^3 - 2*(8*a^4 - 11*a^2*b^2 + b^4)*c^2 - 4*(a^5 - 3*a^3*b^2 + 2*a*b^4)*c)))/(a^2*b^2 - b^4 - 4*a*
c^3 - (8*a^2 - b^2)*c^2 - 2*(2*a^3 - 3*a*b^2)*c)))

________________________________________________________________________________________

Sympy [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(cos(x)/(a+b*cos(x)+c*cos(x)**2),x)

[Out]

Timed out

________________________________________________________________________________________

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(cos(x)/(a+b*cos(x)+c*cos(x)^2),x, algorithm="giac")

[Out]

Timed out