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

Optimal. Leaf size=15 \[ \frac{b x}{c}-\frac{a \cot (x)}{c} \]

[Out]

(b*x)/c - (a*Cot[x])/c

________________________________________________________________________________________

Rubi [A]  time = 0.0890223, antiderivative size = 15, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.1, Rules used = {453, 205} \[ \frac{b x}{c}-\frac{a \cot (x)}{c} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(b*x)/c - (a*Cot[x])/c

Rule 453

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(c*(e*x)^(m
+ 1)*(a + b*x^n)^(p + 1))/(a*e*(m + 1)), x] + Dist[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(a*e^n*(m + 1)), In
t[(e*x)^(m + n)*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[b*c - a*d, 0] && (IntegerQ[n] ||
GtQ[e, 0]) && ((GtQ[n, 0] && LtQ[m, -1]) || (LtQ[n, 0] && GtQ[m + n, -1])) &&  !ILtQ[p, -1]

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

Mathematica [A]  time = 0.0129729, size = 15, normalized size = 1. \[ \frac{b x}{c}-\frac{a \cot (x)}{c} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(b*x)/c - (a*Cot[x])/c

________________________________________________________________________________________

Maple [A]  time = 0.031, size = 20, normalized size = 1.3 \begin{align*} -{\frac{a}{c\tan \left ( x \right ) }}+{\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*sin(x)^2)/(c-c*cos(x)^2),x)

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.56041, size = 23, normalized size = 1.53 \begin{align*} \frac{b x}{c} - \frac{a}{c \tan \left (x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.16905, size = 39, normalized size = 2.6 \begin{align*} \frac{b x}{c} + \frac{a \tan \left (\frac{1}{2} \, x\right )}{2 \, c} - \frac{a}{2 \, c \tan \left (\frac{1}{2} \, x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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