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

Optimal. Leaf size=205 $-\frac{b \left (b^2-2 c (a+c)\right ) \log \left (a+b \cos (x)+c \cos ^2(x)\right )}{2 \left (a^2+2 a c-b^2+c^2\right )^2}+\frac{\left (-2 b^2 c (2 a+c)+2 c^2 (a+c)^2+b^4\right ) \tanh ^{-1}\left (\frac{b+2 c \cos (x)}{\sqrt{b^2-4 a c}}\right )}{\sqrt{b^2-4 a c} \left (a^2+2 a c-b^2+c^2\right )^2}+\frac{(a+2 b+3 c) \log (1-\cos (x))}{4 (a+b+c)^2}-\frac{(a-2 b+3 c) \log (\cos (x)+1)}{4 (a-b+c)^2}+\frac{\csc ^2(x) (b-(a+c) \cos (x))}{2 (a-b+c) (a+b+c)}$

[Out]

((b^4 + 2*c^2*(a + c)^2 - 2*b^2*c*(2*a + c))*ArcTanh[(b + 2*c*Cos[x])/Sqrt[b^2 - 4*a*c]])/(Sqrt[b^2 - 4*a*c]*(
a^2 - b^2 + 2*a*c + c^2)^2) + ((b - (a + c)*Cos[x])*Csc[x]^2)/(2*(a - b + c)*(a + b + c)) + ((a + 2*b + 3*c)*L
og[1 - Cos[x]])/(4*(a + b + c)^2) - ((a - 2*b + 3*c)*Log[1 + Cos[x]])/(4*(a - b + c)^2) - (b*(b^2 - 2*c*(a + c
))*Log[a + b*Cos[x] + c*Cos[x]^2])/(2*(a^2 - b^2 + 2*a*c + c^2)^2)

________________________________________________________________________________________

Rubi [A]  time = 0.464729, antiderivative size = 205, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 9, integrand size = 19, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.474, Rules used = {3259, 976, 1074, 634, 618, 206, 628, 633, 31} $-\frac{b \left (b^2-2 c (a+c)\right ) \log \left (a+b \cos (x)+c \cos ^2(x)\right )}{2 \left (a^2+2 a c-b^2+c^2\right )^2}+\frac{\left (-2 b^2 c (2 a+c)+2 c^2 (a+c)^2+b^4\right ) \tanh ^{-1}\left (\frac{b+2 c \cos (x)}{\sqrt{b^2-4 a c}}\right )}{\sqrt{b^2-4 a c} \left (a^2+2 a c-b^2+c^2\right )^2}+\frac{(a+2 b+3 c) \log (1-\cos (x))}{4 (a+b+c)^2}-\frac{(a-2 b+3 c) \log (\cos (x)+1)}{4 (a-b+c)^2}+\frac{\csc ^2(x) (b-(a+c) \cos (x))}{2 (a-b+c) (a+b+c)}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

((b^4 + 2*c^2*(a + c)^2 - 2*b^2*c*(2*a + c))*ArcTanh[(b + 2*c*Cos[x])/Sqrt[b^2 - 4*a*c]])/(Sqrt[b^2 - 4*a*c]*(
a^2 - b^2 + 2*a*c + c^2)^2) + ((b - (a + c)*Cos[x])*Csc[x]^2)/(2*(a - b + c)*(a + b + c)) + ((a + 2*b + 3*c)*L
og[1 - Cos[x]])/(4*(a + b + c)^2) - ((a - 2*b + 3*c)*Log[1 + Cos[x]])/(4*(a - b + c)^2) - (b*(b^2 - 2*c*(a + c
))*Log[a + b*Cos[x] + c*Cos[x]^2])/(2*(a^2 - b^2 + 2*a*c + c^2)^2)

Rule 3259

Int[((a_.) + (b_.)*(cos[(d_.) + (e_.)*(x_)]*(f_.))^(n_.) + (c_.)*(cos[(d_.) + (e_.)*(x_)]*(f_.))^(n2_.))^(p_.)
*sin[(d_.) + (e_.)*(x_)]^(m_.), x_Symbol] :> Module[{g = FreeFactors[Cos[d + e*x], x]}, -Dist[g/e, Subst[Int[(
1 - g^2*x^2)^((m - 1)/2)*(a + b*(f*g*x)^n + c*(f*g*x)^(2*n))^p, x], x, Cos[d + e*x]/g], x]] /; FreeQ[{a, b, c,
d, e, f, n, p}, x] && EqQ[n2, 2*n] && IntegerQ[(m - 1)/2]

