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]

ln(cos(b*x+a))/b+1/5*ln(1+tan(b*x+a))/b-4/5*ln(2-(-5^(1/2)+1)*tan(b*x+a)+2*tan(b*x+a)^2)/b/(-5^(1/2)+1)-4/5*ln
(2-(5^(1/2)+1)*tan(b*x+a)+2*tan(b*x+a)^2)/b/(5^(1/2)+1)

________________________________________________________________________________________

Rubi [A]  time = 0.70, antiderivative size = 120, normalized size of antiderivative = 1.00, 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 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 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]

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

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.57, 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)

________________________________________________________________________________________

fricas [A]  time = 0.89, size = 150, normalized size = 1.25 \[ \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} \]

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

________________________________________________________________________________________

giac [A]  time = 0.53, size = 128, normalized size = 1.07 \[ -\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} \]

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

________________________________________________________________________________________

maple [A]  time = 0.74, size = 184, normalized size = 1.53 \[ \frac {\ln \left (\tan \left (b x +a \right ) \sqrt {5}+2 \left (\tan ^{2}\left (b x +a \right )\right )-\tan \left (b x +a \right )+2\right ) \sqrt {5}}{5 b}+\frac {\ln \left (\tan \left (b x +a \right ) \sqrt {5}+2 \left (\tan ^{2}\left (b x +a \right )\right )-\tan \left (b x +a \right )+2\right )}{5 b}-\frac {\ln \left (-\tan \left (b x +a \right ) \sqrt {5}+2 \left (\tan ^{2}\left (b x +a \right )\right )-\tan \left (b x +a \right )+2\right ) \sqrt {5}}{5 b}+\frac {\ln \left (-\tan \left (b x +a \right ) \sqrt {5}+2 \left (\tan ^{2}\left (b x +a \right )\right )-\tan \left (b x +a \right )+2\right )}{5 b}-\frac {\ln \left (1+\tan ^{2}\left (b x +a \right )\right )}{2 b}+\frac {\ln \left (1+\tan \left (b x +a \right )\right )}{5 b} \]

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/2/b*ln(1+tan(b*x+a)^2)+1/5*ln(1+tan(b*x+a))/b

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \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} \]

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)

________________________________________________________________________________________

mupad [B]  time = 4.22, size = 226, normalized size = 1.88 \[ \frac {\ln \left ({\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )}^2-2\,\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )-1\right )}{5\,b}-\frac {\ln \left ({\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )}^2+1\right )}{b}+\frac {\ln \left (2\,{\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )}^2-\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )+{\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )}^3+{\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )}^4+\sqrt {5}\,\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )-\sqrt {5}\,{\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )}^3+1\right )\,\left (\sqrt {5}+1\right )}{5\,b}-\frac {\ln \left (2\,{\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )}^2-\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )+{\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )}^3+{\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )}^4-\sqrt {5}\,\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )+\sqrt {5}\,{\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )}^3+1\right )\,\left (\sqrt {5}-1\right )}{5\,b} \]

Verification of antiderivative is not currently implemented for this CAS.

[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(tan(a/2 + (b*x)/2)^2 - 2*tan(a/2 + (b*x)/2) - 1)/(5*b) - log(tan(a/2 + (b*x)/2)^2 + 1)/b + (log(2*tan(a/2
+ (b*x)/2)^2 - tan(a/2 + (b*x)/2) + tan(a/2 + (b*x)/2)^3 + tan(a/2 + (b*x)/2)^4 + 5^(1/2)*tan(a/2 + (b*x)/2) -
 5^(1/2)*tan(a/2 + (b*x)/2)^3 + 1)*(5^(1/2) + 1))/(5*b) - (log(2*tan(a/2 + (b*x)/2)^2 - tan(a/2 + (b*x)/2) + t
an(a/2 + (b*x)/2)^3 + tan(a/2 + (b*x)/2)^4 - 5^(1/2)*tan(a/2 + (b*x)/2) + 5^(1/2)*tan(a/2 + (b*x)/2)^3 + 1)*(5
^(1/2) - 1))/(5*b)

________________________________________________________________________________________

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((cos(b*x+a)**5-sin(b*x+a)**5)/(cos(b*x+a)**5+sin(b*x+a)**5),x)

[Out]

Timed out

________________________________________________________________________________________