### 3.36 $$\int \frac{(c+d x)^m}{a+i a \tan (e+f x)} \, dx$$

Optimal. Leaf size=98 $\frac{(c+d x)^{m+1}}{2 a d (m+1)}+\frac{i 2^{-m-2} e^{-2 i \left (e-\frac{c f}{d}\right )} (c+d x)^m \left (\frac{i f (c+d x)}{d}\right )^{-m} \text{Gamma}\left (m+1,\frac{2 i f (c+d x)}{d}\right )}{a f}$

[Out]

(c + d*x)^(1 + m)/(2*a*d*(1 + m)) + (I*2^(-2 - m)*(c + d*x)^m*Gamma[1 + m, ((2*I)*f*(c + d*x))/d])/(a*E^((2*I)
*(e - (c*f)/d))*f*((I*f*(c + d*x))/d)^m)

________________________________________________________________________________________

Rubi [A]  time = 0.122808, antiderivative size = 98, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 23, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.087, Rules used = {3727, 2181} $\frac{(c+d x)^{m+1}}{2 a d (m+1)}+\frac{i 2^{-m-2} e^{-2 i \left (e-\frac{c f}{d}\right )} (c+d x)^m \left (\frac{i f (c+d x)}{d}\right )^{-m} \text{Gamma}\left (m+1,\frac{2 i f (c+d x)}{d}\right )}{a f}$

Antiderivative was successfully veriﬁed.

[In]

Int[(c + d*x)^m/(a + I*a*Tan[e + f*x]),x]

[Out]

(c + d*x)^(1 + m)/(2*a*d*(1 + m)) + (I*2^(-2 - m)*(c + d*x)^m*Gamma[1 + m, ((2*I)*f*(c + d*x))/d])/(a*E^((2*I)
*(e - (c*f)/d))*f*((I*f*(c + d*x))/d)^m)

Rule 3727

Int[((c_.) + (d_.)*(x_))^(m_)/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(c + d*x)^(m + 1)/(2*a
*d*(m + 1)), x] + Dist[1/(2*a), Int[(c + d*x)^m*E^((2*a*(e + f*x))/b), x], x] /; FreeQ[{a, b, c, d, e, f, m},
x] && EqQ[a^2 + b^2, 0] &&  !IntegerQ[m]

Rule 2181

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> -Simp[(F^(g*(e - (c*f)/d))*(c +
d*x)^FracPart[m]*Gamma[m + 1, (-((f*g*Log[F])/d))*(c + d*x)])/(d*(-((f*g*Log[F])/d))^(IntPart[m] + 1)*(-((f*g*
Log[F]*(c + d*x))/d))^FracPart[m]), x] /; FreeQ[{F, c, d, e, f, g, m}, x] &&  !IntegerQ[m]

Rubi steps

\begin{align*} \int \frac{(c+d x)^m}{a+i a \tan (e+f x)} \, dx &=\frac{(c+d x)^{1+m}}{2 a d (1+m)}+\frac{\int e^{-2 i (e+f x)} (c+d x)^m \, dx}{2 a}\\ &=\frac{(c+d x)^{1+m}}{2 a d (1+m)}+\frac{i 2^{-2-m} e^{-2 i \left (e-\frac{c f}{d}\right )} (c+d x)^m \left (\frac{i f (c+d x)}{d}\right )^{-m} \Gamma \left (1+m,\frac{2 i f (c+d x)}{d}\right )}{a f}\\ \end{align*}

Mathematica [B]  time = 1.22683, size = 205, normalized size = 2.09 $\frac{2^{-m-2} (c+d x)^m \sec (e+f x) \left (-\frac{i f (c+d x)}{d}\right )^m \left (\frac{f^2 (c+d x)^2}{d^2}\right )^{-m} \left (\sin \left (f \left (\frac{c}{d}+x\right )\right )-i \cos \left (f \left (\frac{c}{d}+x\right )\right )\right ) \left (d (m+1) \left (\sin \left (e-\frac{c f}{d}\right )+i \cos \left (e-\frac{c f}{d}\right )\right ) \text{Gamma}\left (m+1,\frac{2 i f (c+d x)}{d}\right )+f 2^{m+1} (c+d x) \left (\frac{i f (c+d x)}{d}\right )^m \left (\cos \left (e-\frac{c f}{d}\right )+i \sin \left (e-\frac{c f}{d}\right )\right )\right )}{a d f (m+1) (\tan (e+f x)-i)}$

