Integrand size = 23, antiderivative size = 161 \[ \int \frac {1}{(c+d x) (a+i a \cot (e+f x))} \, dx=-\frac {\cos \left (2 e-\frac {2 c f}{d}\right ) \operatorname {CosIntegral}\left (\frac {2 c f}{d}+2 f x\right )}{2 a d}+\frac {\log (c+d x)}{2 a d}-\frac {i \operatorname {CosIntegral}\left (\frac {2 c f}{d}+2 f x\right ) \sin \left (2 e-\frac {2 c f}{d}\right )}{2 a d}-\frac {i \cos \left (2 e-\frac {2 c f}{d}\right ) \text {Si}\left (\frac {2 c f}{d}+2 f x\right )}{2 a d}+\frac {\sin \left (2 e-\frac {2 c f}{d}\right ) \text {Si}\left (\frac {2 c f}{d}+2 f x\right )}{2 a d} \] Output:
-1/2*cos(-2*e+2*c*f/d)*Ci(2*c*f/d+2*f*x)/a/d+1/2*ln(d*x+c)/a/d+1/2*I*Ci(2* c*f/d+2*f*x)*sin(-2*e+2*c*f/d)/a/d-1/2*I*cos(-2*e+2*c*f/d)*Si(2*c*f/d+2*f* x)/a/d-1/2*sin(-2*e+2*c*f/d)*Si(2*c*f/d+2*f*x)/a/d
Time = 0.24 (sec) , antiderivative size = 77, normalized size of antiderivative = 0.48 \[ \int \frac {1}{(c+d x) (a+i a \cot (e+f x))} \, dx=\frac {\log (c+d x)-\left (\cos \left (2 e-\frac {2 c f}{d}\right )+i \sin \left (2 e-\frac {2 c f}{d}\right )\right ) \left (\operatorname {CosIntegral}\left (\frac {2 f (c+d x)}{d}\right )+i \text {Si}\left (\frac {2 f (c+d x)}{d}\right )\right )}{2 a d} \] Input:
Integrate[1/((c + d*x)*(a + I*a*Cot[e + f*x])),x]
Output:
(Log[c + d*x] - (Cos[2*e - (2*c*f)/d] + I*Sin[2*e - (2*c*f)/d])*(CosIntegr al[(2*f*(c + d*x))/d] + I*SinIntegral[(2*f*(c + d*x))/d]))/(2*a*d)
Time = 0.73 (sec) , antiderivative size = 152, normalized size of antiderivative = 0.94, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.348, Rules used = {3042, 4209, 25, 3042, 3784, 3042, 3780, 3783}
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 {1}{(c+d x) (a+i a \cot (e+f x))} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{(c+d x) \left (a-i a \tan \left (e+f x+\frac {\pi }{2}\right )\right )}dx\) |
\(\Big \downarrow \) 4209 |
\(\displaystyle \frac {i \int -\frac {\sin (2 e+2 f x)}{c+d x}dx}{2 a}+\frac {\int -\frac {\cos (2 e+2 f x)}{c+d x}dx}{2 a}+\frac {\log (c+d x)}{2 a d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {i \int \frac {\sin (2 e+2 f x)}{c+d x}dx}{2 a}-\frac {\int \frac {\cos (2 e+2 f x)}{c+d x}dx}{2 a}+\frac {\log (c+d x)}{2 a d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {i \int \frac {\sin (2 e+2 f x)}{c+d x}dx}{2 a}-\frac {\int \frac {\sin \left (2 e+2 f x+\frac {\pi }{2}\right )}{c+d x}dx}{2 a}+\frac {\log (c+d x)}{2 a d}\) |
\(\Big \downarrow \) 3784 |
\(\displaystyle -\frac {i \left (\sin \left (2 e-\frac {2 c f}{d}\right ) \int \frac {\cos \left (2 x f+\frac {2 c f}{d}\right )}{c+d x}dx+\cos \left (2 e-\frac {2 c f}{d}\right ) \int \frac {\sin \left (2 x f+\frac {2 c f}{d}\right )}{c+d x}dx\right )}{2 a}-\frac {\cos \left (2 e-\frac {2 c f}{d}\right ) \int \frac {\cos \left (2 x f+\frac {2 c f}{d}\right )}{c+d x}dx-\sin \left (2 e-\frac {2 c f}{d}\right ) \int \frac {\sin \left (2 x f+\frac {2 c f}{d}\right )}{c+d x}dx}{2 a}+\frac {\log (c+d x)}{2 a d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\cos \left (2 e-\frac {2 c f}{d}\right ) \int \frac {\sin \left (2 x f+\frac {2 c f}{d}+\frac {\pi }{2}\right )}{c+d x}dx-\sin \left (2 e-\frac {2 c f}{d}\right ) \int \frac {\sin \left (2 x f+\frac {2 c f}{d}\right )}{c+d x}dx}{2 a}-\frac {i \left (\sin \left (2 e-\frac {2 c f}{d}\right ) \int \frac {\sin \left (2 x f+\frac {2 c f}{d}+\frac {\pi }{2}\right )}{c+d x}dx+\cos \left (2 e-\frac {2 c f}{d}\right ) \int \frac {\sin \left (2 x f+\frac {2 c f}{d}\right )}{c+d x}dx\right )}{2 a}+\frac {\log (c+d x)}{2 a d}\) |
\(\Big \downarrow \) 3780 |
\(\displaystyle -\frac {\cos \left (2 e-\frac {2 c f}{d}\right ) \int \frac {\sin \left (2 x f+\frac {2 c f}{d}+\frac {\pi }{2}\right )}{c+d x}dx-\frac {\sin \left (2 e-\frac {2 c f}{d}\right ) \text {Si}\left (2 x f+\frac {2 c f}{d}\right )}{d}}{2 a}-\frac {i \left (\sin \left (2 e-\frac {2 c f}{d}\right ) \int \frac {\sin \left (2 x f+\frac {2 c f}{d}+\frac {\pi }{2}\right )}{c+d x}dx+\frac {\cos \left (2 e-\frac {2 c f}{d}\right ) \text {Si}\left (2 x f+\frac {2 c f}{d}\right )}{d}\right )}{2 a}+\frac {\log (c+d x)}{2 a d}\) |
\(\Big \downarrow \) 3783 |
\(\displaystyle -\frac {i \left (\frac {\operatorname {CosIntegral}\left (2 x f+\frac {2 c f}{d}\right ) \sin \left (2 e-\frac {2 c f}{d}\right )}{d}+\frac {\cos \left (2 e-\frac {2 c f}{d}\right ) \text {Si}\left (2 x f+\frac {2 c f}{d}\right )}{d}\right )}{2 a}-\frac {\frac {\operatorname {CosIntegral}\left (2 x f+\frac {2 c f}{d}\right ) \cos \left (2 e-\frac {2 c f}{d}\right )}{d}-\frac {\sin \left (2 e-\frac {2 c f}{d}\right ) \text {Si}\left (2 x f+\frac {2 c f}{d}\right )}{d}}{2 a}+\frac {\log (c+d x)}{2 a d}\) |
Input:
Int[1/((c + d*x)*(a + I*a*Cot[e + f*x])),x]
Output:
Log[c + d*x]/(2*a*d) - ((I/2)*((CosIntegral[(2*c*f)/d + 2*f*x]*Sin[2*e - ( 2*c*f)/d])/d + (Cos[2*e - (2*c*f)/d]*SinIntegral[(2*c*f)/d + 2*f*x])/d))/a - ((Cos[2*e - (2*c*f)/d]*CosIntegral[(2*c*f)/d + 2*f*x])/d - (Sin[2*e - ( 2*c*f)/d]*SinIntegral[(2*c*f)/d + 2*f*x])/d)/(2*a)
Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinInte gral[e + f*x]/d, x] /; FreeQ[{c, d, e, f}, x] && EqQ[d*e - c*f, 0]
Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosInte gral[e - Pi/2 + f*x]/d, x] /; FreeQ[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]
Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[Cos[(d* e - c*f)/d] Int[Sin[c*(f/d) + f*x]/(c + d*x), x], x] + Simp[Sin[(d*e - c* f)/d] Int[Cos[c*(f/d) + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f}, x] && NeQ[d*e - c*f, 0]
Int[1/(((c_.) + (d_.)*(x_))*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])), x_Symb ol] :> Simp[Log[c + d*x]/(2*a*d), x] + (Simp[1/(2*a) Int[Cos[2*e + 2*f*x] /(c + d*x), x], x] + Simp[1/(2*b) Int[Sin[2*e + 2*f*x]/(c + d*x), x], x]) /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[a^2 + b^2, 0]
Time = 0.69 (sec) , antiderivative size = 67, normalized size of antiderivative = 0.42
method | result | size |
risch | \(\frac {\ln \left (d x +c \right )}{2 a d}+\frac {{\mathrm e}^{-\frac {2 i \left (c f -d e \right )}{d}} \operatorname {expIntegral}_{1}\left (-2 i f x -2 i e -\frac {2 \left (i c f -i d e \right )}{d}\right )}{2 a d}\) | \(67\) |
Input:
int(1/(d*x+c)/(a+I*a*cot(f*x+e)),x,method=_RETURNVERBOSE)
Output:
1/2*ln(d*x+c)/a/d+1/2/a/d*exp(-2*I*(c*f-d*e)/d)*Ei(1,-2*I*f*x-2*I*e-2*(I*c *f-I*d*e)/d)
Time = 0.07 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.33 \[ \int \frac {1}{(c+d x) (a+i a \cot (e+f x))} \, dx=-\frac {{\rm Ei}\left (-\frac {2 \, {\left (-i \, d f x - i \, c f\right )}}{d}\right ) e^{\left (-\frac {2 \, {\left (-i \, d e + i \, c f\right )}}{d}\right )} - \log \left (\frac {d x + c}{d}\right )}{2 \, a d} \] Input:
integrate(1/(d*x+c)/(a+I*a*cot(f*x+e)),x, algorithm="fricas")
Output:
-1/2*(Ei(-2*(-I*d*f*x - I*c*f)/d)*e^(-2*(-I*d*e + I*c*f)/d) - log((d*x + c )/d))/(a*d)
\[ \int \frac {1}{(c+d x) (a+i a \cot (e+f x))} \, dx=- \frac {i \int \frac {1}{c \cot {\left (e + f x \right )} - i c + d x \cot {\left (e + f x \right )} - i d x}\, dx}{a} \] Input:
integrate(1/(d*x+c)/(a+I*a*cot(f*x+e)),x)
Output:
-I*Integral(1/(c*cot(e + f*x) - I*c + d*x*cot(e + f*x) - I*d*x), x)/a
Time = 0.08 (sec) , antiderivative size = 111, normalized size of antiderivative = 0.69 \[ \int \frac {1}{(c+d x) (a+i a \cot (e+f x))} \, dx=\frac {f \cos \left (-\frac {2 \, {\left (d e - c f\right )}}{d}\right ) E_{1}\left (\frac {2 \, {\left (-i \, {\left (f x + e\right )} d + i \, d e - i \, c f\right )}}{d}\right ) - i \, f E_{1}\left (\frac {2 \, {\left (-i \, {\left (f x + e\right )} d + i \, d e - i \, c f\right )}}{d}\right ) \sin \left (-\frac {2 \, {\left (d e - c f\right )}}{d}\right ) + f \log \left ({\left (f x + e\right )} d - d e + c f\right )}{2 \, a d f} \] Input:
integrate(1/(d*x+c)/(a+I*a*cot(f*x+e)),x, algorithm="maxima")
Output:
1/2*(f*cos(-2*(d*e - c*f)/d)*exp_integral_e(1, 2*(-I*(f*x + e)*d + I*d*e - I*c*f)/d) - I*f*exp_integral_e(1, 2*(-I*(f*x + e)*d + I*d*e - I*c*f)/d)*s in(-2*(d*e - c*f)/d) + f*log((f*x + e)*d - d*e + c*f))/(a*d*f)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 351 vs. \(2 (147) = 294\).
Time = 0.15 (sec) , antiderivative size = 351, normalized size of antiderivative = 2.18 \[ \int \frac {1}{(c+d x) (a+i a \cot (e+f x))} \, dx=-\frac {\cos \left (e\right )^{2} \cos \left (\frac {2 \, c f}{d}\right ) \operatorname {Ci}\left (\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) + 2 i \, \cos \left (e\right ) \cos \left (\frac {2 \, c f}{d}\right ) \operatorname {Ci}\left (\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) \sin \left (e\right ) - \cos \left (\frac {2 \, c f}{d}\right ) \operatorname {Ci}\left (\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) \sin \left (e\right )^{2} - i \, \cos \left (e\right )^{2} \operatorname {Ci}\left (\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) \sin \left (\frac {2 \, c f}{d}\right ) + 2 \, \cos \left (e\right ) \operatorname {Ci}\left (\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) \sin \left (e\right ) \sin \left (\frac {2 \, c f}{d}\right ) + i \, \operatorname {Ci}\left (\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) \sin \left (e\right )^{2} \sin \left (\frac {2 \, c f}{d}\right ) + i \, \cos \left (e\right )^{2} \cos \left (\frac {2 \, c f}{d}\right ) \operatorname {Si}\left (\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) - 2 \, \cos \left (e\right ) \cos \left (\frac {2 \, c f}{d}\right ) \sin \left (e\right ) \operatorname {Si}\left (\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) - i \, \cos \left (\frac {2 \, c f}{d}\right ) \sin \left (e\right )^{2} \operatorname {Si}\left (\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) + \cos \left (e\right )^{2} \sin \left (\frac {2 \, c f}{d}\right ) \operatorname {Si}\left (\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) + 2 i \, \cos \left (e\right ) \sin \left (e\right ) \sin \left (\frac {2 \, c f}{d}\right ) \operatorname {Si}\left (\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) - \sin \left (e\right )^{2} \sin \left (\frac {2 \, c f}{d}\right ) \operatorname {Si}\left (\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) - \log \left (d x + c\right )}{2 \, a d} \] Input:
integrate(1/(d*x+c)/(a+I*a*cot(f*x+e)),x, algorithm="giac")
Output:
-1/2*(cos(e)^2*cos(2*c*f/d)*cos_integral(2*(d*f*x + c*f)/d) + 2*I*cos(e)*c os(2*c*f/d)*cos_integral(2*(d*f*x + c*f)/d)*sin(e) - cos(2*c*f/d)*cos_inte gral(2*(d*f*x + c*f)/d)*sin(e)^2 - I*cos(e)^2*cos_integral(2*(d*f*x + c*f) /d)*sin(2*c*f/d) + 2*cos(e)*cos_integral(2*(d*f*x + c*f)/d)*sin(e)*sin(2*c *f/d) + I*cos_integral(2*(d*f*x + c*f)/d)*sin(e)^2*sin(2*c*f/d) + I*cos(e) ^2*cos(2*c*f/d)*sin_integral(2*(d*f*x + c*f)/d) - 2*cos(e)*cos(2*c*f/d)*si n(e)*sin_integral(2*(d*f*x + c*f)/d) - I*cos(2*c*f/d)*sin(e)^2*sin_integra l(2*(d*f*x + c*f)/d) + cos(e)^2*sin(2*c*f/d)*sin_integral(2*(d*f*x + c*f)/ d) + 2*I*cos(e)*sin(e)*sin(2*c*f/d)*sin_integral(2*(d*f*x + c*f)/d) - sin( e)^2*sin(2*c*f/d)*sin_integral(2*(d*f*x + c*f)/d) - log(d*x + c))/(a*d)
Timed out. \[ \int \frac {1}{(c+d x) (a+i a \cot (e+f x))} \, dx=\int \frac {1}{\left (a+a\,\mathrm {cot}\left (e+f\,x\right )\,1{}\mathrm {i}\right )\,\left (c+d\,x\right )} \,d x \] Input:
int(1/((a + a*cot(e + f*x)*1i)*(c + d*x)),x)
Output:
int(1/((a + a*cot(e + f*x)*1i)*(c + d*x)), x)
\[ \int \frac {1}{(c+d x) (a+i a \cot (e+f x))} \, dx=\frac {\int \frac {1}{\cot \left (f x +e \right ) c i +\cot \left (f x +e \right ) d i x +c +d x}d x}{a} \] Input:
int(1/(d*x+c)/(a+I*a*cot(f*x+e)),x)
Output:
int(1/(cot(e + f*x)*c*i + cot(e + f*x)*d*i*x + c + d*x),x)/a