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.06, antiderivative size = 14, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, 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 8

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

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

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

________________________________________________________________________________________

fricas [A]  time = 1.08, size = 18, normalized size = 1.29 \[ \frac {b x \cos \relax (x) + a \sin \relax (x)}{c \cos \relax (x)} \]

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

________________________________________________________________________________________

giac [A]  time = 0.15, size = 23, normalized size = 1.64 \[ \frac {b \arctan \left (\frac {{\left | c \right |} \tan \relax (x)}{c}\right )}{{\left | c \right |}} + \frac {a \tan \relax (x)}{c} \]

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

________________________________________________________________________________________

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

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 = 0.43, size = 14, normalized size = 1.00 \[ \frac {b x}{c} + \frac {a \tan \relax (x)}{c} \]

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

________________________________________________________________________________________

mupad [B]  time = 2.31, size = 12, normalized size = 0.86 \[ \frac {b\,x+a\,\mathrm {tan}\relax (x)}{c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [B]  time = 1.33, size = 51, normalized size = 3.64 \[ - \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} \]

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)

________________________________________________________________________________________