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

Optimal. Leaf size=120 \[ -\frac{4 \log \left (2 \tan ^2(a+b x)-\left (1-\sqrt{5}\right ) \tan (a+b x)+2\right )}{5 \left (1-\sqrt{5}\right ) b}-\frac{4 \log \left (2 \tan ^2(a+b x)-\left (1+\sqrt{5}\right ) \tan (a+b x)+2\right )}{5 \left (1+\sqrt{5}\right ) b}+\frac{\log (\tan (a+b x)+1)}{5 b}+\frac{\log (\cos (a+b x))}{b} \]

[Out]

Log[Cos[a + b*x]]/b + Log[1 + Tan[a + b*x]]/(5*b) - (4*Log[2 - (1 - Sqrt[5])*Tan[a + b*x] + 2*Tan[a + b*x]^2])
/(5*(1 - Sqrt[5])*b) - (4*Log[2 - (1 + Sqrt[5])*Tan[a + b*x] + 2*Tan[a + b*x]^2])/(5*(1 + Sqrt[5])*b)

________________________________________________________________________________________

Rubi [A]  time = 0.701148, antiderivative size = 120, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 4, integrand size = 39, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.103, Rules used = {2074, 260, 2086, 628} \[ -\frac{4 \log \left (2 \tan ^2(a+b x)-\left (1-\sqrt{5}\right ) \tan (a+b x)+2\right )}{5 \left (1-\sqrt{5}\right ) b}-\frac{4 \log \left (2 \tan ^2(a+b x)-\left (1+\sqrt{5}\right ) \tan (a+b x)+2\right )}{5 \left (1+\sqrt{5}\right ) b}+\frac{\log (\tan (a+b x)+1)}{5 b}+\frac{\log (\cos (a+b x))}{b} \]

Antiderivative was successfully verified.

[In]

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

[Out]

Log[Cos[a + b*x]]/b + Log[1 + Tan[a + b*x]]/(5*b) - (4*Log[2 - (1 - Sqrt[5])*Tan[a + b*x] + 2*Tan[a + b*x]^2])
/(5*(1 - Sqrt[5])*b) - (4*Log[2 - (1 + Sqrt[5])*Tan[a + b*x] + 2*Tan[a + b*x]^2])/(5*(1 + Sqrt[5])*b)

Rule 2074

Int[(P_)^(p_)*(Q_)^(q_.), x_Symbol] :> With[{PP = Factor[P]}, Int[ExpandIntegrand[PP^p*Q^q, x], x] /;  !SumQ[N
onfreeFactors[PP, x]]] /; FreeQ[q, x] && PolyQ[P, x] && PolyQ[Q, x] && IntegerQ[p] && NeQ[P, x]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 2086