Rule 976

Int[((a_.) + (c_.)*(x_)^2)^(p_)*((d_.) + (e_.)*(x_) + (f_.)*(x_)^2)^(q_), x_Symbol] :> Simp[((2*a*c^2*e + c*(2
*c^2*d - c*(2*a*f))*x)*(a + c*x^2)^(p + 1)*(d + e*x + f*x^2)^(q + 1))/((-4*a*c)*(a*c*e^2 + (c*d - a*f)^2)*(p +
1)), x] - Dist[1/((-4*a*c)*(a*c*e^2 + (c*d - a*f)^2)*(p + 1)), Int[(a + c*x^2)^(p + 1)*(d + e*x + f*x^2)^q*Si
mp[2*c*((c*d - a*f)^2 - (-(a*e))*(c*e))*(p + 1) - (2*c^2*d - c*(2*a*f))*(a*f*(p + 1) - c*d*(p + 2)) - e*(-2*a*
c^2*e)*(p + q + 2) + (2*f*(2*a*c^2*e)*(p + q + 2) - (2*c^2*d - c*(2*a*f))*(-(c*e*(2*p + q + 4))))*x + c*f*(2*c
^2*d - c*(2*a*f))*(2*p + 2*q + 5)*x^2, x], x], x] /; FreeQ[{a, c, d, e, f, q}, x] && NeQ[e^2 - 4*d*f, 0] && Lt
Q[p, -1] && NeQ[a*c*e^2 + (c*d - a*f)^2, 0] &&  !( !IntegerQ[p] && ILtQ[q, -1]) &&  !IGtQ[q, 0]

Rule 1074

