Integrand size = 13, antiderivative size = 39 \[ \int \cot (a+b x) \cot (c+b x) \, dx=-x-\frac {\cot (a-c) \log (\sin (a+b x))}{b}+\frac {\cot (a-c) \log (\sin (c+b x))}{b} \] Output:
-x-cot(a-c)*ln(sin(b*x+a))/b+cot(a-c)*ln(sin(b*x+c))/b
Time = 0.35 (sec) , antiderivative size = 31, normalized size of antiderivative = 0.79 \[ \int \cot (a+b x) \cot (c+b x) \, dx=-x+\frac {\cot (a-c) (-\log (\sin (a+b x))+\log (\sin (c+b x)))}{b} \] Input:
Integrate[Cot[a + b*x]*Cot[c + b*x],x]
Output:
-x + (Cot[a - c]*(-Log[Sin[a + b*x]] + Log[Sin[c + b*x]]))/b
Time = 0.29 (sec) , antiderivative size = 51, normalized size of antiderivative = 1.31, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {5124, 5122, 3042, 25, 3956}
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 \cot (a+b x) \cot (b x+c) \, dx\) |
\(\Big \downarrow \) 5124 |
\(\displaystyle \cos (a-c) \int \csc (a+b x) \csc (c+b x)dx-x\) |
\(\Big \downarrow \) 5122 |
\(\displaystyle \cos (a-c) (\csc (a-c) \int \cot (c+b x)dx-\csc (a-c) \int \cot (a+b x)dx)-x\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \cos (a-c) \left (\csc (a-c) \int -\tan \left (c+b x+\frac {\pi }{2}\right )dx-\csc (a-c) \int -\tan \left (a+b x+\frac {\pi }{2}\right )dx\right )-x\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \cos (a-c) \left (\csc (a-c) \int \tan \left (\frac {1}{2} (2 a+\pi )+b x\right )dx-\csc (a-c) \int \tan \left (\frac {1}{2} (2 c+\pi )+b x\right )dx\right )-x\) |
\(\Big \downarrow \) 3956 |
\(\displaystyle \cos (a-c) \left (\frac {\csc (a-c) \log (-\sin (b x+c))}{b}-\frac {\csc (a-c) \log (-\sin (a+b x))}{b}\right )-x\) |
Input:
Int[Cot[a + b*x]*Cot[c + b*x],x]
Output:
-x + Cos[a - c]*(-((Csc[a - c]*Log[-Sin[a + b*x]])/b) + (Csc[a - c]*Log[-S in[c + b*x]])/b)
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d *x], x]]/d, x] /; FreeQ[{c, d}, x]
Int[Csc[(a_.) + (b_.)*(x_)]*Csc[(c_) + (d_.)*(x_)], x_Symbol] :> Simp[Csc[( b*c - a*d)/b] Int[Cot[a + b*x], x], x] - Simp[Csc[(b*c - a*d)/d] Int[Co t[c + d*x], x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[b^2 - d^2, 0] && NeQ[b* c - a*d, 0]
Int[Cot[(a_.) + (b_.)*(x_)]*Cot[(c_) + (d_.)*(x_)], x_Symbol] :> Simp[(-b)* (x/d), x] + Simp[Cos[(b*c - a*d)/d] Int[Csc[a + b*x]*Csc[c + d*x], x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[b^2 - d^2, 0] && NeQ[b*c - a*d, 0]
Result contains complex when optimal does not.
Time = 0.14 (sec) , antiderivative size = 177, normalized size of antiderivative = 4.54
method | result | size |
risch | \(-x -\frac {i \ln \left ({\mathrm e}^{2 i \left (b x +a \right )}-1\right ) {\mathrm e}^{2 i a}}{b \left ({\mathrm e}^{2 i a}-{\mathrm e}^{2 i c}\right )}-\frac {i \ln \left ({\mathrm e}^{2 i \left (b x +a \right )}-1\right ) {\mathrm e}^{2 i c}}{b \left ({\mathrm e}^{2 i a}-{\mathrm e}^{2 i c}\right )}+\frac {i \ln \left ({\mathrm e}^{2 i \left (b x +a \right )}-{\mathrm e}^{2 i \left (a -c \right )}\right ) {\mathrm e}^{2 i a}}{b \left ({\mathrm e}^{2 i a}-{\mathrm e}^{2 i c}\right )}+\frac {i \ln \left ({\mathrm e}^{2 i \left (b x +a \right )}-{\mathrm e}^{2 i \left (a -c \right )}\right ) {\mathrm e}^{2 i c}}{b \left ({\mathrm e}^{2 i a}-{\mathrm e}^{2 i c}\right )}\) | \(177\) |
Input:
int(cot(b*x+a)*cot(b*x+c),x,method=_RETURNVERBOSE)
Output:
-x-I/b/(exp(2*I*a)-exp(2*I*c))*ln(exp(2*I*(b*x+a))-1)*exp(2*I*a)-I/b/(exp( 2*I*a)-exp(2*I*c))*ln(exp(2*I*(b*x+a))-1)*exp(2*I*c)+I/b/(exp(2*I*a)-exp(2 *I*c))*ln(exp(2*I*(b*x+a))-exp(2*I*(a-c)))*exp(2*I*a)+I/b/(exp(2*I*a)-exp( 2*I*c))*ln(exp(2*I*(b*x+a))-exp(2*I*(a-c)))*exp(2*I*c)
Leaf count of result is larger than twice the leaf count of optimal. 118 vs. \(2 (39) = 78\).
Time = 0.08 (sec) , antiderivative size = 118, normalized size of antiderivative = 3.03 \[ \int \cot (a+b x) \cot (c+b x) \, dx=-\frac {2 \, b x \sin \left (-2 \, a + 2 \, c\right ) - {\left (\cos \left (-2 \, a + 2 \, c\right ) + 1\right )} \log \left (-\frac {\cos \left (2 \, b x + 2 \, c\right ) \cos \left (-2 \, a + 2 \, c\right ) + \sin \left (2 \, b x + 2 \, c\right ) \sin \left (-2 \, a + 2 \, c\right ) - 1}{\cos \left (-2 \, a + 2 \, c\right ) + 1}\right ) + {\left (\cos \left (-2 \, a + 2 \, c\right ) + 1\right )} \log \left (-\frac {1}{2} \, \cos \left (2 \, b x + 2 \, c\right ) + \frac {1}{2}\right )}{2 \, b \sin \left (-2 \, a + 2 \, c\right )} \] Input:
integrate(cot(b*x+a)*cot(b*x+c),x, algorithm="fricas")
Output:
-1/2*(2*b*x*sin(-2*a + 2*c) - (cos(-2*a + 2*c) + 1)*log(-(cos(2*b*x + 2*c) *cos(-2*a + 2*c) + sin(2*b*x + 2*c)*sin(-2*a + 2*c) - 1)/(cos(-2*a + 2*c) + 1)) + (cos(-2*a + 2*c) + 1)*log(-1/2*cos(2*b*x + 2*c) + 1/2))/(b*sin(-2* a + 2*c))
Leaf count of result is larger than twice the leaf count of optimal. 1982 vs. \(2 (31) = 62\).
Time = 14.82 (sec) , antiderivative size = 7404, normalized size of antiderivative = 189.85 \[ \int \cot (a+b x) \cot (c+b x) \, dx=\text {Too large to display} \] Input:
integrate(cot(b*x+a)*cot(b*x+c),x)
Output:
Piecewise((x/(zoo*cot(c) + zoo + cot(c)/tan(c) + zoo/tan(c)), Eq(b, 0) & E q(a, atan(tan(c)) + pi*floor((c - pi/2)/pi))), (-b*x*tan(c)**5/(b*tan(c)** 5 + b*tan(c)**4*tan(b*x) + 2*b*tan(c)**3 + 2*b*tan(c)**2*tan(b*x) + b*tan( c) + b*tan(b*x)) - b*x*tan(c)**4*tan(b*x)/(b*tan(c)**5 + b*tan(c)**4*tan(b *x) + 2*b*tan(c)**3 + 2*b*tan(c)**2*tan(b*x) + b*tan(c) + b*tan(b*x)) + b* x*tan(c)**3/(b*tan(c)**5 + b*tan(c)**4*tan(b*x) + 2*b*tan(c)**3 + 2*b*tan( c)**2*tan(b*x) + b*tan(c) + b*tan(b*x)) + b*x*tan(c)**2*tan(b*x)/(b*tan(c) **5 + b*tan(c)**4*tan(b*x) + 2*b*tan(c)**3 + 2*b*tan(c)**2*tan(b*x) + b*ta n(c) + b*tan(b*x)) - 2*log(tan(c) + tan(b*x))*tan(c)**4/(b*tan(c)**5 + b*t an(c)**4*tan(b*x) + 2*b*tan(c)**3 + 2*b*tan(c)**2*tan(b*x) + b*tan(c) + b* tan(b*x)) - 2*log(tan(c) + tan(b*x))*tan(c)**3*tan(b*x)/(b*tan(c)**5 + b*t an(c)**4*tan(b*x) + 2*b*tan(c)**3 + 2*b*tan(c)**2*tan(b*x) + b*tan(c) + b* tan(b*x)) + log(tan(b*x)**2 + 1)*tan(c)**4/(b*tan(c)**5 + b*tan(c)**4*tan( b*x) + 2*b*tan(c)**3 + 2*b*tan(c)**2*tan(b*x) + b*tan(c) + b*tan(b*x)) + l og(tan(b*x)**2 + 1)*tan(c)**3*tan(b*x)/(b*tan(c)**5 + b*tan(c)**4*tan(b*x) + 2*b*tan(c)**3 + 2*b*tan(c)**2*tan(b*x) + b*tan(c) + b*tan(b*x)) - tan(c )**6/(b*tan(c)**5 + b*tan(c)**4*tan(b*x) + 2*b*tan(c)**3 + 2*b*tan(c)**2*t an(b*x) + b*tan(c) + b*tan(b*x)) - tan(c)**4/(b*tan(c)**5 + b*tan(c)**4*ta n(b*x) + 2*b*tan(c)**3 + 2*b*tan(c)**2*tan(b*x) + b*tan(c) + b*tan(b*x)), Eq(a, atan(tan(c)) + pi*floor((c - pi/2)/pi))), (x/(cot(a)*cot(c) + zoo...
Leaf count of result is larger than twice the leaf count of optimal. 549 vs. \(2 (39) = 78\).
Time = 0.08 (sec) , antiderivative size = 549, normalized size of antiderivative = 14.08 \[ \int \cot (a+b x) \cot (c+b x) \, dx =\text {Too large to display} \] Input:
integrate(cot(b*x+a)*cot(b*x+c),x, algorithm="maxima")
Output:
-((2*b*cos(2*a)*cos(2*c) - b*cos(2*c)^2 + 2*b*sin(2*a)*sin(2*c) - b*sin(2* c)^2 - (cos(2*a)^2 + sin(2*a)^2)*b)*x + (cos(2*a)^2 - cos(2*c)^2 + sin(2*a )^2 - sin(2*c)^2)*arctan2(sin(b*x) + sin(a), cos(b*x) - cos(a)) + (cos(2*a )^2 - cos(2*c)^2 + sin(2*a)^2 - sin(2*c)^2)*arctan2(sin(b*x) - sin(a), cos (b*x) + cos(a)) - (cos(2*a)^2 - cos(2*c)^2 + sin(2*a)^2 - sin(2*c)^2)*arct an2(sin(b*x) + sin(c), cos(b*x) - cos(c)) - (cos(2*a)^2 - cos(2*c)^2 + sin (2*a)^2 - sin(2*c)^2)*arctan2(sin(b*x) - sin(c), cos(b*x) + cos(c)) - (cos (2*c)*sin(2*a) - cos(2*a)*sin(2*c))*log(cos(b*x)^2 + 2*cos(b*x)*cos(a) + c os(a)^2 + sin(b*x)^2 - 2*sin(b*x)*sin(a) + sin(a)^2) - (cos(2*c)*sin(2*a) - cos(2*a)*sin(2*c))*log(cos(b*x)^2 - 2*cos(b*x)*cos(a) + cos(a)^2 + sin(b *x)^2 + 2*sin(b*x)*sin(a) + sin(a)^2) + (cos(2*c)*sin(2*a) - cos(2*a)*sin( 2*c))*log(cos(b*x)^2 + 2*cos(b*x)*cos(c) + cos(c)^2 + sin(b*x)^2 - 2*sin(b *x)*sin(c) + sin(c)^2) + (cos(2*c)*sin(2*a) - cos(2*a)*sin(2*c))*log(cos(b *x)^2 - 2*cos(b*x)*cos(c) + cos(c)^2 + sin(b*x)^2 + 2*sin(b*x)*sin(c) + si n(c)^2))/(2*b*cos(2*a)*cos(2*c) - b*cos(2*c)^2 + 2*b*sin(2*a)*sin(2*c) - b *sin(2*c)^2 - (cos(2*a)^2 + sin(2*a)^2)*b)
Leaf count of result is larger than twice the leaf count of optimal. 348 vs. \(2 (39) = 78\).
Time = 0.15 (sec) , antiderivative size = 348, normalized size of antiderivative = 8.92 \[ \int \cot (a+b x) \cot (c+b x) \, dx =\text {Too large to display} \] Input:
integrate(cot(b*x+a)*cot(b*x+c),x, algorithm="giac")
Output:
-1/2*(2*b*x + (tan(1/2*a)^4*tan(1/2*c)^2 - tan(1/2*a)^4 + 4*tan(1/2*a)^3*t an(1/2*c) - 2*tan(1/2*a)^2*tan(1/2*c)^2 + 2*tan(1/2*a)^2 - 4*tan(1/2*a)*ta n(1/2*c) + tan(1/2*c)^2 - 1)*log(abs(tan(b*x)*tan(1/2*a)^2 - tan(b*x) - 2* tan(1/2*a)))/(tan(1/2*a)^4*tan(1/2*c) - tan(1/2*a)^3*tan(1/2*c)^2 + tan(1/ 2*a)^3 - 2*tan(1/2*a)^2*tan(1/2*c) + tan(1/2*a)*tan(1/2*c)^2 - tan(1/2*a) + tan(1/2*c)) - (tan(1/2*a)^2*tan(1/2*c)^4 - 2*tan(1/2*a)^2*tan(1/2*c)^2 + 4*tan(1/2*a)*tan(1/2*c)^3 - tan(1/2*c)^4 + tan(1/2*a)^2 - 4*tan(1/2*a)*ta n(1/2*c) + 2*tan(1/2*c)^2 - 1)*log(abs(tan(b*x)*tan(1/2*c)^2 - tan(b*x) - 2*tan(1/2*c)))/(tan(1/2*a)^2*tan(1/2*c)^3 - tan(1/2*a)*tan(1/2*c)^4 - tan( 1/2*a)^2*tan(1/2*c) + 2*tan(1/2*a)*tan(1/2*c)^2 - tan(1/2*c)^3 - tan(1/2*a ) + tan(1/2*c)))/b
Time = 21.23 (sec) , antiderivative size = 207, normalized size of antiderivative = 5.31 \[ \int \cot (a+b x) \cot (c+b x) \, dx=-\frac {\frac {x}{2}+x\,\left ({\sin \left (a-c\right )}^2-\frac {1}{2}\right )}{{\sin \left (a-c\right )}^2}-\frac {\frac {\sin \left (2\,a-2\,c\right )\,\ln \left ({\sin \left (2\,a-2\,c\right )}^2\,2{}\mathrm {i}+{\sin \left (a+b\,x\right )}^2\,2{}\mathrm {i}-{\sin \left (3\,a-2\,c+b\,x\right )}^2\,2{}\mathrm {i}+\sin \left (4\,a-4\,c\right )-\sin \left (6\,a-4\,c+2\,b\,x\right )+\sin \left (2\,a+2\,b\,x\right )\right )}{2}-\frac {\sin \left (2\,a-2\,c\right )\,\ln \left ({\sin \left (2\,a-2\,c\right )}^2\,2{}\mathrm {i}+{\sin \left (c+b\,x\right )}^2\,2{}\mathrm {i}-{\sin \left (2\,a-c+b\,x\right )}^2\,2{}\mathrm {i}+\sin \left (4\,a-4\,c\right )-\sin \left (4\,a-2\,c+2\,b\,x\right )+\sin \left (2\,c+2\,b\,x\right )\right )}{2}}{b\,{\sin \left (a-c\right )}^2} \] Input:
int(cot(a + b*x)*cot(c + b*x),x)
Output:
- (x/2 + x*(sin(a - c)^2 - 1/2))/sin(a - c)^2 - ((sin(2*a - 2*c)*log(sin(4 *a - 4*c) - sin(6*a - 4*c + 2*b*x) + sin(2*a + 2*b*x) + sin(2*a - 2*c)^2*2 i + sin(a + b*x)^2*2i - sin(3*a - 2*c + b*x)^2*2i))/2 - (sin(2*a - 2*c)*lo g(sin(4*a - 4*c) - sin(4*a - 2*c + 2*b*x) + sin(2*c + 2*b*x) + sin(2*a - 2 *c)^2*2i + sin(c + b*x)^2*2i - sin(2*a - c + b*x)^2*2i))/2)/(b*sin(a - c)^ 2)
\[ \int \cot (a+b x) \cot (c+b x) \, dx=\int \cot \left (b x +c \right ) \cot \left (b x +a \right )d x \] Input:
int(cot(b*x+a)*cot(b*x+c),x)
Output:
int(cot(b*x + c)*cot(a + b*x),x)