3.10.42 \(\int \frac {\cos ^5(a+b x)-\sin ^5(a+b x)}{\cos ^5(a+b x)+\sin ^5(a+b x)} \, dx\) [942]

3.10.42.1 Optimal result
3.10.42.2 Mathematica [A] (verified)
3.10.42.3 Rubi [A] (verified)
3.10.42.4 Maple [A] (verified)
3.10.42.5 Fricas [A] (verification not implemented)
3.10.42.6 Sympy [B] (verification not implemented)
3.10.42.7 Maxima [F]
3.10.42.8 Giac [A] (verification not implemented)
3.10.42.9 Mupad [B] (verification not implemented)

3.10.42.1 Optimal result

Integrand size = 39, antiderivative size = 120 \[ \int \frac {\cos ^5(a+b x)-\sin ^5(a+b x)}{\cos ^5(a+b x)+\sin ^5(a+b x)} \, dx=\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} \]

output
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)
 
3.10.42.2 Mathematica [A] (verified)

Time = 8.95 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.61 \[ \int \frac {\cos ^5(a+b x)-\sin ^5(a+b x)}{\cos ^5(a+b x)+\sin ^5(a+b x)} \, dx=\frac {\log (\cos (a+b x)+\sin (a+b x))-\left (-1+\sqrt {5}\right ) \log \left (1-\sqrt {5}+\sin (2 (a+b x))\right )+\left (1+\sqrt {5}\right ) \log \left (1+\sqrt {5}+\sin (2 (a+b x))\right )}{5 b} \]

input
Integrate[(Cos[a + b*x]^5 - Sin[a + b*x]^5)/(Cos[a + b*x]^5 + Sin[a + b*x] 
^5),x]
 
output
(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)
 
3.10.42.3 Rubi [A] (verified)

Time = 0.77 (sec) , antiderivative size = 119, normalized size of antiderivative = 0.99, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {3042, 4889, 2462, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4889

\(\displaystyle \frac {\int \frac {1-\tan ^5(a+b x)}{\tan ^7(a+b x)+\tan ^5(a+b x)+\tan ^2(a+b x)+1}d\tan (a+b x)}{b}\)

\(\Big \downarrow \) 2462

\(\displaystyle \frac {\int \left (-\frac {\tan (a+b x)}{\tan ^2(a+b x)+1}+\frac {1}{5 (\tan (a+b x)+1)}+\frac {2 \left (2 \tan ^3(a+b x)-4 \tan ^2(a+b x)+\tan (a+b x)+2\right )}{5 \left (\tan ^4(a+b x)-\tan ^3(a+b x)+\tan ^2(a+b x)-\tan (a+b x)+1\right )}\right )d\tan (a+b x)}{b}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {-\frac {1}{2} \log \left (\tan ^2(a+b x)+1\right )-\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 )}-\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 )}+\frac {1}{5} \log (\tan (a+b x)+1)}{b}\)

input
Int[(Cos[a + b*x]^5 - Sin[a + b*x]^5)/(Cos[a + b*x]^5 + Sin[a + b*x]^5),x]
 
output
(Log[1 + Tan[a + b*x]]/5 - Log[1 + Tan[a + b*x]^2]/2 - (4*Log[2 - (1 - Sqr 
t[5])*Tan[a + b*x] + 2*Tan[a + b*x]^2])/(5*(1 - Sqrt[5])) - (4*Log[2 - (1 
+ Sqrt[5])*Tan[a + b*x] + 2*Tan[a + b*x]^2])/(5*(1 + Sqrt[5])))/b
 

3.10.42.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2462
Int[(u_.)*(Px_)^(p_), x_Symbol] :> With[{Qx = Factor[Px]}, Int[ExpandIntegr 
and[u*Qx^p, x], x] /;  !SumQ[NonfreeFactors[Qx, x]]] /; PolyQ[Px, x] && GtQ 
[Expon[Px, x], 2] &&  !BinomialQ[Px, x] &&  !TrinomialQ[Px, x] && ILtQ[p, 0 
] && RationalFunctionQ[u, x]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4889
Int[u_, x_Symbol] :> With[{v = FunctionOfTrig[u, x]}, With[{d = FreeFactors 
[Tan[v], x]}, Simp[d/Coefficient[v, x, 1]   Subst[Int[SubstFor[1/(1 + d^2*x 
^2), Tan[v]/d, u, x], x], x, Tan[v]/d], x]] /;  !FalseQ[v] && FunctionOfQ[N 
onfreeFactors[Tan[v], x], u, x]] /; InverseFunctionFreeQ[u, x] &&  !MatchQ[ 
u, (v_.)*((c_.)*tan[w_]^(n_.)*tan[z_]^(n_.))^(p_.) /; FreeQ[{c, p}, x] && I 
ntegerQ[n] && LinearQ[w, x] && EqQ[z, 2*w]]
 
3.10.42.4 Maple [A] (verified)

