Integrand size = 30, antiderivative size = 69 \[ \int \tan (c+d x) (a+i a \tan (c+d x)) (A+B \tan (c+d x)) \, dx=-a (i A+B) x-\frac {a (A-i B) \log (\cos (c+d x))}{d}+\frac {a (i A+B) \tan (c+d x)}{d}+\frac {i a B \tan ^2(c+d x)}{2 d} \] Output:
-a*(I*A+B)*x-a*(A-I*B)*ln(cos(d*x+c))/d+a*(I*A+B)*tan(d*x+c)/d+1/2*I*a*B*t an(d*x+c)^2/d
Time = 0.19 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.96 \[ \int \tan (c+d x) (a+i a \tan (c+d x)) (A+B \tan (c+d x)) \, dx=\frac {a \left ((-2 i A-2 B) \arctan (\tan (c+d x))+i B \sec ^2(c+d x)-2 (A-i B) (\log (\cos (c+d x))-i \tan (c+d x))\right )}{2 d} \] Input:
Integrate[Tan[c + d*x]*(a + I*a*Tan[c + d*x])*(A + B*Tan[c + d*x]),x]
Output:
(a*(((-2*I)*A - 2*B)*ArcTan[Tan[c + d*x]] + I*B*Sec[c + d*x]^2 - 2*(A - I* B)*(Log[Cos[c + d*x]] - I*Tan[c + d*x])))/(2*d)
Time = 0.35 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3042, 4075, 3042, 4008, 3042, 3956}
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 \tan (c+d x) (a+i a \tan (c+d x)) (A+B \tan (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \tan (c+d x) (a+i a \tan (c+d x)) (A+B \tan (c+d x))dx\) |
\(\Big \downarrow \) 4075 |
\(\displaystyle \int \tan (c+d x) (a (A-i B)+a (i A+B) \tan (c+d x))dx+\frac {i a B \tan ^2(c+d x)}{2 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \tan (c+d x) (a (A-i B)+a (i A+B) \tan (c+d x))dx+\frac {i a B \tan ^2(c+d x)}{2 d}\) |
\(\Big \downarrow \) 4008 |
\(\displaystyle a (A-i B) \int \tan (c+d x)dx+\frac {a (B+i A) \tan (c+d x)}{d}-a x (B+i A)+\frac {i a B \tan ^2(c+d x)}{2 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a (A-i B) \int \tan (c+d x)dx+\frac {a (B+i A) \tan (c+d x)}{d}-a x (B+i A)+\frac {i a B \tan ^2(c+d x)}{2 d}\) |
\(\Big \downarrow \) 3956 |
\(\displaystyle \frac {a (B+i A) \tan (c+d x)}{d}-\frac {a (A-i B) \log (\cos (c+d x))}{d}-a x (B+i A)+\frac {i a B \tan ^2(c+d x)}{2 d}\) |
Input:
Int[Tan[c + d*x]*(a + I*a*Tan[c + d*x])*(A + B*Tan[c + d*x]),x]
Output:
-(a*(I*A + B)*x) - (a*(A - I*B)*Log[Cos[c + d*x]])/d + (a*(I*A + B)*Tan[c + d*x])/d + ((I/2)*a*B*Tan[c + d*x]^2)/d
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_)])*((c_.) + (d_.)*tan[(e_.) + (f_.) *(x_)]), x_Symbol] :> Simp[(a*c - b*d)*x, x] + (Simp[b*d*(Tan[e + f*x]/f), x] + Simp[(b*c + a*d) Int[Tan[e + f*x], x], x]) /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && 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_)]), x_Symbol] :> Simp[B *d*((a + b*Tan[e + f*x])^(m + 1)/(b*f*(m + 1))), x] + Int[(a + b*Tan[e + f* x])^m*Simp[A*c - B*d + (B*c + A*d)*Tan[e + f*x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0] && !LeQ[m, -1]
Time = 0.09 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.04
method | result | size |
derivativedivides | \(\frac {a \left (\frac {i B \tan \left (d x +c \right )^{2}}{2}+i A \tan \left (d x +c \right )+B \tan \left (d x +c \right )+\frac {\left (-i B +A \right ) \ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2}+\left (-i A -B \right ) \arctan \left (\tan \left (d x +c \right )\right )\right )}{d}\) | \(72\) |
default | \(\frac {a \left (\frac {i B \tan \left (d x +c \right )^{2}}{2}+i A \tan \left (d x +c \right )+B \tan \left (d x +c \right )+\frac {\left (-i B +A \right ) \ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2}+\left (-i A -B \right ) \arctan \left (\tan \left (d x +c \right )\right )\right )}{d}\) | \(72\) |
norman | \(\left (-i a A -B a \right ) x +\frac {\left (i a A +B a \right ) \tan \left (d x +c \right )}{d}+\frac {i a B \tan \left (d x +c \right )^{2}}{2 d}+\frac {\left (-i a B +a A \right ) \ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2 d}\) | \(74\) |
parts | \(\frac {\left (i a A +B a \right ) \left (\tan \left (d x +c \right )-\arctan \left (\tan \left (d x +c \right )\right )\right )}{d}+\frac {a A \ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2 d}+\frac {i a B \left (\frac {\tan \left (d x +c \right )^{2}}{2}-\frac {\ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2}\right )}{d}\) | \(81\) |
parallelrisch | \(-\frac {2 i A x a d -i a B \tan \left (d x +c \right )^{2}-2 i A \tan \left (d x +c \right ) a +i B \ln \left (1+\tan \left (d x +c \right )^{2}\right ) a +2 B x a d -A \ln \left (1+\tan \left (d x +c \right )^{2}\right ) a -2 B \tan \left (d x +c \right ) a}{2 d}\) | \(85\) |
risch | \(\frac {2 a B c}{d}+\frac {2 i a A c}{d}+\frac {2 i a \left (i A \,{\mathrm e}^{2 i \left (d x +c \right )}+2 B \,{\mathrm e}^{2 i \left (d x +c \right )}+i A +B \right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}+\frac {i a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) B}{d}-\frac {a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) A}{d}\) | \(109\) |
Input:
int(tan(d*x+c)*(a+I*a*tan(d*x+c))*(A+B*tan(d*x+c)),x,method=_RETURNVERBOSE )
Output:
1/d*a*(1/2*I*B*tan(d*x+c)^2+I*A*tan(d*x+c)+B*tan(d*x+c)+1/2*(A-I*B)*ln(1+t an(d*x+c)^2)+(-I*A-B)*arctan(tan(d*x+c)))
Time = 0.10 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.58 \[ \int \tan (c+d x) (a+i a \tan (c+d x)) (A+B \tan (c+d x)) \, dx=-\frac {2 \, {\left (A - 2 i \, B\right )} a e^{\left (2 i \, d x + 2 i \, c\right )} + 2 \, {\left (A - i \, B\right )} a + {\left ({\left (A - i \, B\right )} a e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, {\left (A - i \, B\right )} a e^{\left (2 i \, d x + 2 i \, c\right )} + {\left (A - i \, B\right )} a\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )}{d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d} \] Input:
integrate(tan(d*x+c)*(a+I*a*tan(d*x+c))*(A+B*tan(d*x+c)),x, algorithm="fri cas")
Output:
-(2*(A - 2*I*B)*a*e^(2*I*d*x + 2*I*c) + 2*(A - I*B)*a + ((A - I*B)*a*e^(4* I*d*x + 4*I*c) + 2*(A - I*B)*a*e^(2*I*d*x + 2*I*c) + (A - I*B)*a)*log(e^(2 *I*d*x + 2*I*c) + 1))/(d*e^(4*I*d*x + 4*I*c) + 2*d*e^(2*I*d*x + 2*I*c) + d )
Time = 0.29 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.58 \[ \int \tan (c+d x) (a+i a \tan (c+d x)) (A+B \tan (c+d x)) \, dx=- \frac {a \left (A - i B\right ) \log {\left (e^{2 i d x} + e^{- 2 i c} \right )}}{d} + \frac {- 2 A a + 2 i B a + \left (- 2 A a e^{2 i c} + 4 i B a e^{2 i c}\right ) e^{2 i d x}}{d e^{4 i c} e^{4 i d x} + 2 d e^{2 i c} e^{2 i d x} + d} \] Input:
integrate(tan(d*x+c)*(a+I*a*tan(d*x+c))*(A+B*tan(d*x+c)),x)
Output:
-a*(A - I*B)*log(exp(2*I*d*x) + exp(-2*I*c))/d + (-2*A*a + 2*I*B*a + (-2*A *a*exp(2*I*c) + 4*I*B*a*exp(2*I*c))*exp(2*I*d*x))/(d*exp(4*I*c)*exp(4*I*d* x) + 2*d*exp(2*I*c)*exp(2*I*d*x) + d)
Time = 0.13 (sec) , antiderivative size = 68, normalized size of antiderivative = 0.99 \[ \int \tan (c+d x) (a+i a \tan (c+d x)) (A+B \tan (c+d x)) \, dx=-\frac {-i \, B a \tan \left (d x + c\right )^{2} - 2 \, {\left (d x + c\right )} {\left (-i \, A - B\right )} a - {\left (A - i \, B\right )} a \log \left (\tan \left (d x + c\right )^{2} + 1\right ) + 2 \, {\left (-i \, A - B\right )} a \tan \left (d x + c\right )}{2 \, d} \] Input:
integrate(tan(d*x+c)*(a+I*a*tan(d*x+c))*(A+B*tan(d*x+c)),x, algorithm="max ima")
Output:
-1/2*(-I*B*a*tan(d*x + c)^2 - 2*(d*x + c)*(-I*A - B)*a - (A - I*B)*a*log(t an(d*x + c)^2 + 1) + 2*(-I*A - B)*a*tan(d*x + c))/d
Time = 0.36 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.91 \[ \int \tan (c+d x) (a+i a \tan (c+d x)) (A+B \tan (c+d x)) \, dx=\frac {{\left (A a - i \, B a\right )} \log \left (\tan \left (d x + c\right ) + i\right )}{d} - \frac {-i \, B a d \tan \left (d x + c\right )^{2} - 2 i \, A a d \tan \left (d x + c\right ) - 2 \, B a d \tan \left (d x + c\right )}{2 \, d^{2}} \] Input:
integrate(tan(d*x+c)*(a+I*a*tan(d*x+c))*(A+B*tan(d*x+c)),x, algorithm="gia c")
Output:
(A*a - I*B*a)*log(tan(d*x + c) + I)/d - 1/2*(-I*B*a*d*tan(d*x + c)^2 - 2*I *A*a*d*tan(d*x + c) - 2*B*a*d*tan(d*x + c))/d^2
Time = 3.62 (sec) , antiderivative size = 59, normalized size of antiderivative = 0.86 \[ \int \tan (c+d x) (a+i a \tan (c+d x)) (A+B \tan (c+d x)) \, dx=\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )\,\left (A\,a-B\,a\,1{}\mathrm {i}\right )}{d}+\frac {\mathrm {tan}\left (c+d\,x\right )\,\left (B\,a+A\,a\,1{}\mathrm {i}\right )}{d}+\frac {B\,a\,{\mathrm {tan}\left (c+d\,x\right )}^2\,1{}\mathrm {i}}{2\,d} \] Input:
int(tan(c + d*x)*(A + B*tan(c + d*x))*(a + a*tan(c + d*x)*1i),x)
Output:
(log(tan(c + d*x) + 1i)*(A*a - B*a*1i))/d + (tan(c + d*x)*(A*a*1i + B*a))/ d + (B*a*tan(c + d*x)^2*1i)/(2*d)
Time = 0.17 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.10 \[ \int \tan (c+d x) (a+i a \tan (c+d x)) (A+B \tan (c+d x)) \, dx=\frac {a \left (\mathrm {log}\left (\tan \left (d x +c \right )^{2}+1\right ) a -\mathrm {log}\left (\tan \left (d x +c \right )^{2}+1\right ) b i +\tan \left (d x +c \right )^{2} b i +2 \tan \left (d x +c \right ) a i +2 \tan \left (d x +c \right ) b -2 a d i x -2 b d x \right )}{2 d} \] Input:
int(tan(d*x+c)*(a+I*a*tan(d*x+c))*(A+B*tan(d*x+c)),x)
Output:
(a*(log(tan(c + d*x)**2 + 1)*a - log(tan(c + d*x)**2 + 1)*b*i + tan(c + d* x)**2*b*i + 2*tan(c + d*x)*a*i + 2*tan(c + d*x)*b - 2*a*d*i*x - 2*b*d*x))/ (2*d)