Int[(P3_)/((a_) + (b_.)*(x_) + (c_.)*(x_)^2 + (d_.)*(x_)^3 + (e_.)*(x_)^4), x_Symbol] :> With[{q = Sqrt[8*a^2
+ b^2 - 4*a*c], A = Coeff[P3, x, 0], B = Coeff[P3, x, 1], C = Coeff[P3, x, 2], D = Coeff[P3, x, 3]}, Dist[1/q,
 Int[(b*A - 2*a*B + 2*a*D + A*q + (2*a*A - 2*a*C + b*D + D*q)*x)/(2*a + (b + q)*x + 2*a*x^2), x], x] - Dist[1/
q, Int[(b*A - 2*a*B + 2*a*D - A*q + (2*a*A - 2*a*C + b*D - D*q)*x)/(2*a + (b - q)*x + 2*a*x^2), x], x]] /; Fre
eQ[{a, b, c}, x] && PolyQ[P3, x, 3] && EqQ[a, e] && EqQ[b, d]

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{\cos ^5(a+b x)-\sin ^5(a+b x)}{\cos ^5(a+b x)+\sin ^5(a+b x)} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{1-x^5}{1+x^2+x^5+x^7} \, dx,x,\tan (a+b x)\right )}{b}\\ &=\frac{\operatorname{Subst}\left (\int \left (\frac{1}{5 (1+x)}-\frac{x}{1+x^2}+\frac{2 \left (2+x-4 x^2+2 x^3\right )}{5 \left (1-x+x^2-x^3+x^4\right )}\right ) \, dx,x,\tan (a+b x)\right )}{b}\\ &=\frac{\log (1+\tan (a+b x))}{5 b}+\frac{2 \operatorname{Subst}\left (\int \frac{2+x-4 x^2+2 x^3}{1-x+x^2-x^3+x^4} \, dx,x,\tan (a+b x)\right )}{5 b}-\frac{\operatorname{Subst}\left (\int \frac{x}{1+x^2} \, dx,x,\tan (a+b x)\right )}{b}\\ &=\frac{\log (\cos (a+b x))}{b}+\frac{\log (1+\tan (a+b x))}{5 b}-\frac{2 \operatorname{Subst}\left (\int \frac{-2 \sqrt{5}+\left (10-2 \sqrt{5}\right ) x}{2+\left (-1-\sqrt{5}\right ) x+2 x^2} \, dx,x,\tan (a+b x)\right )}{5 \sqrt{5} b}+\frac{2 \operatorname{Subst}\left (\int \frac{2 \sqrt{5}+\left (10+2 \sqrt{5}\right ) x}{2+\left (-1+\sqrt{5}\right ) x+2 x^2} \, dx,x,\tan (a+b x)\right )}{5 \sqrt{5} b}\\ &=\frac{\log (\cos (a+b x))}{b}+\frac{\log (1+\tan (a+b x))}{5 b}-\frac{4 \log \left (2-\left (1-\sqrt{5}\right ) \tan (a+b x)+2 \tan ^2(a+b x)\right )}{5 \left (1-\sqrt{5}\right ) b}-\frac{4 \log \left (2-\left (1+\sqrt{5}\right ) \tan (a+b x)+2 \tan ^2(a+b x)\right )}{5 \left (1+\sqrt{5}\right ) b}\\ \end{align*}