Time = 1.42 (sec) , antiderivative size = 111, normalized size of antiderivative = 0.92

method result size
derivativedivides \(\frac {-\frac {4 \left (\frac {\sqrt {5}}{4}-\frac {1}{4}\right ) \ln \left (-\sqrt {5}\, \tan \left (x b +a \right )+2 \tan \left (x b +a \right )^{2}-\tan \left (x b +a \right )+2\right )}{5}+\frac {4 \left (\frac {\sqrt {5}}{4}+\frac {1}{4}\right ) \ln \left (\sqrt {5}\, \tan \left (x b +a \right )+2 \tan \left (x b +a \right )^{2}-\tan \left (x b +a \right )+2\right )}{5}+\frac {\ln \left (1+\tan \left (x b +a \right )\right )}{5}-\frac {\ln \left (1+\tan \left (x b +a \right )^{2}\right )}{2}}{b}\) \(111\)
default \(\frac {-\frac {4 \left (\frac {\sqrt {5}}{4}-\frac {1}{4}\right ) \ln \left (-\sqrt {5}\, \tan \left (x b +a \right )+2 \tan \left (x b +a \right )^{2}-\tan \left (x b +a \right )+2\right )}{5}+\frac {4 \left (\frac {\sqrt {5}}{4}+\frac {1}{4}\right ) \ln \left (\sqrt {5}\, \tan \left (x b +a \right )+2 \tan \left (x b +a \right )^{2}-\tan \left (x b +a \right )+2\right )}{5}+\frac {\ln \left (1+\tan \left (x b +a \right )\right )}{5}-\frac {\ln \left (1+\tan \left (x b +a \right )^{2}\right )}{2}}{b}\) \(111\)
risch \(-i x -\frac {2 i a}{b}+\frac {\ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+i\right )}{5 b}+\frac {\ln \left ({\mathrm e}^{4 i \left (x b +a \right )}+2 i \left (\sqrt {5}+1\right ) {\mathrm e}^{2 i \left (x b +a \right )}-1\right )}{5 b}+\frac {\ln \left ({\mathrm e}^{4 i \left (x b +a \right )}+2 i \left (\sqrt {5}+1\right ) {\mathrm e}^{2 i \left (x b +a \right )}-1\right ) \sqrt {5}}{5 b}+\frac {\ln \left ({\mathrm e}^{4 i \left (x b +a \right )}-2 i \left (\sqrt {5}-1\right ) {\mathrm e}^{2 i \left (x b +a \right )}-1\right )}{5 b}-\frac {\ln \left ({\mathrm e}^{4 i \left (x b +a \right )}-2 i \left (\sqrt {5}-1\right ) {\mathrm e}^{2 i \left (x b +a \right )}-1\right ) \sqrt {5}}{5 b}\) \(173\)

input
int((cos(b*x+a)^5-sin(b*x+a)^5)/(cos(b*x+a)^5+sin(b*x+a)^5),x,method=_RETU 
RNVERBOSE)
 
output
1/b*(-4/5*(1/4*5^(1/2)-1/4)*ln(-5^(1/2)*tan(b*x+a)+2*tan(b*x+a)^2-tan(b*x+ 
a)+2)+4/5*(1/4*5^(1/2)+1/4)*ln(5^(1/2)*tan(b*x+a)+2*tan(b*x+a)^2-tan(b*x+a 
)+2)+1/5*ln(1+tan(b*x+a))-1/2*ln(1+tan(b*x+a)^2))
 
3.10.42.5 Fricas [A] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.25 \[ \int \frac {\cos ^5(a+b x)-\sin ^5(a+b x)}{\cos ^5(a+b x)+\sin ^5(a+b x)} \, dx=\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} \]

input
integrate((cos(b*x+a)^5-sin(b*x+a)^5)/(cos(b*x+a)^5+sin(b*x+a)^5),x, algor 
ithm="fricas")
 
output
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
 
3.10.42.6 Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 379 vs. \(2 (100) = 200\).

