3.70 \(\int \frac {(-A^2-B^2) \cos ^2(z)}{B (1-\frac {(A^2+B^2) \sin ^2(z)}{B^2})} \, dz\)

Optimal. Leaf size=16 \[ -A \tanh ^{-1}\left (\frac {A \tan (z)}{B}\right )-B z \]

[Out]

-B*z-A*arctanh(A*tan(z)/B)

________________________________________________________________________________________

Rubi [A]  time = 0.09, antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.128, Rules used = {12, 3191, 391, 203, 206} \[ -A \tanh ^{-1}\left (\frac {A \tan (z)}{B}\right )-B z \]

Antiderivative was successfully verified.

[In]

Int[((-A^2 - B^2)*Cos[z]^2)/(B*(1 - ((A^2 + B^2)*Sin[z]^2)/B^2)),z]

[Out]

-(B*z) - A*ArcTanh[(A*Tan[z])/B]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 391

Int[1/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x^n),
 x], x] - Dist[d/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0]

Rule 3191

Int[cos[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = FreeF
actors[Tan[e + f*x], x]}, Dist[ff/f, Subst[Int[(a + (a + b)*ff^2*x^2)^p/(1 + ff^2*x^2)^(m/2 + p + 1), x], x, T
an[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[m/2] && IntegerQ[p]

Rubi steps

\begin {align*} \int \frac {\left (-A^2-B^2\right ) \cos ^2(z)}{B \left (1-\frac {\left (A^2+B^2\right ) \sin ^2(z)}{B^2}\right )} \, dz &=-\frac {\left (A^2+B^2\right ) \int \frac {\cos ^2(z)}{1-\frac {\left (A^2+B^2\right ) \sin ^2(z)}{B^2}} \, dz}{B}\\ &=-\frac {\left (A^2+B^2\right ) \operatorname {Subst}\left (\int \frac {1}{\left (1+z^2\right ) \left (1+\left (1-\frac {A^2+B^2}{B^2}\right ) z^2\right )} \, dz,z,\tan (z)\right )}{B}\\ &=-\frac {A^2 \operatorname {Subst}\left (\int \frac {1}{1+\left (1-\frac {A^2+B^2}{B^2}\right ) z^2} \, dz,z,\tan (z)\right )}{B}-B \operatorname {Subst}\left (\int \frac {1}{1+z^2} \, dz,z,\tan (z)\right )\\ &=-B z-A \tanh ^{-1}\left (\frac {A \tan (z)}{B}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 0.10, size = 35, normalized size = 2.19 \[ -\frac {B \left (A^2+B^2\right ) \left (A \tanh ^{-1}\left (\frac {A \tan (z)}{B}\right )+B z\right )}{A^2 B+B^3} \]

Antiderivative was successfully verified.

[In]

Integrate[((-A^2 - B^2)*Cos[z]^2)/(B*(1 - ((A^2 + B^2)*Sin[z]^2)/B^2)),z]

[Out]

-((B*(A^2 + B^2)*(B*z + A*ArcTanh[(A*Tan[z])/B]))/(A^2*B + B^3))

________________________________________________________________________________________

fricas [B]  time = 0.49, size = 67, normalized size = 4.19 \[ -B z - \frac {1}{4} \, A \log \left (2 \, A B \cos \relax (z) \sin \relax (z) - {\left (A^{2} - B^{2}\right )} \cos \relax (z)^{2} + A^{2}\right ) + \frac {1}{4} \, A \log \left (-2 \, A B \cos \relax (z) \sin \relax (z) - {\left (A^{2} - B^{2}\right )} \cos \relax (z)^{2} + A^{2}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-A^2-B^2)*cos(z)^2/B/(1-(A^2+B^2)*sin(z)^2/B^2),z, algorithm="fricas")

[Out]

-B*z - 1/4*A*log(2*A*B*cos(z)*sin(z) - (A^2 - B^2)*cos(z)^2 + A^2) + 1/4*A*log(-2*A*B*cos(z)*sin(z) - (A^2 - B
^2)*cos(z)^2 + A^2)

________________________________________________________________________________________

giac [B]  time = 1.23, size = 83, normalized size = 5.19 \[ -\frac {{\left (\frac {A^{3} B \log \left ({\left | A \tan \relax (z) + B \right |}\right )}{A^{4} + A^{2} B^{2}} - \frac {A^{3} B \log \left ({\left | A \tan \relax (z) - B \right |}\right )}{A^{4} + A^{2} B^{2}} + \frac {2 \, B^{2} z}{A^{2} + B^{2}}\right )} {\left (A^{2} + B^{2}\right )}}{2 \, B} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-A^2-B^2)*cos(z)^2/B/(1-(A^2+B^2)*sin(z)^2/B^2),z, algorithm="giac")

[Out]

-1/2*(A^3*B*log(abs(A*tan(z) + B))/(A^4 + A^2*B^2) - A^3*B*log(abs(A*tan(z) - B))/(A^4 + A^2*B^2) + 2*B^2*z/(A
^2 + B^2))*(A^2 + B^2)/B

________________________________________________________________________________________

maple [B]  time = 0.07, size = 127, normalized size = 7.94 \[ \frac {A^{3} \ln \left (A \tan \relax (z )-B \right )}{2 A^{2}+2 B^{2}}-\frac {A^{3} \ln \left (A \tan \relax (z )+B \right )}{2 \left (A^{2}+B^{2}\right )}-\frac {A^{2} B \arctan \left (\tan \relax (z )\right )}{A^{2}+B^{2}}+\frac {A \,B^{2} \ln \left (A \tan \relax (z )-B \right )}{2 A^{2}+2 B^{2}}-\frac {A \,B^{2} \ln \left (A \tan \relax (z )+B \right )}{2 \left (A^{2}+B^{2}\right )}-\frac {B^{3} \arctan \left (\tan \relax (z )\right )}{A^{2}+B^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-A^2-B^2)*cos(z)^2/B/(1-(A^2+B^2)*sin(z)^2/B^2),z)

[Out]

-1/2*A^3/(A^2+B^2)*ln(A*tan(z)+B)-1/2*A*B^2/(A^2+B^2)*ln(A*tan(z)+B)+1/2*A^3/(A^2+B^2)*ln(A*tan(z)-B)+1/2*A*B^
2/(A^2+B^2)*ln(A*tan(z)-B)-B/(A^2+B^2)*arctan(tan(z))*A^2-1/(A^2+B^2)*arctan(tan(z))*B^3

________________________________________________________________________________________

maxima [B]  time = 1.51, size = 69, normalized size = 4.31 \[ -\frac {{\left (A^{2} + B^{2}\right )} {\left (\frac {2 \, B^{2} z}{A^{2} + B^{2}} + \frac {A B \log \left (A \tan \relax (z) + B\right )}{A^{2} + B^{2}} - \frac {A B \log \left (A \tan \relax (z) - B\right )}{A^{2} + B^{2}}\right )}}{2 \, B} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-A^2-B^2)*cos(z)^2/B/(1-(A^2+B^2)*sin(z)^2/B^2),z, algorithm="maxima")

[Out]

-1/2*(A^2 + B^2)*(2*B^2*z/(A^2 + B^2) + A*B*log(A*tan(z) + B)/(A^2 + B^2) - A*B*log(A*tan(z) - B)/(A^2 + B^2))
/B

________________________________________________________________________________________

mupad [B]  time = 0.50, size = 360, normalized size = 22.50 \[ -A\,\mathrm {atanh}\left (\frac {2\,A^{13}\,\mathrm {tan}\relax (z)}{2\,A^{12}\,B+6\,A^{10}\,B^3+6\,A^8\,B^5+2\,A^6\,B^7}+\frac {2\,A^7\,B^6\,\mathrm {tan}\relax (z)}{2\,A^{12}\,B+6\,A^{10}\,B^3+6\,A^8\,B^5+2\,A^6\,B^7}+\frac {6\,A^9\,B^4\,\mathrm {tan}\relax (z)}{2\,A^{12}\,B+6\,A^{10}\,B^3+6\,A^8\,B^5+2\,A^6\,B^7}+\frac {6\,A^{11}\,B^2\,\mathrm {tan}\relax (z)}{2\,A^{12}\,B+6\,A^{10}\,B^3+6\,A^8\,B^5+2\,A^6\,B^7}\right )-B\,\mathrm {atan}\left (\frac {2\,A^4\,B^9\,\mathrm {tan}\relax (z)}{2\,A^{10}\,B^3+6\,A^8\,B^5+6\,A^6\,B^7+2\,A^4\,B^9}+\frac {6\,A^6\,B^7\,\mathrm {tan}\relax (z)}{2\,A^{10}\,B^3+6\,A^8\,B^5+6\,A^6\,B^7+2\,A^4\,B^9}+\frac {6\,A^8\,B^5\,\mathrm {tan}\relax (z)}{2\,A^{10}\,B^3+6\,A^8\,B^5+6\,A^6\,B^7+2\,A^4\,B^9}+\frac {2\,A^{10}\,B^3\,\mathrm {tan}\relax (z)}{2\,A^{10}\,B^3+6\,A^8\,B^5+6\,A^6\,B^7+2\,A^4\,B^9}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((cos(z)^2*(A^2 + B^2))/(B*((sin(z)^2*(A^2 + B^2))/B^2 - 1)),z)

[Out]

- A*atanh((2*A^13*tan(z))/(2*A^12*B + 2*A^6*B^7 + 6*A^8*B^5 + 6*A^10*B^3) + (2*A^7*B^6*tan(z))/(2*A^12*B + 2*A
^6*B^7 + 6*A^8*B^5 + 6*A^10*B^3) + (6*A^9*B^4*tan(z))/(2*A^12*B + 2*A^6*B^7 + 6*A^8*B^5 + 6*A^10*B^3) + (6*A^1
1*B^2*tan(z))/(2*A^12*B + 2*A^6*B^7 + 6*A^8*B^5 + 6*A^10*B^3)) - B*atan((2*A^4*B^9*tan(z))/(2*A^4*B^9 + 6*A^6*
B^7 + 6*A^8*B^5 + 2*A^10*B^3) + (6*A^6*B^7*tan(z))/(2*A^4*B^9 + 6*A^6*B^7 + 6*A^8*B^5 + 2*A^10*B^3) + (6*A^8*B
^5*tan(z))/(2*A^4*B^9 + 6*A^6*B^7 + 6*A^8*B^5 + 2*A^10*B^3) + (2*A^10*B^3*tan(z))/(2*A^4*B^9 + 6*A^6*B^7 + 6*A
^8*B^5 + 2*A^10*B^3))

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-A**2-B**2)*cos(z)**2/B/(1-(A**2+B**2)*sin(z)**2/B**2),z)

[Out]

Timed out

________________________________________________________________________________________