Integrand size = 23, antiderivative size = 270 \[ \int \frac {(c+d x)^3}{(a+i a \tan (e+f x))^2} \, dx=-\frac {3 d^3 e^{-2 i e-2 i f x}}{16 a^2 f^4}-\frac {3 d^3 e^{-4 i e-4 i f x}}{512 a^2 f^4}-\frac {3 i d^2 e^{-2 i e-2 i f x} (c+d x)}{8 a^2 f^3}-\frac {3 i d^2 e^{-4 i e-4 i f x} (c+d x)}{128 a^2 f^3}+\frac {3 d e^{-2 i e-2 i f x} (c+d x)^2}{8 a^2 f^2}+\frac {3 d e^{-4 i e-4 i f x} (c+d x)^2}{64 a^2 f^2}+\frac {i e^{-2 i e-2 i f x} (c+d x)^3}{4 a^2 f}+\frac {i e^{-4 i e-4 i f x} (c+d x)^3}{16 a^2 f}+\frac {(c+d x)^4}{16 a^2 d} \] Output:
-3/16*d^3*exp(-2*I*e-2*I*f*x)/a^2/f^4-3/512*d^3*exp(-4*I*e-4*I*f*x)/a^2/f^ 4-3/8*I*d^2*exp(-2*I*e-2*I*f*x)*(d*x+c)/a^2/f^3-3/128*I*d^2*exp(-4*I*e-4*I *f*x)*(d*x+c)/a^2/f^3+3/8*d*exp(-2*I*e-2*I*f*x)*(d*x+c)^2/a^2/f^2+3/64*d*e xp(-4*I*e-4*I*f*x)*(d*x+c)^2/a^2/f^2+1/4*I*exp(-2*I*e-2*I*f*x)*(d*x+c)^3/a ^2/f+1/16*I*exp(-4*I*e-4*I*f*x)*(d*x+c)^3/a^2/f+1/16*(d*x+c)^4/a^2/d
Time = 2.28 (sec) , antiderivative size = 473, normalized size of antiderivative = 1.75 \[ \int \frac {(c+d x)^3}{(a+i a \tan (e+f x))^2} \, dx=\frac {\sec ^2(e+f x) (\cos (f x)+i \sin (f x))^2 \left (\left (4 i c^3 f^3+6 c^2 d f^2 (1+2 i f x)+6 c d^2 f \left (-i+2 f x+2 i f^2 x^2\right )+d^3 \left (-3-6 i f x+6 f^2 x^2+4 i f^3 x^3\right )\right ) \cos (2 f x)+\frac {1}{32} \left (32 i c^3 f^3+24 c^2 d f^2 (1+4 i f x)+12 c d^2 f \left (-i+4 f x+8 i f^2 x^2\right )+d^3 \left (-3-12 i f x+24 f^2 x^2+32 i f^3 x^3\right )\right ) \cos (4 f x) (\cos (2 e)-i \sin (2 e))+f^4 x \left (4 c^3+6 c^2 d x+4 c d^2 x^2+d^3 x^3\right ) (\cos (2 e)+i \sin (2 e))+\left (4 c^3 f^3+6 c^2 d f^2 (-i+2 f x)+6 c d^2 f \left (-1-2 i f x+2 f^2 x^2\right )+d^3 \left (3 i-6 f x-6 i f^2 x^2+4 f^3 x^3\right )\right ) \sin (2 f x)+\frac {1}{32} \left (32 c^3 f^3+24 c^2 d f^2 (-i+4 f x)+12 c d^2 f \left (-1-4 i f x+8 f^2 x^2\right )+d^3 \left (3 i-12 f x-24 i f^2 x^2+32 f^3 x^3\right )\right ) (\cos (2 e)-i \sin (2 e)) \sin (4 f x)\right )}{16 f^4 (a+i a \tan (e+f x))^2} \] Input:
Integrate[(c + d*x)^3/(a + I*a*Tan[e + f*x])^2,x]
Output:
(Sec[e + f*x]^2*(Cos[f*x] + I*Sin[f*x])^2*(((4*I)*c^3*f^3 + 6*c^2*d*f^2*(1 + (2*I)*f*x) + 6*c*d^2*f*(-I + 2*f*x + (2*I)*f^2*x^2) + d^3*(-3 - (6*I)*f *x + 6*f^2*x^2 + (4*I)*f^3*x^3))*Cos[2*f*x] + (((32*I)*c^3*f^3 + 24*c^2*d* f^2*(1 + (4*I)*f*x) + 12*c*d^2*f*(-I + 4*f*x + (8*I)*f^2*x^2) + d^3*(-3 - (12*I)*f*x + 24*f^2*x^2 + (32*I)*f^3*x^3))*Cos[4*f*x]*(Cos[2*e] - I*Sin[2* e]))/32 + f^4*x*(4*c^3 + 6*c^2*d*x + 4*c*d^2*x^2 + d^3*x^3)*(Cos[2*e] + I* Sin[2*e]) + (4*c^3*f^3 + 6*c^2*d*f^2*(-I + 2*f*x) + 6*c*d^2*f*(-1 - (2*I)* f*x + 2*f^2*x^2) + d^3*(3*I - 6*f*x - (6*I)*f^2*x^2 + 4*f^3*x^3))*Sin[2*f* x] + ((32*c^3*f^3 + 24*c^2*d*f^2*(-I + 4*f*x) + 12*c*d^2*f*(-1 - (4*I)*f*x + 8*f^2*x^2) + d^3*(3*I - 12*f*x - (24*I)*f^2*x^2 + 32*f^3*x^3))*(Cos[2*e ] - I*Sin[2*e])*Sin[4*f*x])/32))/(16*f^4*(a + I*a*Tan[e + f*x])^2)
Time = 0.54 (sec) , antiderivative size = 270, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3042, 4212, 2009}
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 {(c+d x)^3}{(a+i a \tan (e+f x))^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(c+d x)^3}{(a+i a \tan (e+f x))^2}dx\) |
\(\Big \downarrow \) 4212 |
\(\displaystyle \int \left (\frac {(c+d x)^3 e^{-2 i e-2 i f x}}{2 a^2}+\frac {(c+d x)^3 e^{-4 i e-4 i f x}}{4 a^2}+\frac {(c+d x)^3}{4 a^2}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {3 i d^2 (c+d x) e^{-2 i e-2 i f x}}{8 a^2 f^3}-\frac {3 i d^2 (c+d x) e^{-4 i e-4 i f x}}{128 a^2 f^3}+\frac {3 d (c+d x)^2 e^{-2 i e-2 i f x}}{8 a^2 f^2}+\frac {3 d (c+d x)^2 e^{-4 i e-4 i f x}}{64 a^2 f^2}+\frac {i (c+d x)^3 e^{-2 i e-2 i f x}}{4 a^2 f}+\frac {i (c+d x)^3 e^{-4 i e-4 i f x}}{16 a^2 f}+\frac {(c+d x)^4}{16 a^2 d}-\frac {3 d^3 e^{-2 i e-2 i f x}}{16 a^2 f^4}-\frac {3 d^3 e^{-4 i e-4 i f x}}{512 a^2 f^4}\) |
Input:
Int[(c + d*x)^3/(a + I*a*Tan[e + f*x])^2,x]
Output:
(-3*d^3*E^((-2*I)*e - (2*I)*f*x))/(16*a^2*f^4) - (3*d^3*E^((-4*I)*e - (4*I )*f*x))/(512*a^2*f^4) - (((3*I)/8)*d^2*E^((-2*I)*e - (2*I)*f*x)*(c + d*x)) /(a^2*f^3) - (((3*I)/128)*d^2*E^((-4*I)*e - (4*I)*f*x)*(c + d*x))/(a^2*f^3 ) + (3*d*E^((-2*I)*e - (2*I)*f*x)*(c + d*x)^2)/(8*a^2*f^2) + (3*d*E^((-4*I )*e - (4*I)*f*x)*(c + d*x)^2)/(64*a^2*f^2) + ((I/4)*E^((-2*I)*e - (2*I)*f* x)*(c + d*x)^3)/(a^2*f) + ((I/16)*E^((-4*I)*e - (4*I)*f*x)*(c + d*x)^3)/(a ^2*f) + (c + d*x)^4/(16*a^2*d)
Int[((c_.) + (d_.)*(x_))^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Int[ExpandIntegrand[(c + d*x)^m, (1/(2*a) + E^(2*(a/b)*(e + f* x))/(2*a))^(-n), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[a^2 + b^2 , 0] && ILtQ[n, 0]
Time = 0.97 (sec) , antiderivative size = 283, normalized size of antiderivative = 1.05
method | result | size |
risch | \(\frac {d^{3} x^{4}}{16 a^{2}}+\frac {d^{2} c \,x^{3}}{4 a^{2}}+\frac {3 d \,c^{2} x^{2}}{8 a^{2}}+\frac {c^{3} x}{4 a^{2}}+\frac {c^{4}}{16 a^{2} d}+\frac {i \left (4 d^{3} x^{3} f^{3}+12 c \,d^{2} f^{3} x^{2}-6 i d^{3} f^{2} x^{2}+12 c^{2} d \,f^{3} x -12 i c \,d^{2} f^{2} x +4 c^{3} f^{3}-6 i c^{2} d \,f^{2}-6 d^{3} f x -6 c \,d^{2} f +3 i d^{3}\right ) {\mathrm e}^{-2 i \left (f x +e \right )}}{16 a^{2} f^{4}}+\frac {i \left (32 d^{3} x^{3} f^{3}+96 c \,d^{2} f^{3} x^{2}-24 i d^{3} f^{2} x^{2}+96 c^{2} d \,f^{3} x -48 i c \,d^{2} f^{2} x +32 c^{3} f^{3}-24 i c^{2} d \,f^{2}-12 d^{3} f x -12 c \,d^{2} f +3 i d^{3}\right ) {\mathrm e}^{-4 i \left (f x +e \right )}}{512 a^{2} f^{4}}\) | \(283\) |
Input:
int((d*x+c)^3/(a+I*a*tan(f*x+e))^2,x,method=_RETURNVERBOSE)
Output:
1/16/a^2*d^3*x^4+1/4/a^2*d^2*c*x^3+3/8/a^2*d*c^2*x^2+1/4/a^2*c^3*x+1/16/a^ 2/d*c^4+1/16*I*(4*d^3*x^3*f^3-6*I*d^3*f^2*x^2+12*c*d^2*f^3*x^2-12*I*c*d^2* f^2*x+12*c^2*d*f^3*x-6*I*c^2*d*f^2+4*c^3*f^3-6*d^3*f*x+3*I*d^3-6*c*d^2*f)/ a^2/f^4*exp(-2*I*(f*x+e))+1/512*I*(32*d^3*x^3*f^3-24*I*d^3*f^2*x^2+96*c*d^ 2*f^3*x^2-48*I*c*d^2*f^2*x+96*c^2*d*f^3*x-24*I*c^2*d*f^2+32*c^3*f^3-12*d^3 *f*x+3*I*d^3-12*c*d^2*f)/a^2/f^4*exp(-4*I*(f*x+e))
Time = 0.07 (sec) , antiderivative size = 267, normalized size of antiderivative = 0.99 \[ \int \frac {(c+d x)^3}{(a+i a \tan (e+f x))^2} \, dx=\frac {{\left (32 i \, d^{3} f^{3} x^{3} + 32 i \, c^{3} f^{3} + 24 \, c^{2} d f^{2} - 12 i \, c d^{2} f - 3 \, d^{3} - 24 \, {\left (-4 i \, c d^{2} f^{3} - d^{3} f^{2}\right )} x^{2} - 12 \, {\left (-8 i \, c^{2} d f^{3} - 4 \, c d^{2} f^{2} + i \, d^{3} f\right )} x + 32 \, {\left (d^{3} f^{4} x^{4} + 4 \, c d^{2} f^{4} x^{3} + 6 \, c^{2} d f^{4} x^{2} + 4 \, c^{3} f^{4} x\right )} e^{\left (4 i \, f x + 4 i \, e\right )} - 32 \, {\left (-4 i \, d^{3} f^{3} x^{3} - 4 i \, c^{3} f^{3} - 6 \, c^{2} d f^{2} + 6 i \, c d^{2} f + 3 \, d^{3} + 6 \, {\left (-2 i \, c d^{2} f^{3} - d^{3} f^{2}\right )} x^{2} + 6 \, {\left (-2 i \, c^{2} d f^{3} - 2 \, c d^{2} f^{2} + i \, d^{3} f\right )} x\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} e^{\left (-4 i \, f x - 4 i \, e\right )}}{512 \, a^{2} f^{4}} \] Input:
integrate((d*x+c)^3/(a+I*a*tan(f*x+e))^2,x, algorithm="fricas")
Output:
1/512*(32*I*d^3*f^3*x^3 + 32*I*c^3*f^3 + 24*c^2*d*f^2 - 12*I*c*d^2*f - 3*d ^3 - 24*(-4*I*c*d^2*f^3 - d^3*f^2)*x^2 - 12*(-8*I*c^2*d*f^3 - 4*c*d^2*f^2 + I*d^3*f)*x + 32*(d^3*f^4*x^4 + 4*c*d^2*f^4*x^3 + 6*c^2*d*f^4*x^2 + 4*c^3 *f^4*x)*e^(4*I*f*x + 4*I*e) - 32*(-4*I*d^3*f^3*x^3 - 4*I*c^3*f^3 - 6*c^2*d *f^2 + 6*I*c*d^2*f + 3*d^3 + 6*(-2*I*c*d^2*f^3 - d^3*f^2)*x^2 + 6*(-2*I*c^ 2*d*f^3 - 2*c*d^2*f^2 + I*d^3*f)*x)*e^(2*I*f*x + 2*I*e))*e^(-4*I*f*x - 4*I *e)/(a^2*f^4)
Time = 0.36 (sec) , antiderivative size = 665, normalized size of antiderivative = 2.46 \[ \int \frac {(c+d x)^3}{(a+i a \tan (e+f x))^2} \, dx=\begin {cases} \frac {\left (\left (512 i a^{2} c^{3} f^{7} e^{2 i e} + 1536 i a^{2} c^{2} d f^{7} x e^{2 i e} + 384 a^{2} c^{2} d f^{6} e^{2 i e} + 1536 i a^{2} c d^{2} f^{7} x^{2} e^{2 i e} + 768 a^{2} c d^{2} f^{6} x e^{2 i e} - 192 i a^{2} c d^{2} f^{5} e^{2 i e} + 512 i a^{2} d^{3} f^{7} x^{3} e^{2 i e} + 384 a^{2} d^{3} f^{6} x^{2} e^{2 i e} - 192 i a^{2} d^{3} f^{5} x e^{2 i e} - 48 a^{2} d^{3} f^{4} e^{2 i e}\right ) e^{- 4 i f x} + \left (2048 i a^{2} c^{3} f^{7} e^{4 i e} + 6144 i a^{2} c^{2} d f^{7} x e^{4 i e} + 3072 a^{2} c^{2} d f^{6} e^{4 i e} + 6144 i a^{2} c d^{2} f^{7} x^{2} e^{4 i e} + 6144 a^{2} c d^{2} f^{6} x e^{4 i e} - 3072 i a^{2} c d^{2} f^{5} e^{4 i e} + 2048 i a^{2} d^{3} f^{7} x^{3} e^{4 i e} + 3072 a^{2} d^{3} f^{6} x^{2} e^{4 i e} - 3072 i a^{2} d^{3} f^{5} x e^{4 i e} - 1536 a^{2} d^{3} f^{4} e^{4 i e}\right ) e^{- 2 i f x}\right ) e^{- 6 i e}}{8192 a^{4} f^{8}} & \text {for}\: a^{4} f^{8} e^{6 i e} \neq 0 \\\frac {x^{4} \cdot \left (2 d^{3} e^{2 i e} + d^{3}\right ) e^{- 4 i e}}{16 a^{2}} + \frac {x^{3} \cdot \left (2 c d^{2} e^{2 i e} + c d^{2}\right ) e^{- 4 i e}}{4 a^{2}} + \frac {x^{2} \cdot \left (6 c^{2} d e^{2 i e} + 3 c^{2} d\right ) e^{- 4 i e}}{8 a^{2}} + \frac {x \left (2 c^{3} e^{2 i e} + c^{3}\right ) e^{- 4 i e}}{4 a^{2}} & \text {otherwise} \end {cases} + \frac {c^{3} x}{4 a^{2}} + \frac {3 c^{2} d x^{2}}{8 a^{2}} + \frac {c d^{2} x^{3}}{4 a^{2}} + \frac {d^{3} x^{4}}{16 a^{2}} \] Input:
integrate((d*x+c)**3/(a+I*a*tan(f*x+e))**2,x)
Output:
Piecewise((((512*I*a**2*c**3*f**7*exp(2*I*e) + 1536*I*a**2*c**2*d*f**7*x*e xp(2*I*e) + 384*a**2*c**2*d*f**6*exp(2*I*e) + 1536*I*a**2*c*d**2*f**7*x**2 *exp(2*I*e) + 768*a**2*c*d**2*f**6*x*exp(2*I*e) - 192*I*a**2*c*d**2*f**5*e xp(2*I*e) + 512*I*a**2*d**3*f**7*x**3*exp(2*I*e) + 384*a**2*d**3*f**6*x**2 *exp(2*I*e) - 192*I*a**2*d**3*f**5*x*exp(2*I*e) - 48*a**2*d**3*f**4*exp(2* I*e))*exp(-4*I*f*x) + (2048*I*a**2*c**3*f**7*exp(4*I*e) + 6144*I*a**2*c**2 *d*f**7*x*exp(4*I*e) + 3072*a**2*c**2*d*f**6*exp(4*I*e) + 6144*I*a**2*c*d* *2*f**7*x**2*exp(4*I*e) + 6144*a**2*c*d**2*f**6*x*exp(4*I*e) - 3072*I*a**2 *c*d**2*f**5*exp(4*I*e) + 2048*I*a**2*d**3*f**7*x**3*exp(4*I*e) + 3072*a** 2*d**3*f**6*x**2*exp(4*I*e) - 3072*I*a**2*d**3*f**5*x*exp(4*I*e) - 1536*a* *2*d**3*f**4*exp(4*I*e))*exp(-2*I*f*x))*exp(-6*I*e)/(8192*a**4*f**8), Ne(a **4*f**8*exp(6*I*e), 0)), (x**4*(2*d**3*exp(2*I*e) + d**3)*exp(-4*I*e)/(16 *a**2) + x**3*(2*c*d**2*exp(2*I*e) + c*d**2)*exp(-4*I*e)/(4*a**2) + x**2*( 6*c**2*d*exp(2*I*e) + 3*c**2*d)*exp(-4*I*e)/(8*a**2) + x*(2*c**3*exp(2*I*e ) + c**3)*exp(-4*I*e)/(4*a**2), True)) + c**3*x/(4*a**2) + 3*c**2*d*x**2/( 8*a**2) + c*d**2*x**3/(4*a**2) + d**3*x**4/(16*a**2)
Exception generated. \[ \int \frac {(c+d x)^3}{(a+i a \tan (e+f x))^2} \, dx=\text {Exception raised: RuntimeError} \] Input:
integrate((d*x+c)^3/(a+I*a*tan(f*x+e))^2,x, algorithm="maxima")
Output:
Exception raised: RuntimeError >> ECL says: expt: undefined: 0 to a negati ve exponent.
Time = 0.25 (sec) , antiderivative size = 368, normalized size of antiderivative = 1.36 \[ \int \frac {(c+d x)^3}{(a+i a \tan (e+f x))^2} \, dx=\frac {{\left (32 \, d^{3} f^{4} x^{4} e^{\left (4 i \, f x + 4 i \, e\right )} + 128 \, c d^{2} f^{4} x^{3} e^{\left (4 i \, f x + 4 i \, e\right )} + 192 \, c^{2} d f^{4} x^{2} e^{\left (4 i \, f x + 4 i \, e\right )} + 128 i \, d^{3} f^{3} x^{3} e^{\left (2 i \, f x + 2 i \, e\right )} + 32 i \, d^{3} f^{3} x^{3} + 128 \, c^{3} f^{4} x e^{\left (4 i \, f x + 4 i \, e\right )} + 384 i \, c d^{2} f^{3} x^{2} e^{\left (2 i \, f x + 2 i \, e\right )} + 96 i \, c d^{2} f^{3} x^{2} + 384 i \, c^{2} d f^{3} x e^{\left (2 i \, f x + 2 i \, e\right )} + 192 \, d^{3} f^{2} x^{2} e^{\left (2 i \, f x + 2 i \, e\right )} + 96 i \, c^{2} d f^{3} x + 24 \, d^{3} f^{2} x^{2} + 128 i \, c^{3} f^{3} e^{\left (2 i \, f x + 2 i \, e\right )} + 384 \, c d^{2} f^{2} x e^{\left (2 i \, f x + 2 i \, e\right )} + 32 i \, c^{3} f^{3} + 48 \, c d^{2} f^{2} x + 192 \, c^{2} d f^{2} e^{\left (2 i \, f x + 2 i \, e\right )} - 192 i \, d^{3} f x e^{\left (2 i \, f x + 2 i \, e\right )} + 24 \, c^{2} d f^{2} - 12 i \, d^{3} f x - 192 i \, c d^{2} f e^{\left (2 i \, f x + 2 i \, e\right )} - 12 i \, c d^{2} f - 96 \, d^{3} e^{\left (2 i \, f x + 2 i \, e\right )} - 3 \, d^{3}\right )} e^{\left (-4 i \, f x - 4 i \, e\right )}}{512 \, a^{2} f^{4}} \] Input:
integrate((d*x+c)^3/(a+I*a*tan(f*x+e))^2,x, algorithm="giac")
Output:
1/512*(32*d^3*f^4*x^4*e^(4*I*f*x + 4*I*e) + 128*c*d^2*f^4*x^3*e^(4*I*f*x + 4*I*e) + 192*c^2*d*f^4*x^2*e^(4*I*f*x + 4*I*e) + 128*I*d^3*f^3*x^3*e^(2*I *f*x + 2*I*e) + 32*I*d^3*f^3*x^3 + 128*c^3*f^4*x*e^(4*I*f*x + 4*I*e) + 384 *I*c*d^2*f^3*x^2*e^(2*I*f*x + 2*I*e) + 96*I*c*d^2*f^3*x^2 + 384*I*c^2*d*f^ 3*x*e^(2*I*f*x + 2*I*e) + 192*d^3*f^2*x^2*e^(2*I*f*x + 2*I*e) + 96*I*c^2*d *f^3*x + 24*d^3*f^2*x^2 + 128*I*c^3*f^3*e^(2*I*f*x + 2*I*e) + 384*c*d^2*f^ 2*x*e^(2*I*f*x + 2*I*e) + 32*I*c^3*f^3 + 48*c*d^2*f^2*x + 192*c^2*d*f^2*e^ (2*I*f*x + 2*I*e) - 192*I*d^3*f*x*e^(2*I*f*x + 2*I*e) + 24*c^2*d*f^2 - 12* I*d^3*f*x - 192*I*c*d^2*f*e^(2*I*f*x + 2*I*e) - 12*I*c*d^2*f - 96*d^3*e^(2 *I*f*x + 2*I*e) - 3*d^3)*e^(-4*I*f*x - 4*I*e)/(a^2*f^4)
Time = 9.13 (sec) , antiderivative size = 289, normalized size of antiderivative = 1.07 \[ \int \frac {(c+d x)^3}{(a+i a \tan (e+f x))^2} \, dx={\mathrm {e}}^{-e\,2{}\mathrm {i}-f\,x\,2{}\mathrm {i}}\,\left (\frac {\left (4\,c^3\,f^3-c^2\,d\,f^2\,6{}\mathrm {i}-6\,c\,d^2\,f+d^3\,3{}\mathrm {i}\right )\,1{}\mathrm {i}}{16\,a^2\,f^4}+\frac {d^3\,x^3\,1{}\mathrm {i}}{4\,a^2\,f}-\frac {d\,x\,\left (-2\,c^2\,f^2+c\,d\,f\,2{}\mathrm {i}+d^2\right )\,3{}\mathrm {i}}{8\,a^2\,f^3}-\frac {d^2\,x^2\,\left (-2\,c\,f+d\,1{}\mathrm {i}\right )\,3{}\mathrm {i}}{8\,a^2\,f^2}\right )+{\mathrm {e}}^{-e\,4{}\mathrm {i}-f\,x\,4{}\mathrm {i}}\,\left (\frac {\left (32\,c^3\,f^3-c^2\,d\,f^2\,24{}\mathrm {i}-12\,c\,d^2\,f+d^3\,3{}\mathrm {i}\right )\,1{}\mathrm {i}}{512\,a^2\,f^4}+\frac {d^3\,x^3\,1{}\mathrm {i}}{16\,a^2\,f}-\frac {d\,x\,\left (-8\,c^2\,f^2+c\,d\,f\,4{}\mathrm {i}+d^2\right )\,3{}\mathrm {i}}{128\,a^2\,f^3}-\frac {d^2\,x^2\,\left (-4\,c\,f+d\,1{}\mathrm {i}\right )\,3{}\mathrm {i}}{64\,a^2\,f^2}\right )+\frac {c^3\,x}{4\,a^2}+\frac {d^3\,x^4}{16\,a^2}+\frac {3\,c^2\,d\,x^2}{8\,a^2}+\frac {c\,d^2\,x^3}{4\,a^2} \] Input:
int((c + d*x)^3/(a + a*tan(e + f*x)*1i)^2,x)
Output:
exp(- e*2i - f*x*2i)*(((d^3*3i + 4*c^3*f^3 - c^2*d*f^2*6i - 6*c*d^2*f)*1i) /(16*a^2*f^4) + (d^3*x^3*1i)/(4*a^2*f) - (d*x*(d^2 - 2*c^2*f^2 + c*d*f*2i) *3i)/(8*a^2*f^3) - (d^2*x^2*(d*1i - 2*c*f)*3i)/(8*a^2*f^2)) + exp(- e*4i - f*x*4i)*(((d^3*3i + 32*c^3*f^3 - c^2*d*f^2*24i - 12*c*d^2*f)*1i)/(512*a^2 *f^4) + (d^3*x^3*1i)/(16*a^2*f) - (d*x*(d^2 - 8*c^2*f^2 + c*d*f*4i)*3i)/(1 28*a^2*f^3) - (d^2*x^2*(d*1i - 4*c*f)*3i)/(64*a^2*f^2)) + (c^3*x)/(4*a^2) + (d^3*x^4)/(16*a^2) + (3*c^2*d*x^2)/(8*a^2) + (c*d^2*x^3)/(4*a^2)
\[ \int \frac {(c+d x)^3}{(a+i a \tan (e+f x))^2} \, dx=\frac {-\left (\int \frac {x^{3}}{\tan \left (f x +e \right )^{2}-2 \tan \left (f x +e \right ) i -1}d x \right ) d^{3}-3 \left (\int \frac {x^{2}}{\tan \left (f x +e \right )^{2}-2 \tan \left (f x +e \right ) i -1}d x \right ) c \,d^{2}-3 \left (\int \frac {x}{\tan \left (f x +e \right )^{2}-2 \tan \left (f x +e \right ) i -1}d x \right ) c^{2} d -\left (\int \frac {1}{\tan \left (f x +e \right )^{2}-2 \tan \left (f x +e \right ) i -1}d x \right ) c^{3}}{a^{2}} \] Input:
int((d*x+c)^3/(a+I*a*tan(f*x+e))^2,x)
Output:
( - int(x**3/(tan(e + f*x)**2 - 2*tan(e + f*x)*i - 1),x)*d**3 - 3*int(x**2 /(tan(e + f*x)**2 - 2*tan(e + f*x)*i - 1),x)*c*d**2 - 3*int(x/(tan(e + f*x )**2 - 2*tan(e + f*x)*i - 1),x)*c**2*d - int(1/(tan(e + f*x)**2 - 2*tan(e + f*x)*i - 1),x)*c**3)/a**2