Time = 84.52 (sec) , antiderivative size = 379, normalized size of antiderivative = 3.16 \[ \int \frac {\cos ^5(a+b x)-\sin ^5(a+b x)}{\cos ^5(a+b x)+\sin ^5(a+b x)} \, dx=\begin {cases} - \frac {47 \log {\left (\sin {\left (a + b x \right )} + \cos {\left (a + b x \right )} \right )}}{- 235 b + 105 \sqrt {5} b} + \frac {21 \sqrt {5} \log {\left (\sin {\left (a + b x \right )} + \cos {\left (a + b x \right )} \right )}}{- 235 b + 105 \sqrt {5} b} - \frac {26 \sqrt {5} \log {\left (16 \sin ^{2}{\left (a + b x \right )} - 8 \sin {\left (a + b x \right )} \cos {\left (a + b x \right )} + 8 \sqrt {5} \sin {\left (a + b x \right )} \cos {\left (a + b x \right )} + 16 \cos ^{2}{\left (a + b x \right )} \right )}}{- 235 b + 105 \sqrt {5} b} + \frac {58 \log {\left (16 \sin ^{2}{\left (a + b x \right )} - 8 \sin {\left (a + b x \right )} \cos {\left (a + b x \right )} + 8 \sqrt {5} \sin {\left (a + b x \right )} \cos {\left (a + b x \right )} + 16 \cos ^{2}{\left (a + b x \right )} \right )}}{- 235 b + 105 \sqrt {5} b} - \frac {152 \log {\left (16 \sin ^{2}{\left (a + b x \right )} - 8 \sqrt {5} \sin {\left (a + b x \right )} \cos {\left (a + b x \right )} - 8 \sin {\left (a + b x \right )} \cos {\left (a + b x \right )} + 16 \cos ^{2}{\left (a + b x \right )} \right )}}{- 235 b + 105 \sqrt {5} b} + \frac {68 \sqrt {5} \log {\left (16 \sin ^{2}{\left (a + b x \right )} - 8 \sqrt {5} \sin {\left (a + b x \right )} \cos {\left (a + b x \right )} - 8 \sin {\left (a + b x \right )} \cos {\left (a + b x \right )} + 16 \cos ^{2}{\left (a + b x \right )} \right )}}{- 235 b + 105 \sqrt {5} b} & \text {for}\: b \neq 0 \\\frac {x \left (- \sin ^{5}{\left (a \right )} + \cos ^{5}{\left (a \right )}\right )}{\sin ^{5}{\left (a \right )} + \cos ^{5}{\left (a \right )}} & \text {otherwise} \end {cases} \]

input
integrate((cos(b*x+a)**5-sin(b*x+a)**5)/(cos(b*x+a)**5+sin(b*x+a)**5),x)
 
output
Piecewise((-47*log(sin(a + b*x) + cos(a + b*x))/(-235*b + 105*sqrt(5)*b) + 
 21*sqrt(5)*log(sin(a + b*x) + cos(a + b*x))/(-235*b + 105*sqrt(5)*b) - 26 
*sqrt(5)*log(16*sin(a + b*x)**2 - 8*sin(a + b*x)*cos(a + b*x) + 8*sqrt(5)* 
sin(a + b*x)*cos(a + b*x) + 16*cos(a + b*x)**2)/(-235*b + 105*sqrt(5)*b) + 
 58*log(16*sin(a + b*x)**2 - 8*sin(a + b*x)*cos(a + b*x) + 8*sqrt(5)*sin(a 
 + b*x)*cos(a + b*x) + 16*cos(a + b*x)**2)/(-235*b + 105*sqrt(5)*b) - 152* 
log(16*sin(a + b*x)**2 - 8*sqrt(5)*sin(a + b*x)*cos(a + b*x) - 8*sin(a + b 
*x)*cos(a + b*x) + 16*cos(a + b*x)**2)/(-235*b + 105*sqrt(5)*b) + 68*sqrt( 
5)*log(16*sin(a + b*x)**2 - 8*sqrt(5)*sin(a + b*x)*cos(a + b*x) - 8*sin(a 
+ b*x)*cos(a + b*x) + 16*cos(a + b*x)**2)/(-235*b + 105*sqrt(5)*b), Ne(b, 
0)), (x*(-sin(a)**5 + cos(a)**5)/(sin(a)**5 + cos(a)**5), True))
 
3.10.42.7 Maxima [F]

\[ \int \frac {\cos ^5(a+b x)-\sin ^5(a+b x)}{\cos ^5(a+b x)+\sin ^5(a+b x)} \, dx=\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 } \]

input
integrate((cos(b*x+a)^5-sin(b*x+a)^5)/(cos(b*x+a)^5+sin(b*x+a)^5),x, algor 
ithm="maxima")
 
output
integrate((cos(b*x + a)^5 - sin(b*x + a)^5)/(cos(b*x + a)^5 + sin(b*x + a) 
^5), x)
 
3.10.42.8 Giac [A] (verification not implemented)

Time = 0.48 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.07 \[ \int \frac {\cos ^5(a+b x)-\sin ^5(a+b x)}{\cos ^5(a+b x)+\sin ^5(a+b x)} \, dx=-\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} \]

input
integrate((cos(b*x+a)^5-sin(b*x+a)^5)/(cos(b*x+a)^5+sin(b*x+a)^5),x, algor 
ithm="giac")
 
output
-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)*tan(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
 
3.10.42.9 Mupad [B] (verification not implemented)

Time = 28.34 (sec) , antiderivative size = 226, normalized size of antiderivative = 1.88 \[ \int \frac {\cos ^5(a+b x)-\sin ^5(a+b x)}{\cos ^5(a+b x)+\sin ^5(a+b x)} \, dx=\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} \]

input
int((cos(a + b*x)^5 - sin(a + b*x)^5)/(cos(a + b*x)^5 + sin(a + b*x)^5),x)
 
output
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) + ta 
n(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) + 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)