Integrand size = 22, antiderivative size = 35 \[ \int (c+d x) \csc ^2(a+b x) \sec ^2(a+b x) \, dx=-\frac {2 (c+d x) \cot (2 a+2 b x)}{b}+\frac {d \log (\sin (2 a+2 b x))}{b^2} \] Output:
-2*(d*x+c)*cot(2*b*x+2*a)/b+d*ln(sin(2*b*x+2*a))/b^2
Time = 0.34 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.91 \[ \int (c+d x) \csc ^2(a+b x) \sec ^2(a+b x) \, dx=\frac {-2 b (c+d x) \cot (2 (a+b x))+d \log (\sin (2 (a+b x)))}{b^2} \] Input:
Integrate[(c + d*x)*Csc[a + b*x]^2*Sec[a + b*x]^2,x]
Output:
(-2*b*(c + d*x)*Cot[2*(a + b*x)] + d*Log[Sin[2*(a + b*x)]])/b^2
Time = 0.32 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.26, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {4919, 3042, 4672, 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 (c+d x) \csc ^2(a+b x) \sec ^2(a+b x) \, dx\) |
\(\Big \downarrow \) 4919 |
\(\displaystyle 4 \int (c+d x) \csc ^2(2 a+2 b x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle 4 \int (c+d x) \csc (2 a+2 b x)^2dx\) |
\(\Big \downarrow \) 4672 |
\(\displaystyle 4 \left (\frac {d \int \cot (2 a+2 b x)dx}{2 b}-\frac {(c+d x) \cot (2 a+2 b x)}{2 b}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle 4 \left (\frac {d \int -\tan \left (2 a+2 b x+\frac {\pi }{2}\right )dx}{2 b}-\frac {(c+d x) \cot (2 a+2 b x)}{2 b}\right )\) |
\(\Big \downarrow \) 25 |
\(\displaystyle 4 \left (-\frac {d \int \tan \left (\frac {1}{2} (4 a+\pi )+2 b x\right )dx}{2 b}-\frac {(c+d x) \cot (2 a+2 b x)}{2 b}\right )\) |
\(\Big \downarrow \) 3956 |
\(\displaystyle 4 \left (\frac {d \log (-\sin (2 a+2 b x))}{4 b^2}-\frac {(c+d x) \cot (2 a+2 b x)}{2 b}\right )\) |
Input:
Int[(c + d*x)*Csc[a + b*x]^2*Sec[a + b*x]^2,x]
Output:
4*(-1/2*((c + d*x)*Cot[2*a + 2*b*x])/b + (d*Log[-Sin[2*a + 2*b*x]])/(4*b^2 ))
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d *x], x]]/d, x] /; FreeQ[{c, d}, x]
Int[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp [(-(c + d*x)^m)*(Cot[e + f*x]/f), x] + Simp[d*(m/f) Int[(c + d*x)^(m - 1) *Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]
Int[Csc[(a_.) + (b_.)*(x_)]^(n_.)*((c_.) + (d_.)*(x_))^(m_.)*Sec[(a_.) + (b _.)*(x_)]^(n_.), x_Symbol] :> Simp[2^n Int[(c + d*x)^m*Csc[2*a + 2*b*x]^n , x], x] /; FreeQ[{a, b, c, d, m}, x] && IntegerQ[n] && RationalQ[m]
Result contains complex when optimal does not.
Time = 0.62 (sec) , antiderivative size = 72, normalized size of antiderivative = 2.06
method | result | size |
risch | \(-\frac {4 i d x}{b}-\frac {4 i d a}{b^{2}}-\frac {4 i \left (d x +c \right )}{b \left ({\mathrm e}^{2 i \left (b x +a \right )}+1\right ) \left ({\mathrm e}^{2 i \left (b x +a \right )}-1\right )}+\frac {d \ln \left ({\mathrm e}^{4 i \left (b x +a \right )}-1\right )}{b^{2}}\) | \(72\) |
parallelrisch | \(\frac {-4 \cos \left (b x +a \right ) \ln \left (\sec \left (\frac {a}{2}+\frac {b x}{2}\right )^{2}\right ) d +2 \cos \left (b x +a \right ) \ln \left (\tan \left (\frac {a}{2}+\frac {b x}{2}\right )-1\right ) d +2 \cos \left (b x +a \right ) \ln \left (\tan \left (\frac {a}{2}+\frac {b x}{2}\right )+1\right ) d +2 \cos \left (b x +a \right ) \ln \left (\tan \left (\frac {a}{2}+\frac {b x}{2}\right )\right ) d -b \cos \left (2 b x +2 a \right ) \csc \left (\frac {a}{2}+\frac {b x}{2}\right ) \sec \left (\frac {a}{2}+\frac {b x}{2}\right ) \left (d x +c \right )}{2 \cos \left (b x +a \right ) b^{2}}\) | \(132\) |
norman | \(\frac {\frac {c}{2 b}-\frac {3 c \tan \left (\frac {a}{2}+\frac {b x}{2}\right )^{2}}{b}+\frac {c \tan \left (\frac {a}{2}+\frac {b x}{2}\right )^{4}}{2 b}+\frac {d x}{2 b}-\frac {3 d x \tan \left (\frac {a}{2}+\frac {b x}{2}\right )^{2}}{b}+\frac {d x \tan \left (\frac {a}{2}+\frac {b x}{2}\right )^{4}}{2 b}}{\tan \left (\frac {a}{2}+\frac {b x}{2}\right ) \left (\tan \left (\frac {a}{2}+\frac {b x}{2}\right )^{2}-1\right )}+\frac {d \ln \left (\tan \left (\frac {a}{2}+\frac {b x}{2}\right )\right )}{b^{2}}+\frac {d \ln \left (\tan \left (\frac {a}{2}+\frac {b x}{2}\right )-1\right )}{b^{2}}+\frac {d \ln \left (\tan \left (\frac {a}{2}+\frac {b x}{2}\right )+1\right )}{b^{2}}-\frac {2 d \ln \left (1+\tan \left (\frac {a}{2}+\frac {b x}{2}\right )^{2}\right )}{b^{2}}\) | \(182\) |
Input:
int((d*x+c)*csc(b*x+a)^2*sec(b*x+a)^2,x,method=_RETURNVERBOSE)
Output:
-4*I*d/b*x-4*I*d/b^2*a-4*I*(d*x+c)/b/(exp(2*I*(b*x+a))+1)/(exp(2*I*(b*x+a) )-1)+d/b^2*ln(exp(4*I*(b*x+a))-1)
Leaf count of result is larger than twice the leaf count of optimal. 75 vs. \(2 (35) = 70\).
Time = 0.08 (sec) , antiderivative size = 75, normalized size of antiderivative = 2.14 \[ \int (c+d x) \csc ^2(a+b x) \sec ^2(a+b x) \, dx=\frac {d \cos \left (b x + a\right ) \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) \sin \left (b x + a\right )\right ) \sin \left (b x + a\right ) + b d x - 2 \, {\left (b d x + b c\right )} \cos \left (b x + a\right )^{2} + b c}{b^{2} \cos \left (b x + a\right ) \sin \left (b x + a\right )} \] Input:
integrate((d*x+c)*csc(b*x+a)^2*sec(b*x+a)^2,x, algorithm="fricas")
Output:
(d*cos(b*x + a)*log(-1/2*cos(b*x + a)*sin(b*x + a))*sin(b*x + a) + b*d*x - 2*(b*d*x + b*c)*cos(b*x + a)^2 + b*c)/(b^2*cos(b*x + a)*sin(b*x + a))
\[ \int (c+d x) \csc ^2(a+b x) \sec ^2(a+b x) \, dx=\int \left (c + d x\right ) \csc ^{2}{\left (a + b x \right )} \sec ^{2}{\left (a + b x \right )}\, dx \] Input:
integrate((d*x+c)*csc(b*x+a)**2*sec(b*x+a)**2,x)
Output:
Integral((c + d*x)*csc(a + b*x)**2*sec(a + b*x)**2, x)
Leaf count of result is larger than twice the leaf count of optimal. 308 vs. \(2 (35) = 70\).
Time = 0.16 (sec) , antiderivative size = 308, normalized size of antiderivative = 8.80 \[ \int (c+d x) \csc ^2(a+b x) \sec ^2(a+b x) \, dx=-\frac {2 \, c {\left (\frac {1}{\tan \left (b x + a\right )} - \tan \left (b x + a\right )\right )} - \frac {2 \, a d {\left (\frac {1}{\tan \left (b x + a\right )} - \tan \left (b x + a\right )\right )}}{b} - \frac {{\left ({\left (\cos \left (4 \, b x + 4 \, a\right )^{2} + \sin \left (4 \, b x + 4 \, a\right )^{2} - 2 \, \cos \left (4 \, b x + 4 \, a\right ) + 1\right )} \log \left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right ) + {\left (\cos \left (4 \, b x + 4 \, a\right )^{2} + \sin \left (4 \, b x + 4 \, a\right )^{2} - 2 \, \cos \left (4 \, b x + 4 \, a\right ) + 1\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} + 2 \, \cos \left (b x + a\right ) + 1\right ) + {\left (\cos \left (4 \, b x + 4 \, a\right )^{2} + \sin \left (4 \, b x + 4 \, a\right )^{2} - 2 \, \cos \left (4 \, b x + 4 \, a\right ) + 1\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} - 2 \, \cos \left (b x + a\right ) + 1\right ) - 8 \, {\left (b x + a\right )} \sin \left (4 \, b x + 4 \, a\right )\right )} d}{{\left (\cos \left (4 \, b x + 4 \, a\right )^{2} + \sin \left (4 \, b x + 4 \, a\right )^{2} - 2 \, \cos \left (4 \, b x + 4 \, a\right ) + 1\right )} b}}{2 \, b} \] Input:
integrate((d*x+c)*csc(b*x+a)^2*sec(b*x+a)^2,x, algorithm="maxima")
Output:
-1/2*(2*c*(1/tan(b*x + a) - tan(b*x + a)) - 2*a*d*(1/tan(b*x + a) - tan(b* x + a))/b - ((cos(4*b*x + 4*a)^2 + sin(4*b*x + 4*a)^2 - 2*cos(4*b*x + 4*a) + 1)*log(cos(2*b*x + 2*a)^2 + sin(2*b*x + 2*a)^2 + 2*cos(2*b*x + 2*a) + 1 ) + (cos(4*b*x + 4*a)^2 + sin(4*b*x + 4*a)^2 - 2*cos(4*b*x + 4*a) + 1)*log (cos(b*x + a)^2 + sin(b*x + a)^2 + 2*cos(b*x + a) + 1) + (cos(4*b*x + 4*a) ^2 + sin(4*b*x + 4*a)^2 - 2*cos(4*b*x + 4*a) + 1)*log(cos(b*x + a)^2 + sin (b*x + a)^2 - 2*cos(b*x + a) + 1) - 8*(b*x + a)*sin(4*b*x + 4*a))*d/((cos( 4*b*x + 4*a)^2 + sin(4*b*x + 4*a)^2 - 2*cos(4*b*x + 4*a) + 1)*b))/b
Leaf count of result is larger than twice the leaf count of optimal. 10271 vs. \(2 (35) = 70\).
Time = 2.42 (sec) , antiderivative size = 10271, normalized size of antiderivative = 293.46 \[ \int (c+d x) \csc ^2(a+b x) \sec ^2(a+b x) \, dx=\text {Too large to display} \] Input:
integrate((d*x+c)*csc(b*x+a)^2*sec(b*x+a)^2,x, algorithm="giac")
Output:
1/2*(b*d*x*tan(1/2*b*x)^4*tan(1/2*a)^4 + b*c*tan(1/2*b*x)^4*tan(1/2*a)^4 - 6*b*d*x*tan(1/2*b*x)^4*tan(1/2*a)^2 - 16*b*d*x*tan(1/2*b*x)^3*tan(1/2*a)^ 3 + d*log(64*(tan(1/2*b*x)^8*tan(1/2*a)^6 + 2*tan(1/2*b*x)^7*tan(1/2*a)^7 + tan(1/2*b*x)^6*tan(1/2*a)^8 - 2*tan(1/2*b*x)^8*tan(1/2*a)^4 - 14*tan(1/2 *b*x)^7*tan(1/2*a)^5 - 24*tan(1/2*b*x)^6*tan(1/2*a)^6 - 14*tan(1/2*b*x)^5* tan(1/2*a)^7 - 2*tan(1/2*b*x)^4*tan(1/2*a)^8 + tan(1/2*b*x)^8*tan(1/2*a)^2 + 14*tan(1/2*b*x)^7*tan(1/2*a)^3 + 62*tan(1/2*b*x)^6*tan(1/2*a)^4 + 98*ta n(1/2*b*x)^5*tan(1/2*a)^5 + 62*tan(1/2*b*x)^4*tan(1/2*a)^6 + 14*tan(1/2*b* x)^3*tan(1/2*a)^7 + tan(1/2*b*x)^2*tan(1/2*a)^8 - 2*tan(1/2*b*x)^7*tan(1/2 *a) - 24*tan(1/2*b*x)^6*tan(1/2*a)^2 - 98*tan(1/2*b*x)^5*tan(1/2*a)^3 - 15 2*tan(1/2*b*x)^4*tan(1/2*a)^4 - 98*tan(1/2*b*x)^3*tan(1/2*a)^5 - 24*tan(1/ 2*b*x)^2*tan(1/2*a)^6 - 2*tan(1/2*b*x)*tan(1/2*a)^7 + tan(1/2*b*x)^6 + 14* tan(1/2*b*x)^5*tan(1/2*a) + 62*tan(1/2*b*x)^4*tan(1/2*a)^2 + 98*tan(1/2*b* x)^3*tan(1/2*a)^3 + 62*tan(1/2*b*x)^2*tan(1/2*a)^4 + 14*tan(1/2*b*x)*tan(1 /2*a)^5 + tan(1/2*a)^6 - 2*tan(1/2*b*x)^4 - 14*tan(1/2*b*x)^3*tan(1/2*a) - 24*tan(1/2*b*x)^2*tan(1/2*a)^2 - 14*tan(1/2*b*x)*tan(1/2*a)^3 - 2*tan(1/2 *a)^4 + tan(1/2*b*x)^2 + 2*tan(1/2*b*x)*tan(1/2*a) + tan(1/2*a)^2)/(tan(1/ 2*b*x)^8*tan(1/2*a)^8 + 4*tan(1/2*b*x)^8*tan(1/2*a)^6 + 4*tan(1/2*b*x)^6*t an(1/2*a)^8 + 6*tan(1/2*b*x)^8*tan(1/2*a)^4 + 16*tan(1/2*b*x)^6*tan(1/2*a) ^6 + 6*tan(1/2*b*x)^4*tan(1/2*a)^8 + 4*tan(1/2*b*x)^8*tan(1/2*a)^2 + 24...
Time = 21.25 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.57 \[ \int (c+d x) \csc ^2(a+b x) \sec ^2(a+b x) \, dx=\frac {d\,\ln \left ({\mathrm {e}}^{a\,4{}\mathrm {i}}\,{\mathrm {e}}^{b\,x\,4{}\mathrm {i}}-1\right )}{b^2}-\frac {\left (c+d\,x\right )\,4{}\mathrm {i}}{b\,\left ({\mathrm {e}}^{a\,4{}\mathrm {i}+b\,x\,4{}\mathrm {i}}-1\right )}-\frac {d\,x\,4{}\mathrm {i}}{b} \] Input:
int((c + d*x)/(cos(a + b*x)^2*sin(a + b*x)^2),x)
Output:
(d*log(exp(a*4i)*exp(b*x*4i) - 1))/b^2 - ((c + d*x)*4i)/(b*(exp(a*4i + b*x *4i) - 1)) - (d*x*4i)/b
Time = 0.15 (sec) , antiderivative size = 160, normalized size of antiderivative = 4.57 \[ \int (c+d x) \csc ^2(a+b x) \sec ^2(a+b x) \, dx=\frac {-2 \cos \left (b x +a \right ) \mathrm {log}\left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )^{2}+1\right ) \sin \left (b x +a \right ) d +\cos \left (b x +a \right ) \mathrm {log}\left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )-1\right ) \sin \left (b x +a \right ) d +\cos \left (b x +a \right ) \mathrm {log}\left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )+1\right ) \sin \left (b x +a \right ) d +\cos \left (b x +a \right ) \mathrm {log}\left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )\right ) \sin \left (b x +a \right ) d +2 \sin \left (b x +a \right )^{2} b c +2 \sin \left (b x +a \right )^{2} b d x -b c -b d x}{\cos \left (b x +a \right ) \sin \left (b x +a \right ) b^{2}} \] Input:
int((d*x+c)*csc(b*x+a)^2*sec(b*x+a)^2,x)
Output:
( - 2*cos(a + b*x)*log(tan((a + b*x)/2)**2 + 1)*sin(a + b*x)*d + cos(a + b *x)*log(tan((a + b*x)/2) - 1)*sin(a + b*x)*d + cos(a + b*x)*log(tan((a + b *x)/2) + 1)*sin(a + b*x)*d + cos(a + b*x)*log(tan((a + b*x)/2))*sin(a + b* x)*d + 2*sin(a + b*x)**2*b*c + 2*sin(a + b*x)**2*b*d*x - b*c - b*d*x)/(cos (a + b*x)*sin(a + b*x)*b**2)