Integrand size = 26, antiderivative size = 61 \[ \int \sqrt {d \tan (e+f x)} (a+i a \tan (e+f x)) \, dx=\frac {2 (-1)^{3/4} a \sqrt {d} \arctan \left (\frac {(-1)^{3/4} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{f}+\frac {2 i a \sqrt {d \tan (e+f x)}}{f} \] Output:
2*(-1)^(3/4)*a*d^(1/2)*arctan((-1)^(3/4)*(d*tan(f*x+e))^(1/2)/d^(1/2))/f+2 *I*a*(d*tan(f*x+e))^(1/2)/f
Time = 0.11 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.95 \[ \int \sqrt {d \tan (e+f x)} (a+i a \tan (e+f x)) \, dx=\frac {2 a \left ((-1)^{3/4} \sqrt {d} \arctan \left (\frac {(-1)^{3/4} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )+i \sqrt {d \tan (e+f x)}\right )}{f} \] Input:
Integrate[Sqrt[d*Tan[e + f*x]]*(a + I*a*Tan[e + f*x]),x]
Output:
(2*a*((-1)^(3/4)*Sqrt[d]*ArcTan[((-1)^(3/4)*Sqrt[d*Tan[e + f*x]])/Sqrt[d]] + I*Sqrt[d*Tan[e + f*x]]))/f
Time = 0.33 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {3042, 4011, 3042, 4016, 218}
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 (a+i a \tan (e+f x)) \sqrt {d \tan (e+f x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a+i a \tan (e+f x)) \sqrt {d \tan (e+f x)}dx\) |
\(\Big \downarrow \) 4011 |
\(\displaystyle \int \frac {a d \tan (e+f x)-i a d}{\sqrt {d \tan (e+f x)}}dx+\frac {2 i a \sqrt {d \tan (e+f x)}}{f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a d \tan (e+f x)-i a d}{\sqrt {d \tan (e+f x)}}dx+\frac {2 i a \sqrt {d \tan (e+f x)}}{f}\) |
\(\Big \downarrow \) 4016 |
\(\displaystyle \frac {2 i a \sqrt {d \tan (e+f x)}}{f}-\frac {2 a^2 d^2 \int \frac {1}{-i a d^2-a \tan (e+f x) d^2}d\sqrt {d \tan (e+f x)}}{f}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {2 (-1)^{3/4} a \sqrt {d} \arctan \left (\frac {(-1)^{3/4} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{f}+\frac {2 i a \sqrt {d \tan (e+f x)}}{f}\) |
Input:
Int[Sqrt[d*Tan[e + f*x]]*(a + I*a*Tan[e + f*x]),x]
Output:
(2*(-1)^(3/4)*a*Sqrt[d]*ArcTan[((-1)^(3/4)*Sqrt[d*Tan[e + f*x]])/Sqrt[d]]) /f + ((2*I)*a*Sqrt[d*Tan[e + f*x]])/f
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[d*((a + b*Tan[e + f*x])^m/(f*m)), x] + Int [(a + b*Tan[e + f*x])^(m - 1)*Simp[a*c - b*d + (b*c + a*d)*Tan[e + f*x], x] , x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && GtQ[m, 0]
Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/Sqrt[(b_.)*tan[(e_.) + (f_.)*(x_ )]], x_Symbol] :> Simp[2*(c^2/f) Subst[Int[1/(b*c - d*x^2), x], x, Sqrt[b *Tan[e + f*x]]], x] /; FreeQ[{b, c, d, e, f}, x] && EqQ[c^2 + d^2, 0]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 288 vs. \(2 (48 ) = 96\).
Time = 1.29 (sec) , antiderivative size = 289, normalized size of antiderivative = 4.74
method | result | size |
parts | \(\frac {a d \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{4 f \left (d^{2}\right )^{\frac {1}{4}}}+\frac {i a \left (2 \sqrt {d \tan \left (f x +e \right )}-\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{4}\right )}{f}\) | \(289\) |
derivativedivides | \(\frac {a \left (2 i \sqrt {d \tan \left (f x +e \right )}-2 d \left (\frac {i \left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 d}-\frac {\sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}\right )\right )}{f}\) | \(290\) |
default | \(\frac {a \left (2 i \sqrt {d \tan \left (f x +e \right )}-2 d \left (\frac {i \left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 d}-\frac {\sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}\right )\right )}{f}\) | \(290\) |
Input:
int((d*tan(f*x+e))^(1/2)*(a+I*a*tan(f*x+e)),x,method=_RETURNVERBOSE)
Output:
1/4*a/f*d/(d^2)^(1/4)*2^(1/2)*(ln((d*tan(f*x+e)-(d^2)^(1/4)*(d*tan(f*x+e)) ^(1/2)*2^(1/2)+(d^2)^(1/2))/(d*tan(f*x+e)+(d^2)^(1/4)*(d*tan(f*x+e))^(1/2) *2^(1/2)+(d^2)^(1/2)))+2*arctan(2^(1/2)/(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)+1 )-2*arctan(-2^(1/2)/(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)+1))+I*a/f*(2*(d*tan(f *x+e))^(1/2)-1/4*(d^2)^(1/4)*2^(1/2)*(ln((d*tan(f*x+e)+(d^2)^(1/4)*(d*tan( f*x+e))^(1/2)*2^(1/2)+(d^2)^(1/2))/(d*tan(f*x+e)-(d^2)^(1/4)*(d*tan(f*x+e) )^(1/2)*2^(1/2)+(d^2)^(1/2)))+2*arctan(2^(1/2)/(d^2)^(1/4)*(d*tan(f*x+e))^ (1/2)+1)-2*arctan(-2^(1/2)/(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)+1)))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 244 vs. \(2 (47) = 94\).
Time = 0.08 (sec) , antiderivative size = 244, normalized size of antiderivative = 4.00 \[ \int \sqrt {d \tan (e+f x)} (a+i a \tan (e+f x)) \, dx=\frac {\sqrt {\frac {4 i \, a^{2} d}{f^{2}}} f \log \left (\frac {{\left (-2 i \, a d e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (i \, f e^{\left (2 i \, f x + 2 i \, e\right )} + i \, f\right )} \sqrt {\frac {4 i \, a^{2} d}{f^{2}}} \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{a}\right ) - \sqrt {\frac {4 i \, a^{2} d}{f^{2}}} f \log \left (\frac {{\left (-2 i \, a d e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (-i \, f e^{\left (2 i \, f x + 2 i \, e\right )} - i \, f\right )} \sqrt {\frac {4 i \, a^{2} d}{f^{2}}} \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{a}\right ) + 8 i \, a \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}}{4 \, f} \] Input:
integrate((d*tan(f*x+e))^(1/2)*(a+I*a*tan(f*x+e)),x, algorithm="fricas")
Output:
1/4*(sqrt(4*I*a^2*d/f^2)*f*log((-2*I*a*d*e^(2*I*f*x + 2*I*e) + (I*f*e^(2*I *f*x + 2*I*e) + I*f)*sqrt(4*I*a^2*d/f^2)*sqrt((-I*d*e^(2*I*f*x + 2*I*e) + I*d)/(e^(2*I*f*x + 2*I*e) + 1)))*e^(-2*I*f*x - 2*I*e)/a) - sqrt(4*I*a^2*d/ f^2)*f*log((-2*I*a*d*e^(2*I*f*x + 2*I*e) + (-I*f*e^(2*I*f*x + 2*I*e) - I*f )*sqrt(4*I*a^2*d/f^2)*sqrt((-I*d*e^(2*I*f*x + 2*I*e) + I*d)/(e^(2*I*f*x + 2*I*e) + 1)))*e^(-2*I*f*x - 2*I*e)/a) + 8*I*a*sqrt((-I*d*e^(2*I*f*x + 2*I* e) + I*d)/(e^(2*I*f*x + 2*I*e) + 1)))/f
\[ \int \sqrt {d \tan (e+f x)} (a+i a \tan (e+f x)) \, dx=i a \left (\int \left (- i \sqrt {d \tan {\left (e + f x \right )}}\right )\, dx + \int \sqrt {d \tan {\left (e + f x \right )}} \tan {\left (e + f x \right )}\, dx\right ) \] Input:
integrate((d*tan(f*x+e))**(1/2)*(a+I*a*tan(f*x+e)),x)
Output:
I*a*(Integral(-I*sqrt(d*tan(e + f*x)), x) + Integral(sqrt(d*tan(e + f*x))* tan(e + f*x), x))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 176 vs. \(2 (47) = 94\).
Time = 0.13 (sec) , antiderivative size = 176, normalized size of antiderivative = 2.89 \[ \int \sqrt {d \tan (e+f x)} (a+i a \tan (e+f x)) \, dx=-\frac {a d^{2} {\left (\frac {\left (2 i - 2\right ) \, \sqrt {2} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} + 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right )}{\sqrt {d}} + \frac {\left (2 i - 2\right ) \, \sqrt {2} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} - 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right )}{\sqrt {d}} + \frac {\left (i + 1\right ) \, \sqrt {2} \log \left (d \tan \left (f x + e\right ) + \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right )}{\sqrt {d}} - \frac {\left (i + 1\right ) \, \sqrt {2} \log \left (d \tan \left (f x + e\right ) - \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right )}{\sqrt {d}}\right )} - 8 i \, \sqrt {d \tan \left (f x + e\right )} a d}{4 \, d f} \] Input:
integrate((d*tan(f*x+e))^(1/2)*(a+I*a*tan(f*x+e)),x, algorithm="maxima")
Output:
-1/4*(a*d^2*((2*I - 2)*sqrt(2)*arctan(1/2*sqrt(2)*(sqrt(2)*sqrt(d) + 2*sqr t(d*tan(f*x + e)))/sqrt(d))/sqrt(d) + (2*I - 2)*sqrt(2)*arctan(-1/2*sqrt(2 )*(sqrt(2)*sqrt(d) - 2*sqrt(d*tan(f*x + e)))/sqrt(d))/sqrt(d) + (I + 1)*sq rt(2)*log(d*tan(f*x + e) + sqrt(2)*sqrt(d*tan(f*x + e))*sqrt(d) + d)/sqrt( d) - (I + 1)*sqrt(2)*log(d*tan(f*x + e) - sqrt(2)*sqrt(d*tan(f*x + e))*sqr t(d) + d)/sqrt(d)) - 8*I*sqrt(d*tan(f*x + e))*a*d)/(d*f)
Time = 0.14 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.25 \[ \int \sqrt {d \tan (e+f x)} (a+i a \tan (e+f x)) \, dx=\frac {2 i \, {\left (-\frac {i \, \sqrt {2} d^{\frac {3}{2}} \arctan \left (\frac {2 \, \sqrt {d \tan \left (f x + e\right )} {\left | d \right |}}{i \, \sqrt {2} d^{\frac {3}{2}} + \sqrt {2} \sqrt {d} {\left | d \right |}}\right )}{\frac {i \, d}{{\left | d \right |}} + 1} + \sqrt {d \tan \left (f x + e\right )} d\right )} a}{d f} \] Input:
integrate((d*tan(f*x+e))^(1/2)*(a+I*a*tan(f*x+e)),x, algorithm="giac")
Output:
2*I*(-I*sqrt(2)*d^(3/2)*arctan(2*sqrt(d*tan(f*x + e))*abs(d)/(I*sqrt(2)*d^ (3/2) + sqrt(2)*sqrt(d)*abs(d)))/(I*d/abs(d) + 1) + sqrt(d*tan(f*x + e))*d )*a/(d*f)
Time = 1.31 (sec) , antiderivative size = 128, normalized size of antiderivative = 2.10 \[ \int \sqrt {d \tan (e+f x)} (a+i a \tan (e+f x)) \, dx=\frac {{\left (-1\right )}^{1/4}\,a\,\sqrt {d}\,\left (\mathrm {atan}\left (\frac {{\left (-1\right )}^{1/4}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{\sqrt {d}}\right )-\mathrm {atanh}\left (\frac {{\left (-1\right )}^{1/4}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{\sqrt {d}}\right )\right )}{f}-\frac {{\left (-1\right )}^{1/4}\,a\,\sqrt {d}\,\mathrm {atanh}\left (\frac {{\left (-1\right )}^{1/4}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{\sqrt {d}}\right )}{f}-\frac {{\left (-1\right )}^{1/4}\,a\,\sqrt {d}\,\mathrm {atan}\left (\frac {{\left (-1\right )}^{1/4}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{\sqrt {d}}\right )}{f}+\frac {a\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}\,2{}\mathrm {i}}{f} \] Input:
int((d*tan(e + f*x))^(1/2)*(a + a*tan(e + f*x)*1i),x)
Output:
(a*(d*tan(e + f*x))^(1/2)*2i)/f - ((-1)^(1/4)*a*d^(1/2)*atan(((-1)^(1/4)*( d*tan(e + f*x))^(1/2))/d^(1/2)))/f - ((-1)^(1/4)*a*d^(1/2)*atanh(((-1)^(1/ 4)*(d*tan(e + f*x))^(1/2))/d^(1/2)))/f + ((-1)^(1/4)*a*d^(1/2)*(atan(((-1) ^(1/4)*(d*tan(e + f*x))^(1/2))/d^(1/2)) - atanh(((-1)^(1/4)*(d*tan(e + f*x ))^(1/2))/d^(1/2))))/f
\[ \int \sqrt {d \tan (e+f x)} (a+i a \tan (e+f x)) \, dx=\frac {\sqrt {d}\, a \left (2 \sqrt {\tan \left (f x +e \right )}\, i -\left (\int \frac {\sqrt {\tan \left (f x +e \right )}}{\tan \left (f x +e \right )}d x \right ) f i +\left (\int \sqrt {\tan \left (f x +e \right )}d x \right ) f \right )}{f} \] Input:
int((d*tan(f*x+e))^(1/2)*(a+I*a*tan(f*x+e)),x)
Output:
(sqrt(d)*a*(2*sqrt(tan(e + f*x))*i - int(sqrt(tan(e + f*x))/tan(e + f*x),x )*f*i + int(sqrt(tan(e + f*x)),x)*f))/f