Antiderivative was successfully veriﬁed.

[In]

Integrate[(c + d*x)^m/(a + I*a*Tan[e + f*x]),x]

[Out]

(2^(-2 - m)*(c + d*x)^m*(((-I)*f*(c + d*x))/d)^m*Sec[e + f*x]*(2^(1 + m)*f*(c + d*x)*((I*f*(c + d*x))/d)^m*(Co
s[e - (c*f)/d] + I*Sin[e - (c*f)/d]) + d*(1 + m)*Gamma[1 + m, ((2*I)*f*(c + d*x))/d]*(I*Cos[e - (c*f)/d] + Sin
[e - (c*f)/d]))*((-I)*Cos[f*(c/d + x)] + Sin[f*(c/d + x)]))/(a*d*f*(1 + m)*((f^2*(c + d*x)^2)/d^2)^m*(-I + Tan
[e + f*x]))

________________________________________________________________________________________

Maple [F]  time = 0.197, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( dx+c \right ) ^{m}}{a+ia\tan \left ( fx+e \right ) }}\, dx \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)^m/(a+I*a*tan(f*x+e)),x)

[Out]

int((d*x+c)^m/(a+I*a*tan(f*x+e)),x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{{\left (d m + d\right )} \int{\left (d x + c\right )}^{m} \cos \left (2 \, f x + 2 \, e\right )\,{d x} -{\left (i \, d m + i \, d\right )} \int{\left (d x + c\right )}^{m} \sin \left (2 \, f x + 2 \, e\right )\,{d x} + e^{\left (m \log \left (d x + c\right ) + \log \left (d x + c\right )\right )}}{2 \,{\left (a d m + a d\right )}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)^m/(a+I*a*tan(f*x+e)),x, algorithm="maxima")

[Out]

1/2*((d*m + d)*integrate((d*x + c)^m*cos(2*f*x + 2*e), x) - (I*d*m + I*d)*integrate((d*x + c)^m*sin(2*f*x + 2*
e), x) + e^(m*log(d*x + c) + log(d*x + c)))/(a*d*m + a*d)

________________________________________________________________________________________

Fricas [A]  time = 1.63216, size = 207, normalized size = 2.11 \begin{align*} \frac{{\left (i \, d m + i \, d\right )} e^{\left (-\frac{d m \log \left (\frac{2 i \, f}{d}\right ) + 2 i \, d e - 2 i \, c f}{d}\right )} \Gamma \left (m + 1, \frac{2 i \, d f x + 2 i \, c f}{d}\right ) + 2 \,{\left (d f x + c f\right )}{\left (d x + c\right )}^{m}}{4 \,{\left (a d f m + a d f\right )}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)^m/(a+I*a*tan(f*x+e)),x, algorithm="fricas")

[Out]

1/4*((I*d*m + I*d)*e^(-(d*m*log(2*I*f/d) + 2*I*d*e - 2*I*c*f)/d)*gamma(m + 1, (2*I*d*f*x + 2*I*c*f)/d) + 2*(d*
f*x + c*f)*(d*x + c)^m)/(a*d*f*m + a*d*f)

________________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)**m/(a+I*a*tan(f*x+e)),x)

[Out]

Exception raised: AttributeError

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (d x + c\right )}^{m}}{i \, a \tan \left (f x + e\right ) + a}\,{d x} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)^m/(a+I*a*tan(f*x+e)),x, algorithm="giac")

[Out]

integrate((d*x + c)^m/(I*a*tan(f*x + e) + a), x)