Int[((A_.) + (B_.)*(x_) + (C_.)*(x_)^2)/(((a_) + (b_.)*(x_) + (c_.)*(x_)^2)*((d_) + (f_.)*(x_)^2)), x_Symbol]
:> With[{q = c^2*d^2 + b^2*d*f - 2*a*c*d*f + a^2*f^2}, Dist[1/q, Int[(A*c^2*d - a*c*C*d + A*b^2*f - a*b*B*f -
a*A*c*f + a^2*C*f + c*(B*c*d - b*C*d + A*b*f - a*B*f)*x)/(a + b*x + c*x^2), x], x] + Dist[1/q, Int[(c*C*d^2 +
b*B*d*f - A*c*d*f - a*C*d*f + a*A*f^2 - f*(B*c*d - b*C*d + A*b*f - a*B*f)*x)/(d + f*x^2), x], x] /; NeQ[q, 0]]
/; FreeQ[{a, b, c, d, f, A, B, C}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

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 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 633

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> With[{q = Rt[-(a*c), 2]}, Dist[e/2 + (c*d)/(2*q),
Int[1/(-q + c*x), x], x] + Dist[e/2 - (c*d)/(2*q), Int[1/(q + c*x), x], x]] /; FreeQ[{a, c, d, e}, x] && NiceS
qrtQ[-(a*c)]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rubi steps

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

Mathematica [C]  time = 2.18477, size = 392, normalized size = 1.91 $\frac{1}{8} \left (-\frac{4 \left (b^3 \sqrt{b^2-4 a c}-2 b^2 c (2 a+c)-2 b c (a+c) \sqrt{b^2-4 a c}+2 c^2 (a+c)^2+b^4\right ) \log \left (\sqrt{b^2-4 a c}-b-2 c \cos (x)\right )}{\sqrt{b^2-4 a c} \left (a^2+2 a c-b^2+c^2\right )^2}-\frac{4 \left (b^3 \sqrt{b^2-4 a c}+2 b^2 c (2 a+c)-2 b c (a+c) \sqrt{b^2-4 a c}-2 c^2 (a+c)^2-b^4\right ) \log \left (\sqrt{b^2-4 a c}+b+2 c \cos (x)\right )}{\sqrt{b^2-4 a c} \left (a^2+2 a c-b^2+c^2\right )^2}+\frac{16 i x \left (b^3-2 b c (a+c)\right )}{(a-b+c)^2 (a+b+c)^2}+\frac{4 i \tan ^{-1}(\tan (x)) (a-2 b+3 c)}{(a-b+c)^2}-\frac{4 i \tan ^{-1}(\tan (x)) (a+2 b+3 c)}{(a+b+c)^2}-\frac{\csc ^2\left (\frac{x}{2}\right )}{a+b+c}+\frac{\sec ^2\left (\frac{x}{2}\right )}{a-b+c}+\frac{2 (a+2 b+3 c) \log \left (\sin ^2\left (\frac{x}{2}\right )\right )}{(a+b+c)^2}-\frac{2 (a-2 b+3 c) \log \left (\cos ^2\left (\frac{x}{2}\right )\right )}{(a-b+c)^2}\right )$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(((16*I)*(b^3 - 2*b*c*(a + c))*x)/((a - b + c)^2*(a + b + c)^2) + ((4*I)*(a - 2*b + 3*c)*ArcTan[Tan[x]])/(a -
b + c)^2 - ((4*I)*(a + 2*b + 3*c)*ArcTan[Tan[x]])/(a + b + c)^2 - Csc[x/2]^2/(a + b + c) - (2*(a - 2*b + 3*c)*
Log[Cos[x/2]^2])/(a - b + c)^2 - (4*(b^4 + 2*c^2*(a + c)^2 - 2*b^2*c*(2*a + c) + b^3*Sqrt[b^2 - 4*a*c] - 2*b*c
*(a + c)*Sqrt[b^2 - 4*a*c])*Log[-b + Sqrt[b^2 - 4*a*c] - 2*c*Cos[x]])/(Sqrt[b^2 - 4*a*c]*(a^2 - b^2 + 2*a*c +
c^2)^2) - (4*(-b^4 - 2*c^2*(a + c)^2 + 2*b^2*c*(2*a + c) + b^3*Sqrt[b^2 - 4*a*c] - 2*b*c*(a + c)*Sqrt[b^2 - 4*
a*c])*Log[b + Sqrt[b^2 - 4*a*c] + 2*c*Cos[x]])/(Sqrt[b^2 - 4*a*c]*(a^2 - b^2 + 2*a*c + c^2)^2) + (2*(a + 2*b +
3*c)*Log[Sin[x/2]^2])/(a + b + c)^2 + Sec[x/2]^2/(a - b + c))/8

________________________________________________________________________________________

Maple [B]  time = 0.046, size = 546, normalized size = 2.7 \begin{align*} \text{result too large to display} \end{align*}

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

[In]

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

[Out]

1/(4*a-4*b+4*c)/(1+cos(x))-1/4/(a-b+c)^2*ln(1+cos(x))*a+1/2/(a-b+c)^2*ln(1+cos(x))*b-3/4/(a-b+c)^2*ln(1+cos(x)
)*c+1/(a-b+c)^2/(a+b+c)^2*c*ln(a+b*cos(x)+c*cos(x)^2)*a*b-1/2/(a-b+c)^2/(a+b+c)^2*ln(a+b*cos(x)+c*cos(x)^2)*b^
3+1/(a-b+c)^2/(a+b+c)^2*c^2*ln(a+b*cos(x)+c*cos(x)^2)*b-2/(a-b+c)^2/(a+b+c)^2/(4*a*c-b^2)^(1/2)*arctan((b+2*c*
cos(x))/(4*a*c-b^2)^(1/2))*a^2*c^2+4/(a-b+c)^2/(a+b+c)^2/(4*a*c-b^2)^(1/2)*arctan((b+2*c*cos(x))/(4*a*c-b^2)^(
1/2))*a*b^2*c-4/(a-b+c)^2/(a+b+c)^2/(4*a*c-b^2)^(1/2)*arctan((b+2*c*cos(x))/(4*a*c-b^2)^(1/2))*a*c^3-1/(a-b+c)
^2/(a+b+c)^2/(4*a*c-b^2)^(1/2)*arctan((b+2*c*cos(x))/(4*a*c-b^2)^(1/2))*b^4+2/(a-b+c)^2/(a+b+c)^2/(4*a*c-b^2)^
(1/2)*arctan((b+2*c*cos(x))/(4*a*c-b^2)^(1/2))*b^2*c^2-2/(a-b+c)^2/(a+b+c)^2/(4*a*c-b^2)^(1/2)*arctan((b+2*c*c
os(x))/(4*a*c-b^2)^(1/2))*c^4+1/(4*a+4*b+4*c)/(cos(x)-1)+1/4/(a+b+c)^2*ln(cos(x)-1)*a+1/2/(a+b+c)^2*ln(cos(x)-
1)*b+3/4/(a+b+c)^2*ln(cos(x)-1)*c

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

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

[In]

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

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 66.7878, size = 4351, normalized size = 21.22 \begin{align*} \text{result too large to display} \end{align*}

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

[In]

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

[Out]

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

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.15003, size = 510, normalized size = 2.49 \begin{align*} -\frac{{\left (b^{3} - 2 \, a b c - 2 \, b c^{2}\right )} \log \left (c \cos \left (x\right )^{2} + b \cos \left (x\right ) + a\right )}{2 \,{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4} + 4 \, a^{3} c - 4 \, a b^{2} c + 6 \, a^{2} c^{2} - 2 \, b^{2} c^{2} + 4 \, a c^{3} + c^{4}\right )}} - \frac{{\left (a - 2 \, b + 3 \, c\right )} \log \left (\cos \left (x\right ) + 1\right )}{4 \,{\left (a^{2} - 2 \, a b + b^{2} + 2 \, a c - 2 \, b c + c^{2}\right )}} + \frac{{\left (a + 2 \, b + 3 \, c\right )} \log \left (-\cos \left (x\right ) + 1\right )}{4 \,{\left (a^{2} + 2 \, a b + b^{2} + 2 \, a c + 2 \, b c + c^{2}\right )}} - \frac{{\left (b^{4} - 4 \, a b^{2} c + 2 \, a^{2} c^{2} - 2 \, b^{2} c^{2} + 4 \, a c^{3} + 2 \, c^{4}\right )} \arctan \left (\frac{2 \, c \cos \left (x\right ) + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4} + 4 \, a^{3} c - 4 \, a b^{2} c + 6 \, a^{2} c^{2} - 2 \, b^{2} c^{2} + 4 \, a c^{3} + c^{4}\right )} \sqrt{-b^{2} + 4 \, a c}} - \frac{a^{2} b - b^{3} + 2 \, a b c + b c^{2} -{\left (a^{3} - a b^{2} + 3 \, a^{2} c - b^{2} c + 3 \, a c^{2} + c^{3}\right )} \cos \left (x\right )}{2 \,{\left (a + b + c\right )}^{2}{\left (a - b + c\right )}^{2}{\left (\cos \left (x\right ) + 1\right )}{\left (\cos \left (x\right ) - 1\right )}} \end{align*}

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

