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

Optimal. Leaf size=209 $\frac{i (c+d x)}{8 f \left (a^3+i a^3 \tan (e+f x)\right )}+\frac{x (c+d x)}{8 a^3}+\frac{11 d}{96 f^2 \left (a^3+i a^3 \tan (e+f x)\right )}-\frac{11 i d x}{96 a^3 f}-\frac{d x^2}{16 a^3}+\frac{i (c+d x)}{8 a f (a+i a \tan (e+f x))^2}+\frac{i (c+d x)}{6 f (a+i a \tan (e+f x))^3}+\frac{5 d}{96 a f^2 (a+i a \tan (e+f x))^2}+\frac{d}{36 f^2 (a+i a \tan (e+f x))^3}$

[Out]

(((-11*I)/96)*d*x)/(a^3*f) - (d*x^2)/(16*a^3) + (x*(c + d*x))/(8*a^3) + d/(36*f^2*(a + I*a*Tan[e + f*x])^3) +
((I/6)*(c + d*x))/(f*(a + I*a*Tan[e + f*x])^3) + (5*d)/(96*a*f^2*(a + I*a*Tan[e + f*x])^2) + ((I/8)*(c + d*x))
/(a*f*(a + I*a*Tan[e + f*x])^2) + (11*d)/(96*f^2*(a^3 + I*a^3*Tan[e + f*x])) + ((I/8)*(c + d*x))/(f*(a^3 + I*a
^3*Tan[e + f*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.263967, antiderivative size = 209, normalized size of antiderivative = 1., number of steps used = 11, number of rules used = 3, integrand size = 21, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.143, Rules used = {3479, 8, 3730} $\frac{i (c+d x)}{8 f \left (a^3+i a^3 \tan (e+f x)\right )}+\frac{x (c+d x)}{8 a^3}+\frac{11 d}{96 f^2 \left (a^3+i a^3 \tan (e+f x)\right )}-\frac{11 i d x}{96 a^3 f}-\frac{d x^2}{16 a^3}+\frac{i (c+d x)}{8 a f (a+i a \tan (e+f x))^2}+\frac{i (c+d x)}{6 f (a+i a \tan (e+f x))^3}+\frac{5 d}{96 a f^2 (a+i a \tan (e+f x))^2}+\frac{d}{36 f^2 (a+i a \tan (e+f x))^3}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(((-11*I)/96)*d*x)/(a^3*f) - (d*x^2)/(16*a^3) + (x*(c + d*x))/(8*a^3) + d/(36*f^2*(a + I*a*Tan[e + f*x])^3) +
((I/6)*(c + d*x))/(f*(a + I*a*Tan[e + f*x])^3) + (5*d)/(96*a*f^2*(a + I*a*Tan[e + f*x])^2) + ((I/8)*(c + d*x))
/(a*f*(a + I*a*Tan[e + f*x])^2) + (11*d)/(96*f^2*(a^3 + I*a^3*Tan[e + f*x])) + ((I/8)*(c + d*x))/(f*(a^3 + I*a
^3*Tan[e + f*x]))

Rule 3479

Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(a*(a + b*Tan[c + d*x])^n)/(2*b*d*n), x] +
Dist[1/(2*a), Int[(a + b*Tan[c + d*x])^(n + 1), x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 + b^2, 0] && LtQ[n
, 0]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3730

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> With[{u = IntHide[(a
+ b*Tan[e + f*x])^n, x]}, Dist[(c + d*x)^m, u, x] - Dist[d*m, Int[Dist[(c + d*x)^(m - 1), u, x], x], x]] /; Fr
eeQ[{a, b, c, d, e, f}, x] && EqQ[a^2 + b^2, 0] && ILtQ[n, -1] && GtQ[m, 0]

Rubi steps

\begin{align*} \int \frac{c+d x}{(a+i a \tan (e+f x))^3} \, dx &=\frac{x (c+d x)}{8 a^3}+\frac{i (c+d x)}{6 f (a+i a \tan (e+f x))^3}+\frac{i (c+d x)}{8 a f (a+i a \tan (e+f x))^2}+\frac{i (c+d x)}{8 f \left (a^3+i a^3 \tan (e+f x)\right )}-d \int \left (\frac{x}{8 a^3}+\frac{i}{6 f (a+i a \tan (e+f x))^3}+\frac{i}{8 a f (a+i a \tan (e+f x))^2}+\frac{i}{8 f \left (a^3+i a^3 \tan (e+f x)\right )}\right ) \, dx\\ &=-\frac{d x^2}{16 a^3}+\frac{x (c+d x)}{8 a^3}+\frac{i (c+d x)}{6 f (a+i a \tan (e+f x))^3}+\frac{i (c+d x)}{8 a f (a+i a \tan (e+f x))^2}+\frac{i (c+d x)}{8 f \left (a^3+i a^3 \tan (e+f x)\right )}-\frac{(i d) \int \frac{1}{a^3+i a^3 \tan (e+f x)} \, dx}{8 f}-\frac{(i d) \int \frac{1}{(a+i a \tan (e+f x))^3} \, dx}{6 f}-\frac{(i d) \int \frac{1}{(a+i a \tan (e+f x))^2} \, dx}{8 a f}\\ &=-\frac{d x^2}{16 a^3}+\frac{x (c+d x)}{8 a^3}+\frac{d}{36 f^2 (a+i a \tan (e+f x))^3}+\frac{i (c+d x)}{6 f (a+i a \tan (e+f x))^3}+\frac{d}{32 a f^2 (a+i a \tan (e+f x))^2}+\frac{i (c+d x)}{8 a f (a+i a \tan (e+f x))^2}+\frac{d}{16 f^2 \left (a^3+i a^3 \tan (e+f x)\right )}+\frac{i (c+d x)}{8 f \left (a^3+i a^3 \tan (e+f x)\right )}-\frac{(i d) \int 1 \, dx}{16 a^3 f}-\frac{(i d) \int \frac{1}{a+i a \tan (e+f x)} \, dx}{16 a^2 f}-\frac{(i d) \int \frac{1}{(a+i a \tan (e+f x))^2} \, dx}{12 a f}\\ &=-\frac{i d x}{16 a^3 f}-\frac{d x^2}{16 a^3}+\frac{x (c+d x)}{8 a^3}+\frac{d}{36 f^2 (a+i a \tan (e+f x))^3}+\frac{i (c+d x)}{6 f (a+i a \tan (e+f x))^3}+\frac{5 d}{96 a f^2 (a+i a \tan (e+f x))^2}+\frac{i (c+d x)}{8 a f (a+i a \tan (e+f x))^2}+\frac{3 d}{32 f^2 \left (a^3+i a^3 \tan (e+f x)\right )}+\frac{i (c+d x)}{8 f \left (a^3+i a^3 \tan (e+f x)\right )}-\frac{(i d) \int 1 \, dx}{32 a^3 f}-\frac{(i d) \int \frac{1}{a+i a \tan (e+f x)} \, dx}{24 a^2 f}\\ &=-\frac{3 i d x}{32 a^3 f}-\frac{d x^2}{16 a^3}+\frac{x (c+d x)}{8 a^3}+\frac{d}{36 f^2 (a+i a \tan (e+f x))^3}+\frac{i (c+d x)}{6 f (a+i a \tan (e+f x))^3}+\frac{5 d}{96 a f^2 (a+i a \tan (e+f x))^2}+\frac{i (c+d x)}{8 a f (a+i a \tan (e+f x))^2}+\frac{11 d}{96 f^2 \left (a^3+i a^3 \tan (e+f x)\right )}+\frac{i (c+d x)}{8 f \left (a^3+i a^3 \tan (e+f x)\right )}-\frac{(i d) \int 1 \, dx}{48 a^3 f}\\ &=-\frac{11 i d x}{96 a^3 f}-\frac{d x^2}{16 a^3}+\frac{x (c+d x)}{8 a^3}+\frac{d}{36 f^2 (a+i a \tan (e+f x))^3}+\frac{i (c+d x)}{6 f (a+i a \tan (e+f x))^3}+\frac{5 d}{96 a f^2 (a+i a \tan (e+f x))^2}+\frac{i (c+d x)}{8 a f (a+i a \tan (e+f x))^2}+\frac{11 d}{96 f^2 \left (a^3+i a^3 \tan (e+f x)\right )}+\frac{i (c+d x)}{8 f \left (a^3+i a^3 \tan (e+f x)\right )}\\ \end{align*}

Mathematica [A]  time = 0.671978, size = 205, normalized size = 0.98 $\frac{i \sec ^3(e+f x) \left (4 \left (6 c f (6 f x+i)+d \left (18 f^2 x^2+6 i f x+1\right )\right ) \cos (3 (e+f x))+27 (12 i c f+d (5+12 i f x)) \cos (e+f x)+144 i c f^2 x \sin (3 (e+f x))-108 c f \sin (e+f x)+24 c f \sin (3 (e+f x))+72 i d f^2 x^2 \sin (3 (e+f x))-108 d f x \sin (e+f x)+24 d f x \sin (3 (e+f x))+81 i d \sin (e+f x)-4 i d \sin (3 (e+f x))\right )}{1152 a^3 f^2 (\tan (e+f x)-i)^3}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

((I/1152)*Sec[e + f*x]^3*(27*((12*I)*c*f + d*(5 + (12*I)*f*x))*Cos[e + f*x] + 4*(6*c*f*(I + 6*f*x) + d*(1 + (6
*I)*f*x + 18*f^2*x^2))*Cos[3*(e + f*x)] + (81*I)*d*Sin[e + f*x] - 108*c*f*Sin[e + f*x] - 108*d*f*x*Sin[e + f*x
] - (4*I)*d*Sin[3*(e + f*x)] + 24*c*f*Sin[3*(e + f*x)] + 24*d*f*x*Sin[3*(e + f*x)] + (144*I)*c*f^2*x*Sin[3*(e
+ f*x)] + (72*I)*d*f^2*x^2*Sin[3*(e + f*x)]))/(a^3*f^2*(-I + Tan[e + f*x])^3)

________________________________________________________________________________________

Maple [A]  time = 0.275, size = 114, normalized size = 0.6 \begin{align*}{\frac{d{x}^{2}}{16\,{a}^{3}}}+{\frac{cx}{8\,{a}^{3}}}+{\frac{{\frac{3\,i}{32}} \left ( 2\,dfx-id+2\,cf \right ){{\rm e}^{-2\,i \left ( fx+e \right ) }}}{{a}^{3}{f}^{2}}}+{\frac{{\frac{3\,i}{128}} \left ( 4\,dfx-id+4\,cf \right ){{\rm e}^{-4\,i \left ( fx+e \right ) }}}{{a}^{3}{f}^{2}}}+{\frac{{\frac{i}{288}} \left ( 6\,dfx-id+6\,cf \right ){{\rm e}^{-6\,i \left ( fx+e \right ) }}}{{a}^{3}{f}^{2}}} \end{align*}

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

[In]

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

[Out]

1/16*d*x^2/a^3+1/8/a^3*c*x+3/32*I*(2*d*f*x-I*d+2*c*f)/a^3/f^2*exp(-2*I*(f*x+e))+3/128*I*(4*d*f*x-I*d+4*c*f)/a^
3/f^2*exp(-4*I*(f*x+e))+1/288*I*(6*d*f*x-I*d+6*c*f)/a^3/f^2*exp(-6*I*(f*x+e))

________________________________________________________________________________________

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

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

[In]

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

[Out]

Exception raised: RuntimeError

________________________________________________________________________________________

Fricas [A]  time = 1.57334, size = 309, normalized size = 1.48 \begin{align*} \frac{{\left (24 i \, d f x + 24 i \, c f + 72 \,{\left (d f^{2} x^{2} + 2 \, c f^{2} x\right )} e^{\left (6 i \, f x + 6 i \, e\right )} +{\left (216 i \, d f x + 216 i \, c f + 108 \, d\right )} e^{\left (4 i \, f x + 4 i \, e\right )} +{\left (108 i \, d f x + 108 i \, c f + 27 \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + 4 \, d\right )} e^{\left (-6 i \, f x - 6 i \, e\right )}}{1152 \, a^{3} f^{2}} \end{align*}

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

[In]

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

[Out]

1/1152*(24*I*d*f*x + 24*I*c*f + 72*(d*f^2*x^2 + 2*c*f^2*x)*e^(6*I*f*x + 6*I*e) + (216*I*d*f*x + 216*I*c*f + 10
8*d)*e^(4*I*f*x + 4*I*e) + (108*I*d*f*x + 108*I*c*f + 27*d)*e^(2*I*f*x + 2*I*e) + 4*d)*e^(-6*I*f*x - 6*I*e)/(a
^3*f^2)

________________________________________________________________________________________

Sympy [A]  time = 1.29434, size = 313, normalized size = 1.5 \begin{align*} \begin{cases} \frac{\left (\left (24576 i a^{15} c f^{8} e^{18 i e} + 24576 i a^{15} d f^{8} x e^{18 i e} + 4096 a^{15} d f^{7} e^{18 i e}\right ) e^{- 6 i f x} + \left (110592 i a^{15} c f^{8} e^{20 i e} + 110592 i a^{15} d f^{8} x e^{20 i e} + 27648 a^{15} d f^{7} e^{20 i e}\right ) e^{- 4 i f x} + \left (221184 i a^{15} c f^{8} e^{22 i e} + 221184 i a^{15} d f^{8} x e^{22 i e} + 110592 a^{15} d f^{7} e^{22 i e}\right ) e^{- 2 i f x}\right ) e^{- 24 i e}}{1179648 a^{18} f^{9}} & \text{for}\: 1179648 a^{18} f^{9} e^{24 i e} \neq 0 \\\frac{x^{2} \left (3 d e^{4 i e} + 3 d e^{2 i e} + d\right ) e^{- 6 i e}}{16 a^{3}} + \frac{x \left (3 c e^{4 i e} + 3 c e^{2 i e} + c\right ) e^{- 6 i e}}{8 a^{3}} & \text{otherwise} \end{cases} + \frac{c x}{8 a^{3}} + \frac{d x^{2}}{16 a^{3}} \end{align*}

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

[In]

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

[Out]

Piecewise((((24576*I*a**15*c*f**8*exp(18*I*e) + 24576*I*a**15*d*f**8*x*exp(18*I*e) + 4096*a**15*d*f**7*exp(18*
I*e))*exp(-6*I*f*x) + (110592*I*a**15*c*f**8*exp(20*I*e) + 110592*I*a**15*d*f**8*x*exp(20*I*e) + 27648*a**15*d
*f**7*exp(20*I*e))*exp(-4*I*f*x) + (221184*I*a**15*c*f**8*exp(22*I*e) + 221184*I*a**15*d*f**8*x*exp(22*I*e) +
110592*a**15*d*f**7*exp(22*I*e))*exp(-2*I*f*x))*exp(-24*I*e)/(1179648*a**18*f**9), Ne(1179648*a**18*f**9*exp(2
4*I*e), 0)), (x**2*(3*d*exp(4*I*e) + 3*d*exp(2*I*e) + d)*exp(-6*I*e)/(16*a**3) + x*(3*c*exp(4*I*e) + 3*c*exp(2
*I*e) + c)*exp(-6*I*e)/(8*a**3), True)) + c*x/(8*a**3) + d*x**2/(16*a**3)

________________________________________________________________________________________

Giac [A]  time = 1.18024, size = 204, normalized size = 0.98 \begin{align*} \frac{{\left (72 \, d f^{2} x^{2} e^{\left (6 i \, f x + 6 i \, e\right )} + 144 \, c f^{2} x e^{\left (6 i \, f x + 6 i \, e\right )} + 216 i \, d f x e^{\left (4 i \, f x + 4 i \, e\right )} + 108 i \, d f x e^{\left (2 i \, f x + 2 i \, e\right )} + 24 i \, d f x + 216 i \, c f e^{\left (4 i \, f x + 4 i \, e\right )} + 108 i \, c f e^{\left (2 i \, f x + 2 i \, e\right )} + 24 i \, c f + 108 \, d e^{\left (4 i \, f x + 4 i \, e\right )} + 27 \, d e^{\left (2 i \, f x + 2 i \, e\right )} + 4 \, d\right )} e^{\left (-6 i \, f x - 6 i \, e\right )}}{1152 \, a^{3} f^{2}} \end{align*}

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

[In]

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

[Out]

1/1152*(72*d*f^2*x^2*e^(6*I*f*x + 6*I*e) + 144*c*f^2*x*e^(6*I*f*x + 6*I*e) + 216*I*d*f*x*e^(4*I*f*x + 4*I*e) +
108*I*d*f*x*e^(2*I*f*x + 2*I*e) + 24*I*d*f*x + 216*I*c*f*e^(4*I*f*x + 4*I*e) + 108*I*c*f*e^(2*I*f*x + 2*I*e)
+ 24*I*c*f + 108*d*e^(4*I*f*x + 4*I*e) + 27*d*e^(2*I*f*x + 2*I*e) + 4*d)*e^(-6*I*f*x - 6*I*e)/(a^3*f^2)