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

Optimal. Leaf size=334 $-\frac{2 c \left (\sqrt{b^2-4 a c} \left (b^2-a c\right )-3 a b c+b^3\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^3 \sqrt{b^2-4 a c} \sqrt{-\sqrt{b^2-4 a c}+b-2 c} \sqrt{-\sqrt{b^2-4 a c}+b+2 c}}+\frac{2 c \left (-\sqrt{b^2-4 a c} \left (b^2-a c\right )-3 a b c+b^3\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^3 \sqrt{b^2-4 a c} \sqrt{\sqrt{b^2-4 a c}+b-2 c} \sqrt{\sqrt{b^2-4 a c}+b+2 c}}+\frac{\left (b^2-a c\right ) \tanh ^{-1}(\sin (x))}{a^3}-\frac{b \tan (x)}{a^2}+\frac{\tanh ^{-1}(\sin (x))}{2 a}+\frac{\tan (x) \sec (x)}{2 a}$

[Out]

(-2*c*(b^3 - 3*a*b*c + Sqrt[b^2 - 4*a*c]*(b^2 - 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^3*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*c*(b^3 - 3*a*b*c - Sqrt[b^2 - 4*a*c]*(b^2 - 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^3*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]]) + ArcTanh[Sin[x]]/(2*a) + ((b^2 - a*c)*ArcTanh[Sin[x]])/a^3 - (b*Tan[x])/a^2 + (S
ec[x]*Tan[x])/(2*a)

________________________________________________________________________________________

Rubi [A]  time = 4.67385, antiderivative size = 334, normalized size of antiderivative = 1., number of steps used = 12, number of rules used = 8, integrand size = 19, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.421, Rules used = {3257, 3293, 2659, 205, 3770, 3767, 8, 3768} $-\frac{2 c \left (\sqrt{b^2-4 a c} \left (b^2-a c\right )-3 a b c+b^3\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^3 \sqrt{b^2-4 a c} \sqrt{-\sqrt{b^2-4 a c}+b-2 c} \sqrt{-\sqrt{b^2-4 a c}+b+2 c}}+\frac{2 c \left (-\sqrt{b^2-4 a c} \left (b^2-a c\right )-3 a b c+b^3\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^3 \sqrt{b^2-4 a c} \sqrt{\sqrt{b^2-4 a c}+b-2 c} \sqrt{\sqrt{b^2-4 a c}+b+2 c}}+\frac{\left (b^2-a c\right ) \tanh ^{-1}(\sin (x))}{a^3}-\frac{b \tan (x)}{a^2}+\frac{\tanh ^{-1}(\sin (x))}{2 a}+\frac{\tan (x) \sec (x)}{2 a}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(-2*c*(b^3 - 3*a*b*c + Sqrt[b^2 - 4*a*c]*(b^2 - 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^3*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*c*(b^3 - 3*a*b*c - Sqrt[b^2 - 4*a*c]*(b^2 - 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^3*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]]) + ArcTanh[Sin[x]]/(2*a) + ((b^2 - a*c)*ArcTanh[Sin[x]])/a^3 - (b*Tan[x])/a^2 + (S
ec[x]*Tan[x])/(2*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]

Rule 3768

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Csc[c + d*x])^(n - 1))/(d*(n -
1)), x] + Dist[(b^2*(n - 2))/(n - 1), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1
] && IntegerQ[2*n]

Rubi steps

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

Mathematica [A]  time = 2.89454, size = 446, normalized size = 1.34 $-\frac{2 \left (a^2-2 a c+2 b^2\right ) \log \left (\cos \left (\frac{x}{2}\right )-\sin \left (\frac{x}{2}\right )\right )-2 \left (a^2-2 a c+2 b^2\right ) \log \left (\sin \left (\frac{x}{2}\right )+\cos \left (\frac{x}{2}\right )\right )+\frac{a^2}{\sin (x)-1}+\frac{a^2}{\left (\sin \left (\frac{x}{2}\right )+\cos \left (\frac{x}{2}\right )\right )^2}+\frac{4 \sqrt{2} c \left (-b^2 \sqrt{b^2-4 a c}+a c \sqrt{b^2-4 a c}-3 a b c+b^3\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{4 \sqrt{2} c \left (b^2 \sqrt{b^2-4 a c}-a c \sqrt{b^2-4 a c}-3 a b c+b^3\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{4 a b \sin \left (\frac{x}{2}\right )}{\cos \left (\frac{x}{2}\right )-\sin \left (\frac{x}{2}\right )}+\frac{4 a b \sin \left (\frac{x}{2}\right )}{\sin \left (\frac{x}{2}\right )+\cos \left (\frac{x}{2}\right )}}{4 a^3}$

Warning: Unable to verify antiderivative.

[In]

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

[Out]

-((4*Sqrt[2]*c*(b^3 - 3*a*b*c - b^2*Sqrt[b^2 - 4*a*c] + a*c*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]]) + (4*Sqrt[2]*c*(b^3 - 3*a*b*c + b^2*Sqrt[b^2 - 4*a*c] - a*c*Sqrt[b^2 - 4*a*c])*Arc
Tanh[((-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]]) + 2*(a^2 + 2*b^2 - 2*a*c)*Log[Cos[x/2] - Sin[x/2]] -
2*(a^2 + 2*b^2 - 2*a*c)*Log[Cos[x/2] + Sin[x/2]] + (4*a*b*Sin[x/2])/(Cos[x/2] - Sin[x/2]) + a^2/(Cos[x/2] + Si
n[x/2])^2 + (4*a*b*Sin[x/2])/(Cos[x/2] + Sin[x/2]) + a^2/(-1 + Sin[x]))/(4*a^3)

________________________________________________________________________________________

Maple [B]  time = 0.076, size = 3476, normalized size = 10.4 \begin{align*} \text{output too large to display} \end{align*}

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

[In]

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

[Out]

-1/2/a/(tan(1/2*x)+1)^2+1/2/a/(tan(1/2*x)-1)^2+1/2/a/(tan(1/2*x)+1)+1/2/a/(tan(1/2*x)-1)+1/2/a*ln(tan(1/2*x)+1
)-1/2/a*ln(tan(1/2*x)-1)+4/a/(-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-4/a/(-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-1/a/(-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*c^2+1/a/(-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*c^2+2/a*b/(a-b+c)/(((-4*a*c+b^2)^(1/2)+a-c)*(a-b+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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))*c^3+1/a^3/(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^4+1/a^3/(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^4-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))*c^3-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)^3/(a+b*cos(x)+c*cos(x)^2),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

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

[Out]

Timed out

________________________________________________________________________________________

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

[Out]

Timed out