[In]

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

[Out]

-1/2*(b^3 - 2*a*b*c - 2*b*c^2)*log(c*cos(x)^2 + b*cos(x) + a)/(a^4 - 2*a^2*b^2 + b^4 + 4*a^3*c - 4*a*b^2*c + 6
*a^2*c^2 - 2*b^2*c^2 + 4*a*c^3 + c^4) - 1/4*(a - 2*b + 3*c)*log(cos(x) + 1)/(a^2 - 2*a*b + b^2 + 2*a*c - 2*b*c
+ c^2) + 1/4*(a + 2*b + 3*c)*log(-cos(x) + 1)/(a^2 + 2*a*b + b^2 + 2*a*c + 2*b*c + c^2) - (b^4 - 4*a*b^2*c +
2*a^2*c^2 - 2*b^2*c^2 + 4*a*c^3 + 2*c^4)*arctan((2*c*cos(x) + b)/sqrt(-b^2 + 4*a*c))/((a^4 - 2*a^2*b^2 + b^4 +
4*a^3*c - 4*a*b^2*c + 6*a^2*c^2 - 2*b^2*c^2 + 4*a*c^3 + c^4)*sqrt(-b^2 + 4*a*c)) - 1/2*(a^2*b - b^3 + 2*a*b*c
+ b*c^2 - (a^3 - a*b^2 + 3*a^2*c - b^2*c + 3*a*c^2 + c^3)*cos(x))/((a + b + c)^2*(a - b + c)^2*(cos(x) + 1)*(
cos(x) - 1))