Integrand size = 36, antiderivative size = 184 \[ \int \frac {A+B \tan (c+d x)}{\sqrt {\tan (c+d x)} (a+i a \tan (c+d x))} \, dx=-\frac {\left (\frac {1}{4}-\frac {i}{4}\right ) ((2+i) A+B) \arctan \left (1-\sqrt {2} \sqrt {\tan (c+d x)}\right )}{\sqrt {2} a d}+\frac {\left (\frac {1}{4}-\frac {i}{4}\right ) ((2+i) A+B) \arctan \left (1+\sqrt {2} \sqrt {\tan (c+d x)}\right )}{\sqrt {2} a d}+\frac {((3+i) A-(1+i) B) \text {arctanh}\left (\frac {\sqrt {2} \sqrt {\tan (c+d x)}}{1+\tan (c+d x)}\right )}{4 \sqrt {2} a d}+\frac {(A+i B) \sqrt {\tan (c+d x)}}{2 d (a+i a \tan (c+d x))} \] Output:
(1/8-1/8*I)*((2+I)*A+B)*arctan(-1+2^(1/2)*tan(d*x+c)^(1/2))*2^(1/2)/a/d+(1 /8-1/8*I)*((2+I)*A+B)*arctan(1+2^(1/2)*tan(d*x+c)^(1/2))*2^(1/2)/a/d+1/8*( (3+I)*A-(1+I)*B)*arctanh(2^(1/2)*tan(d*x+c)^(1/2)/(1+tan(d*x+c)))*2^(1/2)/ a/d+1/2*(A+I*B)*tan(d*x+c)^(1/2)/d/(a+I*a*tan(d*x+c))
Time = 0.99 (sec) , antiderivative size = 97, normalized size of antiderivative = 0.53 \[ \int \frac {A+B \tan (c+d x)}{\sqrt {\tan (c+d x)} (a+i a \tan (c+d x))} \, dx=\frac {-\sqrt [4]{-1} (A-i B) \arctan \left ((-1)^{3/4} \sqrt {\tan (c+d x)}\right )-2 \sqrt [4]{-1} A \text {arctanh}\left ((-1)^{3/4} \sqrt {\tan (c+d x)}\right )+\frac {(-i A+B) \sqrt {\tan (c+d x)}}{-i+\tan (c+d x)}}{2 a d} \] Input:
Integrate[(A + B*Tan[c + d*x])/(Sqrt[Tan[c + d*x]]*(a + I*a*Tan[c + d*x])) ,x]
Output:
(-((-1)^(1/4)*(A - I*B)*ArcTan[(-1)^(3/4)*Sqrt[Tan[c + d*x]]]) - 2*(-1)^(1 /4)*A*ArcTanh[(-1)^(3/4)*Sqrt[Tan[c + d*x]]] + (((-I)*A + B)*Sqrt[Tan[c + d*x]])/(-I + Tan[c + d*x]))/(2*a*d)
Time = 0.59 (sec) , antiderivative size = 204, normalized size of antiderivative = 1.11, number of steps used = 15, number of rules used = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.389, Rules used = {3042, 4079, 27, 3042, 4017, 27, 1482, 1476, 1082, 217, 1479, 25, 27, 1103}
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 {A+B \tan (c+d x)}{\sqrt {\tan (c+d x)} (a+i a \tan (c+d x))} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {A+B \tan (c+d x)}{\sqrt {\tan (c+d x)} (a+i a \tan (c+d x))}dx\) |
\(\Big \downarrow \) 4079 |
\(\displaystyle \frac {\int \frac {a (3 A-i B)-a (i A-B) \tan (c+d x)}{2 \sqrt {\tan (c+d x)}}dx}{2 a^2}+\frac {(A+i B) \sqrt {\tan (c+d x)}}{2 d (a+i a \tan (c+d x))}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int \frac {a (3 A-i B)-a (i A-B) \tan (c+d x)}{\sqrt {\tan (c+d x)}}dx}{4 a^2}+\frac {(A+i B) \sqrt {\tan (c+d x)}}{2 d (a+i a \tan (c+d x))}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {a (3 A-i B)-a (i A-B) \tan (c+d x)}{\sqrt {\tan (c+d x)}}dx}{4 a^2}+\frac {(A+i B) \sqrt {\tan (c+d x)}}{2 d (a+i a \tan (c+d x))}\) |
\(\Big \downarrow \) 4017 |
\(\displaystyle \frac {\int \frac {a (3 A-i B-(i A-B) \tan (c+d x))}{\tan ^2(c+d x)+1}d\sqrt {\tan (c+d x)}}{2 a^2 d}+\frac {(A+i B) \sqrt {\tan (c+d x)}}{2 d (a+i a \tan (c+d x))}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int \frac {3 A-i B-(i A-B) \tan (c+d x)}{\tan ^2(c+d x)+1}d\sqrt {\tan (c+d x)}}{2 a d}+\frac {(A+i B) \sqrt {\tan (c+d x)}}{2 d (a+i a \tan (c+d x))}\) |
\(\Big \downarrow \) 1482 |
\(\displaystyle \frac {\frac {1}{2} ((3+i) A-(1+i) B) \int \frac {1-\tan (c+d x)}{\tan ^2(c+d x)+1}d\sqrt {\tan (c+d x)}+\left (\frac {1}{2}-\frac {i}{2}\right ) (B+(2+i) A) \int \frac {\tan (c+d x)+1}{\tan ^2(c+d x)+1}d\sqrt {\tan (c+d x)}}{2 a d}+\frac {(A+i B) \sqrt {\tan (c+d x)}}{2 d (a+i a \tan (c+d x))}\) |
\(\Big \downarrow \) 1476 |
\(\displaystyle \frac {\frac {1}{2} ((3+i) A-(1+i) B) \int \frac {1-\tan (c+d x)}{\tan ^2(c+d x)+1}d\sqrt {\tan (c+d x)}+\left (\frac {1}{2}-\frac {i}{2}\right ) (B+(2+i) A) \left (\frac {1}{2} \int \frac {1}{\tan (c+d x)-\sqrt {2} \sqrt {\tan (c+d x)}+1}d\sqrt {\tan (c+d x)}+\frac {1}{2} \int \frac {1}{\tan (c+d x)+\sqrt {2} \sqrt {\tan (c+d x)}+1}d\sqrt {\tan (c+d x)}\right )}{2 a d}+\frac {(A+i B) \sqrt {\tan (c+d x)}}{2 d (a+i a \tan (c+d x))}\) |
\(\Big \downarrow \) 1082 |
\(\displaystyle \frac {\frac {1}{2} ((3+i) A-(1+i) B) \int \frac {1-\tan (c+d x)}{\tan ^2(c+d x)+1}d\sqrt {\tan (c+d x)}+\left (\frac {1}{2}-\frac {i}{2}\right ) (B+(2+i) A) \left (\frac {\int \frac {1}{-\tan (c+d x)-1}d\left (1-\sqrt {2} \sqrt {\tan (c+d x)}\right )}{\sqrt {2}}-\frac {\int \frac {1}{-\tan (c+d x)-1}d\left (\sqrt {2} \sqrt {\tan (c+d x)}+1\right )}{\sqrt {2}}\right )}{2 a d}+\frac {(A+i B) \sqrt {\tan (c+d x)}}{2 d (a+i a \tan (c+d x))}\) |
\(\Big \downarrow \) 217 |
\(\displaystyle \frac {\frac {1}{2} ((3+i) A-(1+i) B) \int \frac {1-\tan (c+d x)}{\tan ^2(c+d x)+1}d\sqrt {\tan (c+d x)}+\left (\frac {1}{2}-\frac {i}{2}\right ) (B+(2+i) A) \left (\frac {\arctan \left (\sqrt {2} \sqrt {\tan (c+d x)}+1\right )}{\sqrt {2}}-\frac {\arctan \left (1-\sqrt {2} \sqrt {\tan (c+d x)}\right )}{\sqrt {2}}\right )}{2 a d}+\frac {(A+i B) \sqrt {\tan (c+d x)}}{2 d (a+i a \tan (c+d x))}\) |
\(\Big \downarrow \) 1479 |
\(\displaystyle \frac {\frac {1}{2} ((3+i) A-(1+i) B) \left (-\frac {\int -\frac {\sqrt {2}-2 \sqrt {\tan (c+d x)}}{\tan (c+d x)-\sqrt {2} \sqrt {\tan (c+d x)}+1}d\sqrt {\tan (c+d x)}}{2 \sqrt {2}}-\frac {\int -\frac {\sqrt {2} \left (\sqrt {2} \sqrt {\tan (c+d x)}+1\right )}{\tan (c+d x)+\sqrt {2} \sqrt {\tan (c+d x)}+1}d\sqrt {\tan (c+d x)}}{2 \sqrt {2}}\right )+\left (\frac {1}{2}-\frac {i}{2}\right ) (B+(2+i) A) \left (\frac {\arctan \left (\sqrt {2} \sqrt {\tan (c+d x)}+1\right )}{\sqrt {2}}-\frac {\arctan \left (1-\sqrt {2} \sqrt {\tan (c+d x)}\right )}{\sqrt {2}}\right )}{2 a d}+\frac {(A+i B) \sqrt {\tan (c+d x)}}{2 d (a+i a \tan (c+d x))}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\frac {1}{2} ((3+i) A-(1+i) B) \left (\frac {\int \frac {\sqrt {2}-2 \sqrt {\tan (c+d x)}}{\tan (c+d x)-\sqrt {2} \sqrt {\tan (c+d x)}+1}d\sqrt {\tan (c+d x)}}{2 \sqrt {2}}+\frac {\int \frac {\sqrt {2} \left (\sqrt {2} \sqrt {\tan (c+d x)}+1\right )}{\tan (c+d x)+\sqrt {2} \sqrt {\tan (c+d x)}+1}d\sqrt {\tan (c+d x)}}{2 \sqrt {2}}\right )+\left (\frac {1}{2}-\frac {i}{2}\right ) (B+(2+i) A) \left (\frac {\arctan \left (\sqrt {2} \sqrt {\tan (c+d x)}+1\right )}{\sqrt {2}}-\frac {\arctan \left (1-\sqrt {2} \sqrt {\tan (c+d x)}\right )}{\sqrt {2}}\right )}{2 a d}+\frac {(A+i B) \sqrt {\tan (c+d x)}}{2 d (a+i a \tan (c+d x))}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\frac {1}{2} ((3+i) A-(1+i) B) \left (\frac {\int \frac {\sqrt {2}-2 \sqrt {\tan (c+d x)}}{\tan (c+d x)-\sqrt {2} \sqrt {\tan (c+d x)}+1}d\sqrt {\tan (c+d x)}}{2 \sqrt {2}}+\frac {1}{2} \int \frac {\sqrt {2} \sqrt {\tan (c+d x)}+1}{\tan (c+d x)+\sqrt {2} \sqrt {\tan (c+d x)}+1}d\sqrt {\tan (c+d x)}\right )+\left (\frac {1}{2}-\frac {i}{2}\right ) (B+(2+i) A) \left (\frac {\arctan \left (\sqrt {2} \sqrt {\tan (c+d x)}+1\right )}{\sqrt {2}}-\frac {\arctan \left (1-\sqrt {2} \sqrt {\tan (c+d x)}\right )}{\sqrt {2}}\right )}{2 a d}+\frac {(A+i B) \sqrt {\tan (c+d x)}}{2 d (a+i a \tan (c+d x))}\) |
\(\Big \downarrow \) 1103 |
\(\displaystyle \frac {\left (\frac {1}{2}-\frac {i}{2}\right ) (B+(2+i) A) \left (\frac {\arctan \left (\sqrt {2} \sqrt {\tan (c+d x)}+1\right )}{\sqrt {2}}-\frac {\arctan \left (1-\sqrt {2} \sqrt {\tan (c+d x)}\right )}{\sqrt {2}}\right )+\frac {1}{2} ((3+i) A-(1+i) B) \left (\frac {\log \left (\tan (c+d x)+\sqrt {2} \sqrt {\tan (c+d x)}+1\right )}{2 \sqrt {2}}-\frac {\log \left (\tan (c+d x)-\sqrt {2} \sqrt {\tan (c+d x)}+1\right )}{2 \sqrt {2}}\right )}{2 a d}+\frac {(A+i B) \sqrt {\tan (c+d x)}}{2 d (a+i a \tan (c+d x))}\) |
Input:
Int[(A + B*Tan[c + d*x])/(Sqrt[Tan[c + d*x]]*(a + I*a*Tan[c + d*x])),x]
Output:
((1/2 - I/2)*((2 + I)*A + B)*(-(ArcTan[1 - Sqrt[2]*Sqrt[Tan[c + d*x]]]/Sqr t[2]) + ArcTan[1 + Sqrt[2]*Sqrt[Tan[c + d*x]]]/Sqrt[2]) + (((3 + I)*A - (1 + I)*B)*(-1/2*Log[1 - Sqrt[2]*Sqrt[Tan[c + d*x]] + Tan[c + d*x]]/Sqrt[2] + Log[1 + Sqrt[2]*Sqrt[Tan[c + d*x]] + Tan[c + d*x]]/(2*Sqrt[2])))/2)/(2*a *d) + ((A + I*B)*Sqrt[Tan[c + d*x]])/(2*d*(a + I*a*Tan[c + d*x]))
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^( -1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] & & (LtQ[a, 0] || LtQ[b, 0])
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = 1 - 4*S implify[a*(c/b^2)]}, Simp[-2/b Subst[Int[1/(q - x^2), x], x, 1 + 2*c*(x/b )], x] /; RationalQ[q] && (EqQ[q^2, 1] || !RationalQ[b^2 - 4*a*c])] /; Fre eQ[{a, b, c}, x]
Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S imp[d*(Log[RemoveContent[a + b*x + c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]
Int[((d_) + (e_.)*(x_)^2)/((a_) + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[ 2*(d/e), 2]}, Simp[e/(2*c) Int[1/Simp[d/e + q*x + x^2, x], x], x] + Simp[ e/(2*c) Int[1/Simp[d/e - q*x + x^2, x], x], x]] /; FreeQ[{a, c, d, e}, x] && EqQ[c*d^2 - a*e^2, 0] && PosQ[d*e]
Int[((d_) + (e_.)*(x_)^2)/((a_) + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[ -2*(d/e), 2]}, Simp[e/(2*c*q) Int[(q - 2*x)/Simp[d/e + q*x - x^2, x], x], x] + Simp[e/(2*c*q) Int[(q + 2*x)/Simp[d/e - q*x - x^2, x], x], x]] /; F reeQ[{a, c, d, e}, x] && EqQ[c*d^2 - a*e^2, 0] && NegQ[d*e]
Int[((d_) + (e_.)*(x_)^2)/((a_) + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[ a*c, 2]}, Simp[(d*q + a*e)/(2*a*c) Int[(q + c*x^2)/(a + c*x^4), x], x] + Simp[(d*q - a*e)/(2*a*c) Int[(q - c*x^2)/(a + c*x^4), x], x]] /; FreeQ[{a , c, d, e}, x] && NeQ[c*d^2 + a*e^2, 0] && NeQ[c*d^2 - a*e^2, 0] && NegQ[(- a)*c]
Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/Sqrt[(b_.)*tan[(e_.) + (f_.)*(x_ )]], x_Symbol] :> Simp[2/f Subst[Int[(b*c + d*x^2)/(b^2 + x^4), x], x, Sq rt[b*Tan[e + f*x]]], x] /; FreeQ[{b, c, d, e, f}, x] && NeQ[c^2 - d^2, 0] & & NeQ[c^2 + d^2, 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*A + b*B)*(a + b*Tan[e + f*x])^m*((c + d*Tan[e + f*x])^(n + 1)/(2*f*m*( b*c - a*d))), x] + Simp[1/(2*a*m*(b*c - a*d)) Int[(a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^n*Simp[A*(b*c*m - a*d*(2*m + n + 1)) + B*(a*c*m - b*d*(n + 1)) + d*(A*b - a*B)*(m + n + 1)*Tan[e + f*x], x], x], x] /; Free Q[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && LtQ[m, 0] && !GtQ[n, 0]
Time = 0.15 (sec) , antiderivative size = 121, normalized size of antiderivative = 0.66
method | result | size |
derivativedivides | \(\frac {-\frac {i \left (i B +A \right ) \sqrt {\tan \left (d x +c \right )}}{2 \left (-i+\tan \left (d x +c \right )\right )}-\frac {2 i A \arctan \left (\frac {2 \sqrt {\tan \left (d x +c \right )}}{\sqrt {2}-i \sqrt {2}}\right )}{\sqrt {2}-i \sqrt {2}}+\frac {4 \left (\frac {i A}{4}+\frac {B}{4}\right ) \arctan \left (\frac {2 \sqrt {\tan \left (d x +c \right )}}{\sqrt {2}+i \sqrt {2}}\right )}{\sqrt {2}+i \sqrt {2}}}{d a}\) | \(121\) |
default | \(\frac {-\frac {i \left (i B +A \right ) \sqrt {\tan \left (d x +c \right )}}{2 \left (-i+\tan \left (d x +c \right )\right )}-\frac {2 i A \arctan \left (\frac {2 \sqrt {\tan \left (d x +c \right )}}{\sqrt {2}-i \sqrt {2}}\right )}{\sqrt {2}-i \sqrt {2}}+\frac {4 \left (\frac {i A}{4}+\frac {B}{4}\right ) \arctan \left (\frac {2 \sqrt {\tan \left (d x +c \right )}}{\sqrt {2}+i \sqrt {2}}\right )}{\sqrt {2}+i \sqrt {2}}}{d a}\) | \(121\) |
Input:
int((A+B*tan(d*x+c))/tan(d*x+c)^(1/2)/(a+I*a*tan(d*x+c)),x,method=_RETURNV ERBOSE)
Output:
1/d/a*(-1/2*I*(A+I*B)*tan(d*x+c)^(1/2)/(-I+tan(d*x+c))-2*I*A/(2^(1/2)-I*2^ (1/2))*arctan(2*tan(d*x+c)^(1/2)/(2^(1/2)-I*2^(1/2)))+4*(1/4*I*A+1/4*B)/(2 ^(1/2)+I*2^(1/2))*arctan(2*tan(d*x+c)^(1/2)/(2^(1/2)+I*2^(1/2))))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 571 vs. \(2 (139) = 278\).
Time = 0.10 (sec) , antiderivative size = 571, normalized size of antiderivative = 3.10 \[ \int \frac {A+B \tan (c+d x)}{\sqrt {\tan (c+d x)} (a+i a \tan (c+d x))} \, dx =\text {Too large to display} \] Input:
integrate((A+B*tan(d*x+c))/tan(d*x+c)^(1/2)/(a+I*a*tan(d*x+c)),x, algorith m="fricas")
Output:
-1/8*(a*d*sqrt((-I*A^2 - 2*A*B + I*B^2)/(a^2*d^2))*e^(2*I*d*x + 2*I*c)*log (-2*((I*a*d*e^(2*I*d*x + 2*I*c) + I*a*d)*sqrt((-I*e^(2*I*d*x + 2*I*c) + I) /(e^(2*I*d*x + 2*I*c) + 1))*sqrt((-I*A^2 - 2*A*B + I*B^2)/(a^2*d^2)) - (A - I*B)*e^(2*I*d*x + 2*I*c))*e^(-2*I*d*x - 2*I*c)/(I*A + B)) - a*d*sqrt((-I *A^2 - 2*A*B + I*B^2)/(a^2*d^2))*e^(2*I*d*x + 2*I*c)*log(-2*((-I*a*d*e^(2* I*d*x + 2*I*c) - I*a*d)*sqrt((-I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2* I*c) + 1))*sqrt((-I*A^2 - 2*A*B + I*B^2)/(a^2*d^2)) - (A - I*B)*e^(2*I*d*x + 2*I*c))*e^(-2*I*d*x - 2*I*c)/(I*A + B)) - 2*a*d*sqrt(I*A^2/(a^2*d^2))*e ^(2*I*d*x + 2*I*c)*log(((a*d*e^(2*I*d*x + 2*I*c) + a*d)*sqrt((-I*e^(2*I*d* x + 2*I*c) + I)/(e^(2*I*d*x + 2*I*c) + 1))*sqrt(I*A^2/(a^2*d^2)) + I*A)*e^ (-2*I*d*x - 2*I*c)/(a*d)) + 2*a*d*sqrt(I*A^2/(a^2*d^2))*e^(2*I*d*x + 2*I*c )*log(-((a*d*e^(2*I*d*x + 2*I*c) + a*d)*sqrt((-I*e^(2*I*d*x + 2*I*c) + I)/ (e^(2*I*d*x + 2*I*c) + 1))*sqrt(I*A^2/(a^2*d^2)) - I*A)*e^(-2*I*d*x - 2*I* c)/(a*d)) - 2*((A + I*B)*e^(2*I*d*x + 2*I*c) + A + I*B)*sqrt((-I*e^(2*I*d* x + 2*I*c) + I)/(e^(2*I*d*x + 2*I*c) + 1)))*e^(-2*I*d*x - 2*I*c)/(a*d)
Exception generated. \[ \int \frac {A+B \tan (c+d x)}{\sqrt {\tan (c+d x)} (a+i a \tan (c+d x))} \, dx=\text {Exception raised: TypeError} \] Input:
integrate((A+B*tan(d*x+c))/tan(d*x+c)**(1/2)/(a+I*a*tan(d*x+c)),x)
Output:
Exception raised: TypeError >> Invalid comparison of non-real -I
Exception generated. \[ \int \frac {A+B \tan (c+d x)}{\sqrt {\tan (c+d x)} (a+i a \tan (c+d x))} \, dx=\text {Exception raised: RuntimeError} \] Input:
integrate((A+B*tan(d*x+c))/tan(d*x+c)^(1/2)/(a+I*a*tan(d*x+c)),x, algorith m="maxima")
Output:
Exception raised: RuntimeError >> ECL says: expt: undefined: 0 to a negati ve exponent.
Time = 0.49 (sec) , antiderivative size = 89, normalized size of antiderivative = 0.48 \[ \int \frac {A+B \tan (c+d x)}{\sqrt {\tan (c+d x)} (a+i a \tan (c+d x))} \, dx=-\frac {\left (2 i - 2\right ) \, \sqrt {2} A \arctan \left (\left (\frac {1}{2} i + \frac {1}{2}\right ) \, \sqrt {2} \sqrt {\tan \left (d x + c\right )}\right ) + \sqrt {2} {\left (-\left (i + 1\right ) \, A + \left (i - 1\right ) \, B\right )} \arctan \left (-\left (\frac {1}{2} i - \frac {1}{2}\right ) \, \sqrt {2} \sqrt {\tan \left (d x + c\right )}\right ) + \frac {2 \, {\left (i \, A \sqrt {\tan \left (d x + c\right )} - B \sqrt {\tan \left (d x + c\right )}\right )}}{\tan \left (d x + c\right ) - i}}{4 \, a d} \] Input:
integrate((A+B*tan(d*x+c))/tan(d*x+c)^(1/2)/(a+I*a*tan(d*x+c)),x, algorith m="giac")
Output:
-1/4*((2*I - 2)*sqrt(2)*A*arctan((1/2*I + 1/2)*sqrt(2)*sqrt(tan(d*x + c))) + sqrt(2)*(-(I + 1)*A + (I - 1)*B)*arctan(-(1/2*I - 1/2)*sqrt(2)*sqrt(tan (d*x + c))) + 2*(I*A*sqrt(tan(d*x + c)) - B*sqrt(tan(d*x + c)))/(tan(d*x + c) - I))/(a*d)
Time = 4.54 (sec) , antiderivative size = 184, normalized size of antiderivative = 1.00 \[ \int \frac {A+B \tan (c+d x)}{\sqrt {\tan (c+d x)} (a+i a \tan (c+d x))} \, dx=-\mathrm {atan}\left (\frac {2\,a\,d\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {\frac {A^2\,1{}\mathrm {i}}{4\,a^2\,d^2}}}{A}\right )\,\sqrt {\frac {A^2\,1{}\mathrm {i}}{4\,a^2\,d^2}}\,2{}\mathrm {i}+\mathrm {atan}\left (\frac {4\,a\,d\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {-\frac {A^2\,1{}\mathrm {i}}{16\,a^2\,d^2}}}{A}\right )\,\sqrt {-\frac {A^2\,1{}\mathrm {i}}{16\,a^2\,d^2}}\,2{}\mathrm {i}-\frac {2\,\sqrt {\frac {1}{16}{}\mathrm {i}}\,B\,\mathrm {atanh}\left (4\,\sqrt {\frac {1}{16}{}\mathrm {i}}\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}\right )}{a\,d}+\frac {A\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}}{2\,a\,d\,\left (1+\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}+\frac {B\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}\,1{}\mathrm {i}}{2\,a\,d\,\left (1+\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )} \] Input:
int((A + B*tan(c + d*x))/(tan(c + d*x)^(1/2)*(a + a*tan(c + d*x)*1i)),x)
Output:
atan((4*a*d*tan(c + d*x)^(1/2)*(-(A^2*1i)/(16*a^2*d^2))^(1/2))/A)*(-(A^2*1 i)/(16*a^2*d^2))^(1/2)*2i - atan((2*a*d*tan(c + d*x)^(1/2)*((A^2*1i)/(4*a^ 2*d^2))^(1/2))/A)*((A^2*1i)/(4*a^2*d^2))^(1/2)*2i - (2*(1i/16)^(1/2)*B*ata nh(4*(1i/16)^(1/2)*tan(c + d*x)^(1/2)))/(a*d) + (A*tan(c + d*x)^(1/2))/(2* a*d*(tan(c + d*x)*1i + 1)) + (B*tan(c + d*x)^(1/2)*1i)/(2*a*d*(tan(c + d*x )*1i + 1))
\[ \int \frac {A+B \tan (c+d x)}{\sqrt {\tan (c+d x)} (a+i a \tan (c+d x))} \, dx=\frac {-2 \sqrt {\tan \left (d x +c \right )}\, b i -\left (\int \frac {\sqrt {\tan \left (d x +c \right )}}{\tan \left (d x +c \right )^{2}-\tan \left (d x +c \right ) i}d x \right ) a d i +\left (\int \frac {\sqrt {\tan \left (d x +c \right )}}{\tan \left (d x +c \right )^{2}-\tan \left (d x +c \right ) i}d x \right ) b d +\left (\int \frac {\sqrt {\tan \left (d x +c \right )}\, \tan \left (d x +c \right )^{2}}{\tan \left (d x +c \right )-i}d x \right ) b d i +\left (\int \frac {\sqrt {\tan \left (d x +c \right )}\, \tan \left (d x +c \right )}{\tan \left (d x +c \right )-i}d x \right ) b d}{a d} \] Input:
int((A+B*tan(d*x+c))/tan(d*x+c)^(1/2)/(a+I*a*tan(d*x+c)),x)
Output:
( - 2*sqrt(tan(c + d*x))*b*i - int(sqrt(tan(c + d*x))/(tan(c + d*x)**2 - t an(c + d*x)*i),x)*a*d*i + int(sqrt(tan(c + d*x))/(tan(c + d*x)**2 - tan(c + d*x)*i),x)*b*d + int((sqrt(tan(c + d*x))*tan(c + d*x)**2)/(tan(c + d*x) - i),x)*b*d*i + int((sqrt(tan(c + d*x))*tan(c + d*x))/(tan(c + d*x) - i),x )*b*d)/(a*d)