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

Optimal. Leaf size=16 \[ \frac {\sin (a+b x) \cos (a+b x)}{b} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 3, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {4380, 2635, 8} \[ \frac {\sin (a+b x) \cos (a+b x)}{b} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(Cos[a + b*x]*Sin[a + b*x])/b

Rule 8

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

Rule 2635

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Sin[c + d*x])^(n - 1))/(d*n),
x] + Dist[(b^2*(n - 1))/n, Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integer
Q[2*n]

Rule 4380

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [B]  time = 0.01, size = 33, normalized size = 2.06 \[ \frac {\sin (2 a) \cos (2 b x)}{2 b}+\frac {\cos (2 a) \sin (2 b x)}{2 b} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(Cos[2*b*x]*Sin[2*a])/(2*b) + (Cos[2*a]*Sin[2*b*x])/(2*b)

________________________________________________________________________________________

fricas [A]  time = 0.55, size = 16, normalized size = 1.00 \[ \frac {\cos \left (b x + a\right ) \sin \left (b x + a\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.18, size = 14, normalized size = 0.88 \[ \frac {\sin \left (2 \, b x + 2 \, a\right )}{2 \, b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*sin(2*b*x + 2*a)/b

________________________________________________________________________________________

maple [A]  time = 0.23, size = 17, normalized size = 1.06 \[ \frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.33, size = 22, normalized size = 1.38 \[ \frac {\tan \left (b x + a\right )}{{\left (\tan \left (b x + a\right )^{2} + 1\right )} b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

tan(b*x + a)/((tan(b*x + a)^2 + 1)*b)

________________________________________________________________________________________

mupad [B]  time = 3.03, size = 14, normalized size = 0.88 \[ \frac {\sin \left (2\,a+2\,b\,x\right )}{2\,b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

sin(2*a + 2*b*x)/(2*b)

________________________________________________________________________________________

sympy [B]  time = 0.25, size = 32, normalized size = 2.00 \[ \frac {\sin {\left (a + b x \right )} \cos {\left (a + b x \right )}}{b \sin ^{2}{\left (a + b x \right )} + b \cos ^{2}{\left (a + b x \right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________