Mathematica [A]  time = 0.594612, size = 73, normalized size = 0.61 \[ \frac{-\left (\sqrt{5}-1\right ) \log \left (\sin (2 (a+b x))-\sqrt{5}+1\right )+\left (1+\sqrt{5}\right ) \log \left (\sin (2 (a+b x))+\sqrt{5}+1\right )+\log (\sin (a+b x)+\cos (a+b x))}{5 b} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(Log[Cos[a + b*x] + Sin[a + b*x]] - (-1 + Sqrt[5])*Log[1 - Sqrt[5] + Sin[2*(a + b*x)]] + (1 + Sqrt[5])*Log[1 +
 Sqrt[5] + Sin[2*(a + b*x)]])/(5*b)

________________________________________________________________________________________

Maple [A]  time = 0.211, size = 184, normalized size = 1.5 \begin{align*}{\frac{\ln \left ( \tan \left ( bx+a \right ) \sqrt{5}+2\, \left ( \tan \left ( bx+a \right ) \right ) ^{2}-\tan \left ( bx+a \right ) +2 \right ) \sqrt{5}}{5\,b}}+{\frac{\ln \left ( \tan \left ( bx+a \right ) \sqrt{5}+2\, \left ( \tan \left ( bx+a \right ) \right ) ^{2}-\tan \left ( bx+a \right ) +2 \right ) }{5\,b}}-{\frac{\ln \left ( -\tan \left ( bx+a \right ) \sqrt{5}+2\, \left ( \tan \left ( bx+a \right ) \right ) ^{2}-\tan \left ( bx+a \right ) +2 \right ) \sqrt{5}}{5\,b}}+{\frac{\ln \left ( -\tan \left ( bx+a \right ) \sqrt{5}+2\, \left ( \tan \left ( bx+a \right ) \right ) ^{2}-\tan \left ( bx+a \right ) +2 \right ) }{5\,b}}+{\frac{\ln \left ( 1+\tan \left ( bx+a \right ) \right ) }{5\,b}}-{\frac{\ln \left ( 1+ \left ( \tan \left ( bx+a \right ) \right ) ^{2} \right ) }{2\,b}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/5/b*ln(tan(b*x+a)*5^(1/2)+2*tan(b*x+a)^2-tan(b*x+a)+2)*5^(1/2)+1/5/b*ln(tan(b*x+a)*5^(1/2)+2*tan(b*x+a)^2-ta
n(b*x+a)+2)-1/5/b*ln(-tan(b*x+a)*5^(1/2)+2*tan(b*x+a)^2-tan(b*x+a)+2)*5^(1/2)+1/5/b*ln(-tan(b*x+a)*5^(1/2)+2*t
an(b*x+a)^2-tan(b*x+a)+2)+1/5*ln(1+tan(b*x+a))/b-1/2/b*ln(1+tan(b*x+a)^2)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cos \left (b x + a\right )^{5} - \sin \left (b x + a\right )^{5}}{\cos \left (b x + a\right )^{5} + \sin \left (b x + a\right )^{5}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 2.41077, size = 405, normalized size = 3.38 \begin{align*} \frac{2 \, \sqrt{5} \log \left (-\frac{2 \, \cos \left (b x + a\right )^{4} - 2 \,{\left (\sqrt{5} + 1\right )} \cos \left (b x + a\right ) \sin \left (b x + a\right ) - 2 \, \cos \left (b x + a\right )^{2} - \sqrt{5} - 3}{\cos \left (b x + a\right )^{4} - \cos \left (b x + a\right )^{2} - \cos \left (b x + a\right ) \sin \left (b x + a\right ) + 1}\right ) + 2 \, \log \left (\cos \left (b x + a\right )^{4} - \cos \left (b x + a\right )^{2} - \cos \left (b x + a\right ) \sin \left (b x + a\right ) + 1\right ) + \log \left (2 \, \cos \left (b x + a\right ) \sin \left (b x + a\right ) + 1\right )}{10 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/10*(2*sqrt(5)*log(-(2*cos(b*x + a)^4 - 2*(sqrt(5) + 1)*cos(b*x + a)*sin(b*x + a) - 2*cos(b*x + a)^2 - sqrt(5
) - 3)/(cos(b*x + a)^4 - cos(b*x + a)^2 - cos(b*x + a)*sin(b*x + a) + 1)) + 2*log(cos(b*x + a)^4 - cos(b*x + a
)^2 - cos(b*x + a)*sin(b*x + a) + 1) + log(2*cos(b*x + a)*sin(b*x + a) + 1))/b

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.25929, size = 173, normalized size = 1.44 \begin{align*} -\frac{2 \, \sqrt{5} \log \left (-\frac{1}{2} \,{\left (\sqrt{5} + 1\right )} \tan \left (b x + a\right ) + \tan \left (b x + a\right )^{2} + 1\right ) - 2 \, \sqrt{5} \log \left (\frac{1}{2} \,{\left (\sqrt{5} - 1\right )} \tan \left (b x + a\right ) + \tan \left (b x + a\right )^{2} + 1\right ) - 2 \, \log \left (\tan \left (b x + a\right )^{4} - \tan \left (b x + a\right )^{3} + \tan \left (b x + a\right )^{2} - \tan \left (b x + a\right ) + 1\right ) + 5 \, \log \left (\tan \left (b x + a\right )^{2} + 1\right ) - 2 \, \log \left ({\left | \tan \left (b x + a\right ) + 1 \right |}\right )}{10 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/10*(2*sqrt(5)*log(-1/2*(sqrt(5) + 1)*tan(b*x + a) + tan(b*x + a)^2 + 1) - 2*sqrt(5)*log(1/2*(sqrt(5) - 1)*t
an(b*x + a) + tan(b*x + a)^2 + 1) - 2*log(tan(b*x + a)^4 - tan(b*x + a)^3 + tan(b*x + a)^2 - tan(b*x + a) + 1)
 + 5*log(tan(b*x + a)^2 + 1) - 2*log(abs(tan(b*x + a) + 1)))/b