Integrand size = 39, antiderivative size = 55 \[ \int \frac {\cos ^3(a+b x)-\sin ^3(a+b x)}{\cos ^3(a+b x)+\sin ^3(a+b x)} \, dx=-\frac {\log (\cos (a+b x))}{b}+\frac {\log (1+\tan (a+b x))}{3 b}-\frac {2 \log \left (1-\tan (a+b x)+\tan ^2(a+b x)\right )}{3 b} \] Output:
-ln(cos(b*x+a))/b+1/3*ln(1+tan(b*x+a))/b-2/3*ln(1-tan(b*x+a)+tan(b*x+a)^2) /b
Time = 9.86 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.76 \[ \int \frac {\cos ^3(a+b x)-\sin ^3(a+b x)}{\cos ^3(a+b x)+\sin ^3(a+b x)} \, dx=\frac {\log (\cos (a+b x)+\sin (a+b x))}{3 b}-\frac {2 \log (2-\sin (2 (a+b x)))}{3 b} \] Input:
Integrate[(Cos[a + b*x]^3 - Sin[a + b*x]^3)/(Cos[a + b*x]^3 + Sin[a + b*x] ^3),x]
Output:
Log[Cos[a + b*x] + Sin[a + b*x]]/(3*b) - (2*Log[2 - Sin[2*(a + b*x)]])/(3* b)
Time = 0.53 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.02, 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 ^3(a+b x)-\sin ^3(a+b x)}{\sin ^3(a+b x)+\cos ^3(a+b x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (a+b x)^3-\sin (a+b x)^3}{\sin (a+b x)^3+\cos (a+b x)^3}dx\) |
\(\Big \downarrow \) 4889 |
\(\displaystyle \frac {\int \frac {1-\tan ^3(a+b x)}{\tan ^5(a+b x)+\tan ^3(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}{3 (\tan (a+b x)+1)}-\frac {2 (2 \tan (a+b x)-1)}{3 \left (\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 {2}{3} \log \left (\tan ^2(a+b x)-\tan (a+b x)+1\right )+\frac {1}{3} \log (\tan (a+b x)+1)}{b}\) |
Input:
Int[(Cos[a + b*x]^3 - Sin[a + b*x]^3)/(Cos[a + b*x]^3 + Sin[a + b*x]^3),x]
Output:
(Log[1 + Tan[a + b*x]]/3 + Log[1 + Tan[a + b*x]^2]/2 - (2*Log[1 - Tan[a + b*x] + Tan[a + b*x]^2])/3)/b
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]
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]]
Time = 0.67 (sec) , antiderivative size = 51, normalized size of antiderivative = 0.93
method | result | size |
derivativedivides | \(\frac {\frac {\ln \left (1+\tan \left (b x +a \right )^{2}\right )}{2}-\frac {2 \ln \left (1-\tan \left (b x +a \right )+\tan \left (b x +a \right )^{2}\right )}{3}+\frac {\ln \left (1+\tan \left (b x +a \right )\right )}{3}}{b}\) | \(51\) |
default | \(\frac {\frac {\ln \left (1+\tan \left (b x +a \right )^{2}\right )}{2}-\frac {2 \ln \left (1-\tan \left (b x +a \right )+\tan \left (b x +a \right )^{2}\right )}{3}+\frac {\ln \left (1+\tan \left (b x +a \right )\right )}{3}}{b}\) | \(51\) |
risch | \(i x +\frac {2 i a}{b}+\frac {\ln \left ({\mathrm e}^{2 i \left (b x +a \right )}+i\right )}{3 b}-\frac {2 \ln \left ({\mathrm e}^{4 i \left (b x +a \right )}-4 i {\mathrm e}^{2 i \left (b x +a \right )}-1\right )}{3 b}\) | \(60\) |
parallelrisch | \(\frac {3 \ln \left (\sec \left (\frac {a}{2}+\frac {b x}{2}\right )^{2}\right )+\ln \left (\tan \left (\frac {a}{2}+\frac {b x}{2}\right )^{2}-2 \tan \left (\frac {a}{2}+\frac {b x}{2}\right )-1\right )-2 \ln \left (\sec \left (\frac {a}{2}+\frac {b x}{2}\right )^{4}-4 \tan \left (\frac {a}{2}+\frac {b x}{2}\right )+2 \tan \left (\frac {a}{2}+\frac {b x}{2}\right ) \sec \left (\frac {a}{2}+\frac {b x}{2}\right )^{2}\right )}{3 b}\) | \(94\) |
norman | \(\frac {\ln \left (1+\tan \left (\frac {a}{2}+\frac {b x}{2}\right )^{2}\right )}{b}+\frac {\ln \left (\tan \left (\frac {a}{2}+\frac {b x}{2}\right )^{2}-2 \tan \left (\frac {a}{2}+\frac {b x}{2}\right )-1\right )}{3 b}-\frac {2 \ln \left (\tan \left (\frac {a}{2}+\frac {b x}{2}\right )^{4}+2 \tan \left (\frac {a}{2}+\frac {b x}{2}\right )^{3}+2 \tan \left (\frac {a}{2}+\frac {b x}{2}\right )^{2}-2 \tan \left (\frac {a}{2}+\frac {b x}{2}\right )+1\right )}{3 b}\) | \(106\) |
Input:
int((cos(b*x+a)^3-sin(b*x+a)^3)/(cos(b*x+a)^3+sin(b*x+a)^3),x,method=_RETU RNVERBOSE)
Output:
1/b*(1/2*ln(1+tan(b*x+a)^2)-2/3*ln(1-tan(b*x+a)+tan(b*x+a)^2)+1/3*ln(1+tan (b*x+a)))
Time = 0.08 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.76 \[ \int \frac {\cos ^3(a+b x)-\sin ^3(a+b x)}{\cos ^3(a+b x)+\sin ^3(a+b x)} \, dx=\frac {\log \left (2 \, \cos \left (b x + a\right ) \sin \left (b x + a\right ) + 1\right ) - 4 \, \log \left (-\cos \left (b x + a\right ) \sin \left (b x + a\right ) + 1\right )}{6 \, b} \] Input:
integrate((cos(b*x+a)^3-sin(b*x+a)^3)/(cos(b*x+a)^3+sin(b*x+a)^3),x, algor ithm="fricas")
Output:
1/6*(log(2*cos(b*x + a)*sin(b*x + a) + 1) - 4*log(-cos(b*x + a)*sin(b*x + a) + 1))/b
Time = 0.43 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.38 \[ \int \frac {\cos ^3(a+b x)-\sin ^3(a+b x)}{\cos ^3(a+b x)+\sin ^3(a+b x)} \, dx=\begin {cases} \frac {\log {\left (\sin {\left (a + b x \right )} + \cos {\left (a + b x \right )} \right )}}{3 b} - \frac {2 \log {\left (\sin ^{2}{\left (a + b x \right )} - \sin {\left (a + b x \right )} \cos {\left (a + b x \right )} + \cos ^{2}{\left (a + b x \right )} \right )}}{3 b} & \text {for}\: b \neq 0 \\\frac {x \left (- \sin ^{3}{\left (a \right )} + \cos ^{3}{\left (a \right )}\right )}{\sin ^{3}{\left (a \right )} + \cos ^{3}{\left (a \right )}} & \text {otherwise} \end {cases} \] Input:
integrate((cos(b*x+a)**3-sin(b*x+a)**3)/(cos(b*x+a)**3+sin(b*x+a)**3),x)
Output:
Piecewise((log(sin(a + b*x) + cos(a + b*x))/(3*b) - 2*log(sin(a + b*x)**2 - sin(a + b*x)*cos(a + b*x) + cos(a + b*x)**2)/(3*b), Ne(b, 0)), (x*(-sin( a)**3 + cos(a)**3)/(sin(a)**3 + cos(a)**3), True))
Leaf count of result is larger than twice the leaf count of optimal. 154 vs. \(2 (51) = 102\).
Time = 0.12 (sec) , antiderivative size = 154, normalized size of antiderivative = 2.80 \[ \int \frac {\cos ^3(a+b x)-\sin ^3(a+b x)}{\cos ^3(a+b x)+\sin ^3(a+b x)} \, dx=-\frac {2 \, \log \left (-\frac {2 \, \sin \left (b x + a\right )}{\cos \left (b x + a\right ) + 1} + \frac {2 \, \sin \left (b x + a\right )^{2}}{{\left (\cos \left (b x + a\right ) + 1\right )}^{2}} + \frac {2 \, \sin \left (b x + a\right )^{3}}{{\left (\cos \left (b x + a\right ) + 1\right )}^{3}} + \frac {\sin \left (b x + a\right )^{4}}{{\left (\cos \left (b x + a\right ) + 1\right )}^{4}} + 1\right ) - \log \left (-\frac {2 \, \sin \left (b x + a\right )}{\cos \left (b x + a\right ) + 1} + \frac {\sin \left (b x + a\right )^{2}}{{\left (\cos \left (b x + a\right ) + 1\right )}^{2}} - 1\right ) - 3 \, \log \left (\frac {\sin \left (b x + a\right )^{2}}{{\left (\cos \left (b x + a\right ) + 1\right )}^{2}} + 1\right )}{3 \, b} \] Input:
integrate((cos(b*x+a)^3-sin(b*x+a)^3)/(cos(b*x+a)^3+sin(b*x+a)^3),x, algor ithm="maxima")
Output:
-1/3*(2*log(-2*sin(b*x + a)/(cos(b*x + a) + 1) + 2*sin(b*x + a)^2/(cos(b*x + a) + 1)^2 + 2*sin(b*x + a)^3/(cos(b*x + a) + 1)^3 + sin(b*x + a)^4/(cos (b*x + a) + 1)^4 + 1) - log(-2*sin(b*x + a)/(cos(b*x + a) + 1) + sin(b*x + a)^2/(cos(b*x + a) + 1)^2 - 1) - 3*log(sin(b*x + a)^2/(cos(b*x + a) + 1)^ 2 + 1))/b
Time = 0.16 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.95 \[ \int \frac {\cos ^3(a+b x)-\sin ^3(a+b x)}{\cos ^3(a+b x)+\sin ^3(a+b x)} \, dx=-\frac {4 \, \log \left (\tan \left (b x + a\right )^{2} - \tan \left (b x + a\right ) + 1\right ) - 3 \, \log \left (\tan \left (b x + a\right )^{2} + 1\right ) - 2 \, \log \left ({\left | \tan \left (b x + a\right ) + 1 \right |}\right )}{6 \, b} \] Input:
integrate((cos(b*x+a)^3-sin(b*x+a)^3)/(cos(b*x+a)^3+sin(b*x+a)^3),x, algor ithm="giac")
Output:
-1/6*(4*log(tan(b*x + a)^2 - tan(b*x + a) + 1) - 3*log(tan(b*x + a)^2 + 1) - 2*log(abs(tan(b*x + a) + 1)))/b
Time = 15.68 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.91 \[ \int \frac {\cos ^3(a+b x)-\sin ^3(a+b x)}{\cos ^3(a+b x)+\sin ^3(a+b x)} \, dx=\frac {\ln \left ({\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )}^2+1\right )}{b}+\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 )}{3\,b}-\frac {2\,\ln \left ({\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )}^4+2\,{\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )}^3+2\,{\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 )}{3\,b} \] Input:
int((cos(a + b*x)^3 - sin(a + b*x)^3)/(cos(a + b*x)^3 + sin(a + b*x)^3),x)
Output:
log(tan(a/2 + (b*x)/2)^2 + 1)/b + log(tan(a/2 + (b*x)/2)^2 - 2*tan(a/2 + ( b*x)/2) - 1)/(3*b) - (2*log(2*tan(a/2 + (b*x)/2)^2 - 2*tan(a/2 + (b*x)/2) + 2*tan(a/2 + (b*x)/2)^3 + tan(a/2 + (b*x)/2)^4 + 1))/(3*b)
\[ \int \frac {\cos ^3(a+b x)-\sin ^3(a+b x)}{\cos ^3(a+b x)+\sin ^3(a+b x)} \, dx=\int \frac {\cos \left (b x +a \right )^{3}}{\cos \left (b x +a \right )^{3}+\sin \left (b x +a \right )^{3}}d x -\left (\int \frac {\sin \left (b x +a \right )^{3}}{\cos \left (b x +a \right )^{3}+\sin \left (b x +a \right )^{3}}d x \right ) \] Input:
int((cos(b*x+a)^3-sin(b*x+a)^3)/(cos(b*x+a)^3+sin(b*x+a)^3),x)
Output:
int(cos(a + b*x)**3/(cos(a + b*x)**3 + sin(a + b*x)**3),x) - int(sin(a + b *x)**3/(cos(a + b*x)**3 + sin(a + b*x)**3),x)