Integrand size = 34, antiderivative size = 185 \[ \int \frac {\tan ^4(c+d x) (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^4} \, dx=\frac {(A+15 i B) x}{16 a^4}-\frac {B \log (\cos (c+d x))}{a^4 d}-\frac {i A-15 B}{16 a^4 d (1+i \tan (c+d x))}-\frac {(i A-7 B) \tan ^2(c+d x)}{16 a^4 d (1+i \tan (c+d x))^2}+\frac {(i A-B) \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}+\frac {(A+3 i B) \tan ^3(c+d x)}{12 a d (a+i a \tan (c+d x))^3} \] Output:
1/16*(A+15*I*B)*x/a^4-B*ln(cos(d*x+c))/a^4/d-1/16*(I*A-15*B)/a^4/d/(1+I*ta n(d*x+c))-1/16*(I*A-7*B)*tan(d*x+c)^2/a^4/d/(1+I*tan(d*x+c))^2+1/8*(I*A-B) *tan(d*x+c)^4/d/(a+I*a*tan(d*x+c))^4+1/12*(A+3*I*B)*tan(d*x+c)^3/a/d/(a+I* a*tan(d*x+c))^3
Time = 0.85 (sec) , antiderivative size = 264, normalized size of antiderivative = 1.43 \[ \int \frac {\tan ^4(c+d x) (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^4} \, dx=\frac {\sec ^4(c+d x) (18 i A-48 B+8 (-4 i A+21 B) \cos (2 (c+d x))+2 \cos (4 (c+d x)) (7 i A-60 B+(-3 i A+93 B) \log (i-\tan (c+d x))+3 (i A+B) \log (i+\tan (c+d x)))+16 A \sin (2 (c+d x))+144 i B \sin (2 (c+d x))-11 A \sin (4 (c+d x))-117 i B \sin (4 (c+d x))+6 A \log (i-\tan (c+d x)) \sin (4 (c+d x))+186 i B \log (i-\tan (c+d x)) \sin (4 (c+d x))-6 A \log (i+\tan (c+d x)) \sin (4 (c+d x))+6 i B \log (i+\tan (c+d x)) \sin (4 (c+d x)))}{192 a^4 d (-i+\tan (c+d x))^4} \] Input:
Integrate[(Tan[c + d*x]^4*(A + B*Tan[c + d*x]))/(a + I*a*Tan[c + d*x])^4,x ]
Output:
(Sec[c + d*x]^4*((18*I)*A - 48*B + 8*((-4*I)*A + 21*B)*Cos[2*(c + d*x)] + 2*Cos[4*(c + d*x)]*((7*I)*A - 60*B + ((-3*I)*A + 93*B)*Log[I - Tan[c + d*x ]] + 3*(I*A + B)*Log[I + Tan[c + d*x]]) + 16*A*Sin[2*(c + d*x)] + (144*I)* B*Sin[2*(c + d*x)] - 11*A*Sin[4*(c + d*x)] - (117*I)*B*Sin[4*(c + d*x)] + 6*A*Log[I - Tan[c + d*x]]*Sin[4*(c + d*x)] + (186*I)*B*Log[I - Tan[c + d*x ]]*Sin[4*(c + d*x)] - 6*A*Log[I + Tan[c + d*x]]*Sin[4*(c + d*x)] + (6*I)*B *Log[I + Tan[c + d*x]]*Sin[4*(c + d*x)]))/(192*a^4*d*(-I + Tan[c + d*x])^4 )
Time = 1.18 (sec) , antiderivative size = 203, normalized size of antiderivative = 1.10, number of steps used = 17, number of rules used = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3042, 4078, 27, 3042, 4078, 27, 3042, 4078, 27, 3042, 4072, 25, 27, 3042, 3956, 4009, 24}
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 {\tan ^4(c+d x) (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^4} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\tan (c+d x)^4 (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^4}dx\) |
\(\Big \downarrow \) 4078 |
\(\displaystyle \frac {(-B+i A) \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}-\frac {\int \frac {4 \tan ^3(c+d x) (a (i A-B)+2 i a B \tan (c+d x))}{(i \tan (c+d x) a+a)^3}dx}{8 a^2}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {(-B+i A) \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}-\frac {\int \frac {\tan ^3(c+d x) (a (i A-B)+2 i a B \tan (c+d x))}{(i \tan (c+d x) a+a)^3}dx}{2 a^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {(-B+i A) \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}-\frac {\int \frac {\tan (c+d x)^3 (a (i A-B)+2 i a B \tan (c+d x))}{(i \tan (c+d x) a+a)^3}dx}{2 a^2}\) |
\(\Big \downarrow \) 4078 |
\(\displaystyle \frac {(-B+i A) \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}-\frac {-\frac {\int -\frac {3 \tan ^2(c+d x) \left ((A+3 i B) a^2+4 B \tan (c+d x) a^2\right )}{(i \tan (c+d x) a+a)^2}dx}{6 a^2}-\frac {a (A+3 i B) \tan ^3(c+d x)}{6 d (a+i a \tan (c+d x))^3}}{2 a^2}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {(-B+i A) \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}-\frac {\frac {\int \frac {\tan ^2(c+d x) \left ((A+3 i B) a^2+4 B \tan (c+d x) a^2\right )}{(i \tan (c+d x) a+a)^2}dx}{2 a^2}-\frac {a (A+3 i B) \tan ^3(c+d x)}{6 d (a+i a \tan (c+d x))^3}}{2 a^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {(-B+i A) \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}-\frac {\frac {\int \frac {\tan (c+d x)^2 \left ((A+3 i B) a^2+4 B \tan (c+d x) a^2\right )}{(i \tan (c+d x) a+a)^2}dx}{2 a^2}-\frac {a (A+3 i B) \tan ^3(c+d x)}{6 d (a+i a \tan (c+d x))^3}}{2 a^2}\) |
\(\Big \downarrow \) 4078 |
\(\displaystyle \frac {(-B+i A) \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}-\frac {\frac {\frac {(-7 B+i A) \tan ^2(c+d x)}{4 d (1+i \tan (c+d x))^2}-\frac {\int \frac {2 \tan (c+d x) \left ((i A-7 B) a^3+8 i B \tan (c+d x) a^3\right )}{i \tan (c+d x) a+a}dx}{4 a^2}}{2 a^2}-\frac {a (A+3 i B) \tan ^3(c+d x)}{6 d (a+i a \tan (c+d x))^3}}{2 a^2}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {(-B+i A) \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}-\frac {\frac {\frac {(-7 B+i A) \tan ^2(c+d x)}{4 d (1+i \tan (c+d x))^2}-\frac {\int \frac {\tan (c+d x) \left ((i A-7 B) a^3+8 i B \tan (c+d x) a^3\right )}{i \tan (c+d x) a+a}dx}{2 a^2}}{2 a^2}-\frac {a (A+3 i B) \tan ^3(c+d x)}{6 d (a+i a \tan (c+d x))^3}}{2 a^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {(-B+i A) \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}-\frac {\frac {\frac {(-7 B+i A) \tan ^2(c+d x)}{4 d (1+i \tan (c+d x))^2}-\frac {\int \frac {\tan (c+d x) \left ((i A-7 B) a^3+8 i B \tan (c+d x) a^3\right )}{i \tan (c+d x) a+a}dx}{2 a^2}}{2 a^2}-\frac {a (A+3 i B) \tan ^3(c+d x)}{6 d (a+i a \tan (c+d x))^3}}{2 a^2}\) |
\(\Big \downarrow \) 4072 |
\(\displaystyle \frac {(-B+i A) \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}-\frac {\frac {\frac {(-7 B+i A) \tan ^2(c+d x)}{4 d (1+i \tan (c+d x))^2}-\frac {8 a^2 B \int \tan (c+d x)dx-\frac {i \int -\frac {a^4 (A+15 i B) \tan (c+d x)}{i \tan (c+d x) a+a}dx}{a}}{2 a^2}}{2 a^2}-\frac {a (A+3 i B) \tan ^3(c+d x)}{6 d (a+i a \tan (c+d x))^3}}{2 a^2}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {(-B+i A) \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}-\frac {\frac {\frac {(-7 B+i A) \tan ^2(c+d x)}{4 d (1+i \tan (c+d x))^2}-\frac {8 a^2 B \int \tan (c+d x)dx+\frac {i \int \frac {a^4 (A+15 i B) \tan (c+d x)}{i \tan (c+d x) a+a}dx}{a}}{2 a^2}}{2 a^2}-\frac {a (A+3 i B) \tan ^3(c+d x)}{6 d (a+i a \tan (c+d x))^3}}{2 a^2}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {(-B+i A) \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}-\frac {\frac {\frac {(-7 B+i A) \tan ^2(c+d x)}{4 d (1+i \tan (c+d x))^2}-\frac {8 a^2 B \int \tan (c+d x)dx+i a^3 (A+15 i B) \int \frac {\tan (c+d x)}{i \tan (c+d x) a+a}dx}{2 a^2}}{2 a^2}-\frac {a (A+3 i B) \tan ^3(c+d x)}{6 d (a+i a \tan (c+d x))^3}}{2 a^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {(-B+i A) \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}-\frac {\frac {\frac {(-7 B+i A) \tan ^2(c+d x)}{4 d (1+i \tan (c+d x))^2}-\frac {8 a^2 B \int \tan (c+d x)dx+i a^3 (A+15 i B) \int \frac {\tan (c+d x)}{i \tan (c+d x) a+a}dx}{2 a^2}}{2 a^2}-\frac {a (A+3 i B) \tan ^3(c+d x)}{6 d (a+i a \tan (c+d x))^3}}{2 a^2}\) |
\(\Big \downarrow \) 3956 |
\(\displaystyle \frac {(-B+i A) \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}-\frac {\frac {\frac {(-7 B+i A) \tan ^2(c+d x)}{4 d (1+i \tan (c+d x))^2}-\frac {-\frac {8 a^2 B \log (\cos (c+d x))}{d}+i a^3 (A+15 i B) \int \frac {\tan (c+d x)}{i \tan (c+d x) a+a}dx}{2 a^2}}{2 a^2}-\frac {a (A+3 i B) \tan ^3(c+d x)}{6 d (a+i a \tan (c+d x))^3}}{2 a^2}\) |
\(\Big \downarrow \) 4009 |
\(\displaystyle \frac {(-B+i A) \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}-\frac {\frac {\frac {(-7 B+i A) \tan ^2(c+d x)}{4 d (1+i \tan (c+d x))^2}-\frac {-\frac {8 a^2 B \log (\cos (c+d x))}{d}+i a^3 (A+15 i B) \left (-\frac {i \int 1dx}{2 a}-\frac {1}{2 d (a+i a \tan (c+d x))}\right )}{2 a^2}}{2 a^2}-\frac {a (A+3 i B) \tan ^3(c+d x)}{6 d (a+i a \tan (c+d x))^3}}{2 a^2}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {(-B+i A) \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}-\frac {\frac {\frac {(-7 B+i A) \tan ^2(c+d x)}{4 d (1+i \tan (c+d x))^2}-\frac {-\frac {8 a^2 B \log (\cos (c+d x))}{d}+i a^3 (A+15 i B) \left (-\frac {1}{2 d (a+i a \tan (c+d x))}-\frac {i x}{2 a}\right )}{2 a^2}}{2 a^2}-\frac {a (A+3 i B) \tan ^3(c+d x)}{6 d (a+i a \tan (c+d x))^3}}{2 a^2}\) |
Input:
Int[(Tan[c + d*x]^4*(A + B*Tan[c + d*x]))/(a + I*a*Tan[c + d*x])^4,x]
Output:
((I*A - B)*Tan[c + d*x]^4)/(8*d*(a + I*a*Tan[c + d*x])^4) - (-1/6*(a*(A + (3*I)*B)*Tan[c + d*x]^3)/(d*(a + I*a*Tan[c + d*x])^3) + (((I*A - 7*B)*Tan[ c + d*x]^2)/(4*d*(1 + I*Tan[c + d*x])^2) - ((-8*a^2*B*Log[Cos[c + d*x]])/d + I*a^3*(A + (15*I)*B)*(((-1/2*I)*x)/a - 1/(2*d*(a + I*a*Tan[c + d*x])))) /(2*a^2))/(2*a^2))/(2*a^2)
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d *x], x]]/d, x] /; FreeQ[{c, d}, x]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-(b*c - a*d))*((a + b*Tan[e + f*x])^m/(2*a *f*m)), x] + Simp[(b*c + a*d)/(2*a*b) Int[(a + b*Tan[e + f*x])^(m + 1), x ], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2 , 0] && LtQ[m, 0]
Int[(((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_ .)*(x_)]))/((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[B*(d/ b) Int[Tan[e + f*x], x], x] + Simp[1/b Int[Simp[A*b*c + (A*b*d + B*(b*c - a*d))*Tan[e + f*x], x]/(a + b*Tan[e + f*x]), x], x] /; FreeQ[{a, b, c, d , e, f, A, B}, x] && NeQ[b*c - a*d, 0]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[(-(A*b - a*B))*(a + b*Tan[e + f*x])^m*((c + d*Tan[e + f*x])^n/(2*a*f*m)), x] + Simp[1/(2*a^2*m) Int[(a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f* x])^(n - 1)*Simp[A*(a*c*m + b*d*n) - B*(b*c*m + a*d*n) - d*(b*B*(m - n) - a *A*(m + n))*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && LtQ[m, 0] && GtQ[n, 0]
Time = 0.50 (sec) , antiderivative size = 197, normalized size of antiderivative = 1.06
method | result | size |
risch | \(\frac {31 i x B}{16 a^{4}}+\frac {x A}{16 a^{4}}+\frac {13 \,{\mathrm e}^{-2 i \left (d x +c \right )} B}{16 d \,a^{4}}-\frac {i {\mathrm e}^{-2 i \left (d x +c \right )} A}{8 d \,a^{4}}-\frac {{\mathrm e}^{-4 i \left (d x +c \right )} B}{4 d \,a^{4}}+\frac {3 i {\mathrm e}^{-4 i \left (d x +c \right )} A}{32 d \,a^{4}}+\frac {{\mathrm e}^{-6 i \left (d x +c \right )} B}{16 d \,a^{4}}-\frac {i {\mathrm e}^{-6 i \left (d x +c \right )} A}{24 d \,a^{4}}-\frac {{\mathrm e}^{-8 i \left (d x +c \right )} B}{128 d \,a^{4}}+\frac {i {\mathrm e}^{-8 i \left (d x +c \right )} A}{128 d \,a^{4}}+\frac {2 i B c}{d \,a^{4}}-\frac {B \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d \,a^{4}}\) | \(197\) |
derivativedivides | \(\frac {15 i B \arctan \left (\tan \left (d x +c \right )\right )}{16 d \,a^{4}}+\frac {A \arctan \left (\tan \left (d x +c \right )\right )}{16 d \,a^{4}}+\frac {B \ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2 d \,a^{4}}-\frac {49 i B}{16 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )}-\frac {17 i A}{16 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )^{2}}-\frac {15 A}{16 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )}+\frac {3 i B}{4 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )^{3}}+\frac {7 A}{12 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )^{3}}+\frac {31 B}{16 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )^{2}}+\frac {i A}{8 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )^{4}}-\frac {B}{8 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )^{4}}\) | \(219\) |
default | \(\frac {15 i B \arctan \left (\tan \left (d x +c \right )\right )}{16 d \,a^{4}}+\frac {A \arctan \left (\tan \left (d x +c \right )\right )}{16 d \,a^{4}}+\frac {B \ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2 d \,a^{4}}-\frac {49 i B}{16 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )}-\frac {17 i A}{16 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )^{2}}-\frac {15 A}{16 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )}+\frac {3 i B}{4 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )^{3}}+\frac {7 A}{12 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )^{3}}+\frac {31 B}{16 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )^{2}}+\frac {i A}{8 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )^{4}}-\frac {B}{8 d \,a^{4} \left (-i+\tan \left (d x +c \right )\right )^{4}}\) | \(219\) |
Input:
int(tan(d*x+c)^4*(A+B*tan(d*x+c))/(a+I*a*tan(d*x+c))^4,x,method=_RETURNVER BOSE)
Output:
31/16*I*x/a^4*B+1/16*x/a^4*A+13/16/d/a^4*exp(-2*I*(d*x+c))*B-1/8*I/d/a^4*e xp(-2*I*(d*x+c))*A-1/4/d/a^4*exp(-4*I*(d*x+c))*B+3/32*I/d/a^4*exp(-4*I*(d* x+c))*A+1/16/d/a^4*exp(-6*I*(d*x+c))*B-1/24*I/d/a^4*exp(-6*I*(d*x+c))*A-1/ 128/d/a^4*exp(-8*I*(d*x+c))*B+1/128*I/d/a^4*exp(-8*I*(d*x+c))*A+2*I*B/d/a^ 4*c-B/d/a^4*ln(exp(2*I*(d*x+c))+1)
Time = 0.10 (sec) , antiderivative size = 120, normalized size of antiderivative = 0.65 \[ \int \frac {\tan ^4(c+d x) (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^4} \, dx=\frac {{\left (24 \, {\left (A + 31 i \, B\right )} d x e^{\left (8 i \, d x + 8 i \, c\right )} - 384 \, B e^{\left (8 i \, d x + 8 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - 24 \, {\left (2 i \, A - 13 \, B\right )} e^{\left (6 i \, d x + 6 i \, c\right )} - 12 \, {\left (-3 i \, A + 8 \, B\right )} e^{\left (4 i \, d x + 4 i \, c\right )} - 8 \, {\left (2 i \, A - 3 \, B\right )} e^{\left (2 i \, d x + 2 i \, c\right )} + 3 i \, A - 3 \, B\right )} e^{\left (-8 i \, d x - 8 i \, c\right )}}{384 \, a^{4} d} \] Input:
integrate(tan(d*x+c)^4*(A+B*tan(d*x+c))/(a+I*a*tan(d*x+c))^4,x, algorithm= "fricas")
Output:
1/384*(24*(A + 31*I*B)*d*x*e^(8*I*d*x + 8*I*c) - 384*B*e^(8*I*d*x + 8*I*c) *log(e^(2*I*d*x + 2*I*c) + 1) - 24*(2*I*A - 13*B)*e^(6*I*d*x + 6*I*c) - 12 *(-3*I*A + 8*B)*e^(4*I*d*x + 4*I*c) - 8*(2*I*A - 3*B)*e^(2*I*d*x + 2*I*c) + 3*I*A - 3*B)*e^(-8*I*d*x - 8*I*c)/(a^4*d)
Time = 1.39 (sec) , antiderivative size = 359, normalized size of antiderivative = 1.94 \[ \int \frac {\tan ^4(c+d x) (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^4} \, dx=- \frac {B \log {\left (e^{2 i d x} + e^{- 2 i c} \right )}}{a^{4} d} + \begin {cases} \frac {\left (\left (24576 i A a^{12} d^{3} e^{12 i c} - 24576 B a^{12} d^{3} e^{12 i c}\right ) e^{- 8 i d x} + \left (- 131072 i A a^{12} d^{3} e^{14 i c} + 196608 B a^{12} d^{3} e^{14 i c}\right ) e^{- 6 i d x} + \left (294912 i A a^{12} d^{3} e^{16 i c} - 786432 B a^{12} d^{3} e^{16 i c}\right ) e^{- 4 i d x} + \left (- 393216 i A a^{12} d^{3} e^{18 i c} + 2555904 B a^{12} d^{3} e^{18 i c}\right ) e^{- 2 i d x}\right ) e^{- 20 i c}}{3145728 a^{16} d^{4}} & \text {for}\: a^{16} d^{4} e^{20 i c} \neq 0 \\x \left (- \frac {A + 31 i B}{16 a^{4}} + \frac {\left (A e^{8 i c} - 4 A e^{6 i c} + 6 A e^{4 i c} - 4 A e^{2 i c} + A + 31 i B e^{8 i c} - 26 i B e^{6 i c} + 16 i B e^{4 i c} - 6 i B e^{2 i c} + i B\right ) e^{- 8 i c}}{16 a^{4}}\right ) & \text {otherwise} \end {cases} + \frac {x \left (A + 31 i B\right )}{16 a^{4}} \] Input:
integrate(tan(d*x+c)**4*(A+B*tan(d*x+c))/(a+I*a*tan(d*x+c))**4,x)
Output:
-B*log(exp(2*I*d*x) + exp(-2*I*c))/(a**4*d) + Piecewise((((24576*I*A*a**12 *d**3*exp(12*I*c) - 24576*B*a**12*d**3*exp(12*I*c))*exp(-8*I*d*x) + (-1310 72*I*A*a**12*d**3*exp(14*I*c) + 196608*B*a**12*d**3*exp(14*I*c))*exp(-6*I* d*x) + (294912*I*A*a**12*d**3*exp(16*I*c) - 786432*B*a**12*d**3*exp(16*I*c ))*exp(-4*I*d*x) + (-393216*I*A*a**12*d**3*exp(18*I*c) + 2555904*B*a**12*d **3*exp(18*I*c))*exp(-2*I*d*x))*exp(-20*I*c)/(3145728*a**16*d**4), Ne(a**1 6*d**4*exp(20*I*c), 0)), (x*(-(A + 31*I*B)/(16*a**4) + (A*exp(8*I*c) - 4*A *exp(6*I*c) + 6*A*exp(4*I*c) - 4*A*exp(2*I*c) + A + 31*I*B*exp(8*I*c) - 26 *I*B*exp(6*I*c) + 16*I*B*exp(4*I*c) - 6*I*B*exp(2*I*c) + I*B)*exp(-8*I*c)/ (16*a**4)), True)) + x*(A + 31*I*B)/(16*a**4)
Exception generated. \[ \int \frac {\tan ^4(c+d x) (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^4} \, dx=\text {Exception raised: RuntimeError} \] Input:
integrate(tan(d*x+c)^4*(A+B*tan(d*x+c))/(a+I*a*tan(d*x+c))^4,x, algorithm= "maxima")
Output:
Exception raised: RuntimeError >> ECL says: expt: undefined: 0 to a negati ve exponent.
Time = 0.49 (sec) , antiderivative size = 123, normalized size of antiderivative = 0.66 \[ \int \frac {\tan ^4(c+d x) (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^4} \, dx=-\frac {{\left (-i \, A - B\right )} \log \left (\tan \left (d x + c\right ) + i\right )}{32 \, a^{4} d} + \frac {{\left (-i \, A + 31 \, B\right )} \log \left (\tan \left (d x + c\right ) - i\right )}{32 \, a^{4} d} - \frac {3 \, {\left (15 \, A + 49 i \, B\right )} \tan \left (d x + c\right )^{3} + 12 \, {\left (-7 i \, A + 29 \, B\right )} \tan \left (d x + c\right )^{2} - {\left (61 \, A + 291 i \, B\right )} \tan \left (d x + c\right ) + 16 i \, A - 84 \, B}{48 \, a^{4} d {\left (\tan \left (d x + c\right ) - i\right )}^{4}} \] Input:
integrate(tan(d*x+c)^4*(A+B*tan(d*x+c))/(a+I*a*tan(d*x+c))^4,x, algorithm= "giac")
Output:
-1/32*(-I*A - B)*log(tan(d*x + c) + I)/(a^4*d) + 1/32*(-I*A + 31*B)*log(ta n(d*x + c) - I)/(a^4*d) - 1/48*(3*(15*A + 49*I*B)*tan(d*x + c)^3 + 12*(-7* I*A + 29*B)*tan(d*x + c)^2 - (61*A + 291*I*B)*tan(d*x + c) + 16*I*A - 84*B )/(a^4*d*(tan(d*x + c) - I)^4)
Time = 3.67 (sec) , antiderivative size = 178, normalized size of antiderivative = 0.96 \[ \int \frac {\tan ^4(c+d x) (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^4} \, dx=\frac {{\mathrm {tan}\left (c+d\,x\right )}^2\,\left (-\frac {29\,B}{4\,a^4}+\frac {A\,7{}\mathrm {i}}{4\,a^4}\right )-{\mathrm {tan}\left (c+d\,x\right )}^3\,\left (\frac {15\,A}{16\,a^4}+\frac {B\,49{}\mathrm {i}}{16\,a^4}\right )-\frac {A\,1{}\mathrm {i}}{3\,a^4}+\frac {7\,B}{4\,a^4}+\mathrm {tan}\left (c+d\,x\right )\,\left (\frac {61\,A}{48\,a^4}+\frac {B\,97{}\mathrm {i}}{16\,a^4}\right )}{d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^4-{\mathrm {tan}\left (c+d\,x\right )}^3\,4{}\mathrm {i}-6\,{\mathrm {tan}\left (c+d\,x\right )}^2+\mathrm {tan}\left (c+d\,x\right )\,4{}\mathrm {i}+1\right )}+\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )\,\left (B+A\,1{}\mathrm {i}\right )}{32\,a^4\,d}-\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )\,\left (A+B\,31{}\mathrm {i}\right )\,1{}\mathrm {i}}{32\,a^4\,d} \] Input:
int((tan(c + d*x)^4*(A + B*tan(c + d*x)))/(a + a*tan(c + d*x)*1i)^4,x)
Output:
(tan(c + d*x)^2*((A*7i)/(4*a^4) - (29*B)/(4*a^4)) - tan(c + d*x)^3*((15*A) /(16*a^4) + (B*49i)/(16*a^4)) - (A*1i)/(3*a^4) + (7*B)/(4*a^4) + tan(c + d *x)*((61*A)/(48*a^4) + (B*97i)/(16*a^4)))/(d*(tan(c + d*x)*4i - 6*tan(c + d*x)^2 - tan(c + d*x)^3*4i + tan(c + d*x)^4 + 1)) + (log(tan(c + d*x) + 1i )*(A*1i + B))/(32*a^4*d) - (log(tan(c + d*x) - 1i)*(A + B*31i)*1i)/(32*a^4 *d)
\[ \int \frac {\tan ^4(c+d x) (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^4} \, dx=\frac {-16 \left (\int \frac {\tan \left (d x +c \right )^{3}}{\tan \left (d x +c \right )^{4} i +4 \tan \left (d x +c \right )^{3}-6 \tan \left (d x +c \right )^{2} i -4 \tan \left (d x +c \right )+i}d x \right ) a d -40 \left (\int \frac {\tan \left (d x +c \right )^{3}}{\tan \left (d x +c \right )^{4} i +4 \tan \left (d x +c \right )^{3}-6 \tan \left (d x +c \right )^{2} i -4 \tan \left (d x +c \right )+i}d x \right ) b d i +24 \left (\int \frac {\tan \left (d x +c \right )^{2}}{\tan \left (d x +c \right )^{4} i +4 \tan \left (d x +c \right )^{3}-6 \tan \left (d x +c \right )^{2} i -4 \tan \left (d x +c \right )+i}d x \right ) a d i -80 \left (\int \frac {\tan \left (d x +c \right )^{2}}{\tan \left (d x +c \right )^{4} i +4 \tan \left (d x +c \right )^{3}-6 \tan \left (d x +c \right )^{2} i -4 \tan \left (d x +c \right )+i}d x \right ) b d +16 \left (\int \frac {\tan \left (d x +c \right )}{\tan \left (d x +c \right )^{4} i +4 \tan \left (d x +c \right )^{3}-6 \tan \left (d x +c \right )^{2} i -4 \tan \left (d x +c \right )+i}d x \right ) a d +60 \left (\int \frac {\tan \left (d x +c \right )}{\tan \left (d x +c \right )^{4} i +4 \tan \left (d x +c \right )^{3}-6 \tan \left (d x +c \right )^{2} i -4 \tan \left (d x +c \right )+i}d x \right ) b d i -4 \left (\int \frac {1}{\tan \left (d x +c \right )^{4} i +4 \tan \left (d x +c \right )^{3}-6 \tan \left (d x +c \right )^{2} i -4 \tan \left (d x +c \right )+i}d x \right ) a d i +16 \left (\int \frac {1}{\tan \left (d x +c \right )^{4} i +4 \tan \left (d x +c \right )^{3}-6 \tan \left (d x +c \right )^{2} i -4 \tan \left (d x +c \right )+i}d x \right ) b d -\mathrm {log}\left (\tan \left (d x +c \right )^{4}-4 \tan \left (d x +c \right )^{3} i -6 \tan \left (d x +c \right )^{2}+4 \tan \left (d x +c \right ) i +1\right ) a i +4 \,\mathrm {log}\left (\tan \left (d x +c \right )^{4}-4 \tan \left (d x +c \right )^{3} i -6 \tan \left (d x +c \right )^{2}+4 \tan \left (d x +c \right ) i +1\right ) b +2 \,\mathrm {log}\left (\tan \left (d x +c \right )^{2}+1\right ) a i -6 \,\mathrm {log}\left (\tan \left (d x +c \right )^{2}+1\right ) b}{4 a^{4} d} \] Input:
int(tan(d*x+c)^4*(A+B*tan(d*x+c))/(a+I*a*tan(d*x+c))^4,x)
Output:
( - 16*int(tan(c + d*x)**3/(tan(c + d*x)**4*i + 4*tan(c + d*x)**3 - 6*tan( c + d*x)**2*i - 4*tan(c + d*x) + i),x)*a*d - 40*int(tan(c + d*x)**3/(tan(c + d*x)**4*i + 4*tan(c + d*x)**3 - 6*tan(c + d*x)**2*i - 4*tan(c + d*x) + i),x)*b*d*i + 24*int(tan(c + d*x)**2/(tan(c + d*x)**4*i + 4*tan(c + d*x)** 3 - 6*tan(c + d*x)**2*i - 4*tan(c + d*x) + i),x)*a*d*i - 80*int(tan(c + d* x)**2/(tan(c + d*x)**4*i + 4*tan(c + d*x)**3 - 6*tan(c + d*x)**2*i - 4*tan (c + d*x) + i),x)*b*d + 16*int(tan(c + d*x)/(tan(c + d*x)**4*i + 4*tan(c + d*x)**3 - 6*tan(c + d*x)**2*i - 4*tan(c + d*x) + i),x)*a*d + 60*int(tan(c + d*x)/(tan(c + d*x)**4*i + 4*tan(c + d*x)**3 - 6*tan(c + d*x)**2*i - 4*t an(c + d*x) + i),x)*b*d*i - 4*int(1/(tan(c + d*x)**4*i + 4*tan(c + d*x)**3 - 6*tan(c + d*x)**2*i - 4*tan(c + d*x) + i),x)*a*d*i + 16*int(1/(tan(c + d*x)**4*i + 4*tan(c + d*x)**3 - 6*tan(c + d*x)**2*i - 4*tan(c + d*x) + i), x)*b*d - log(tan(c + d*x)**4 - 4*tan(c + d*x)**3*i - 6*tan(c + d*x)**2 + 4 *tan(c + d*x)*i + 1)*a*i + 4*log(tan(c + d*x)**4 - 4*tan(c + d*x)**3*i - 6 *tan(c + d*x)**2 + 4*tan(c + d*x)*i + 1)*b + 2*log(tan(c + d*x)**2 + 1)*a* i - 6*log(tan(c + d*x)**2 + 1)*b)/(4*a**4*d)