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.09, antiderivative size = 15, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, 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 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 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]

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.01, size = 15, normalized size = 1.00 \[ \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

________________________________________________________________________________________

fricas [A]  time = 0.61, size = 19, normalized size = 1.27 \[ \frac {b x \sin \relax (x) - a \cos \relax (x)}{c \sin \relax (x)} \]

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

________________________________________________________________________________________

giac [A]  time = 0.15, size = 29, normalized size = 1.93 \[ \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 )} \]

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

________________________________________________________________________________________

maple [A]  time = 0.11, size = 20, normalized size = 1.33 \[ -\frac {a}{c \tan \relax (x )}+\frac {b \arctan \left (\tan \relax (x )\right )}{c} \]

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 = 0.42, size = 17, normalized size = 1.13 \[ \frac {b x}{c} - \frac {a}{c \tan \relax (x)} \]

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

________________________________________________________________________________________

mupad [B]  time = 2.31, size = 13, normalized size = 0.87 \[ \frac {b\,x-a\,\mathrm {cot}\relax (x)}{c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [B]  time = 1.18, size = 24, normalized size = 1.60 \[ \frac {a \tan {\left (\frac {x}{2} \right )}}{2 c} - \frac {a}{2 c \tan {\left (\frac {x}{2} \right )}} + \frac {b x}{c} \]

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

________________________________________________________________________________________