3.213 \(\int \frac{a+b \cos ^2(x)}{c-c \sin ^2(x)} \, dx\)

Optimal. Leaf size=14 \[ \frac{a \tan (x)}{c}+\frac{b x}{c} \]

[Out]

(b*x)/c + (a*Tan[x])/c

________________________________________________________________________________________

Rubi [A]  time = 0.0576156, antiderivative size = 14, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.15, Rules used = {3175, 3012, 8} \[ \frac{a \tan (x)}{c}+\frac{b x}{c} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(b*x)/c + (a*Tan[x])/c

Rule 3175

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Dist[a^p, Int[ActivateTrig[u*cos[e + f*x
]^(2*p)], x], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0] && IntegerQ[p]

Rule 3012

Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(A*Cos[e
+ f*x]*(b*Sin[e + f*x])^(m + 1))/(b*f*(m + 1)), x] + Dist[(A*(m + 2) + C*(m + 1))/(b^2*(m + 1)), Int[(b*Sin[e
+ f*x])^(m + 2), x], x] /; FreeQ[{b, e, f, A, C}, x] && LtQ[m, -1]

Rule 8

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

Rubi steps

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

Mathematica [A]  time = 0.0121171, size = 14, normalized size = 1. \[ \frac{a \tan (x)}{c}+\frac{b x}{c} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(b*x)/c + (a*Tan[x])/c

________________________________________________________________________________________

Maple [A]  time = 0.029, size = 17, normalized size = 1.2 \begin{align*}{\frac{a\tan \left ( x \right ) }{c}}+{\frac{b\arctan \left ( \tan \left ( x \right ) \right ) }{c}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

a*tan(x)/c+1/c*b*arctan(tan(x))

________________________________________________________________________________________

Maxima [A]  time = 1.52015, size = 19, normalized size = 1.36 \begin{align*} \frac{b x}{c} + \frac{a \tan \left (x\right )}{c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

b*x/c + a*tan(x)/c

________________________________________________________________________________________

Fricas [A]  time = 2.44106, size = 49, normalized size = 3.5 \begin{align*} \frac{b x \cos \left (x\right ) + a \sin \left (x\right )}{c \cos \left (x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(b*x*cos(x) + a*sin(x))/(c*cos(x))

________________________________________________________________________________________

Sympy [B]  time = 2.20449, size = 51, normalized size = 3.64 \begin{align*} - \frac{2 a \tan{\left (\frac{x}{2} \right )}}{c \tan ^{2}{\left (\frac{x}{2} \right )} - c} + \frac{b x \tan ^{2}{\left (\frac{x}{2} \right )}}{c \tan ^{2}{\left (\frac{x}{2} \right )} - c} - \frac{b x}{c \tan ^{2}{\left (\frac{x}{2} \right )} - c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*a*tan(x/2)/(c*tan(x/2)**2 - c) + b*x*tan(x/2)**2/(c*tan(x/2)**2 - c) - b*x/(c*tan(x/2)**2 - c)

________________________________________________________________________________________

Giac [A]  time = 1.13976, size = 31, normalized size = 2.21 \begin{align*} \frac{b \arctan \left (\frac{{\left | c \right |} \tan \left (x\right )}{c}\right )}{{\left | c \right |}} + \frac{a \tan \left (x\right )}{c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

b*arctan(abs(c)*tan(x)/c)/abs(c) + a*tan(x)/c