Integrand size = 28, antiderivative size = 66 \[ \int \frac {(a+i a \tan (e+f x))^2}{\sqrt {d \tan (e+f x)}} \, dx=-\frac {4 \sqrt [4]{-1} a^2 \arctan \left (\frac {(-1)^{3/4} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{\sqrt {d} f}-\frac {2 a^2 \sqrt {d \tan (e+f x)}}{d f} \] Output:
-4*(-1)^(1/4)*a^2*arctan((-1)^(3/4)*(d*tan(f*x+e))^(1/2)/d^(1/2))/d^(1/2)/ f-2*a^2*(d*tan(f*x+e))^(1/2)/d/f
Result contains complex when optimal does not.
Time = 0.45 (sec) , antiderivative size = 65, normalized size of antiderivative = 0.98 \[ \int \frac {(a+i a \tan (e+f x))^2}{\sqrt {d \tan (e+f x)}} \, dx=-\frac {2 a^2 \left ((-1+i) \sqrt {2} \sqrt {d} \text {arctanh}\left (\frac {(1+i) \sqrt {d \tan (e+f x)}}{\sqrt {2} \sqrt {d}}\right )+\sqrt {d \tan (e+f x)}\right )}{d f} \] Input:
Integrate[(a + I*a*Tan[e + f*x])^2/Sqrt[d*Tan[e + f*x]],x]
Output:
(-2*a^2*((-1 + I)*Sqrt[2]*Sqrt[d]*ArcTanh[((1 + I)*Sqrt[d*Tan[e + f*x]])/( Sqrt[2]*Sqrt[d])] + Sqrt[d*Tan[e + f*x]]))/(d*f)
Time = 0.34 (sec) , antiderivative size = 66, 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.179, Rules used = {3042, 4026, 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 \frac {(a+i a \tan (e+f x))^2}{\sqrt {d \tan (e+f x)}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a+i a \tan (e+f x))^2}{\sqrt {d \tan (e+f x)}}dx\) |
\(\Big \downarrow \) 4026 |
\(\displaystyle -\frac {2 a^2 \sqrt {d \tan (e+f x)}}{d f}+\int \frac {2 i \tan (e+f x) a^2+2 a^2}{\sqrt {d \tan (e+f x)}}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {2 a^2 \sqrt {d \tan (e+f x)}}{d f}+\int \frac {2 i \tan (e+f x) a^2+2 a^2}{\sqrt {d \tan (e+f x)}}dx\) |
\(\Big \downarrow \) 4016 |
\(\displaystyle -\frac {2 a^2 \sqrt {d \tan (e+f x)}}{d f}+\frac {8 a^4 \int \frac {1}{2 a^2 d-2 i a^2 d \tan (e+f x)}d\sqrt {d \tan (e+f x)}}{f}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle -\frac {4 \sqrt [4]{-1} a^2 \arctan \left (\frac {(-1)^{3/4} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{\sqrt {d} f}-\frac {2 a^2 \sqrt {d \tan (e+f x)}}{d f}\) |
Input:
Int[(a + I*a*Tan[e + f*x])^2/Sqrt[d*Tan[e + f*x]],x]
Output:
(-4*(-1)^(1/4)*a^2*ArcTan[((-1)^(3/4)*Sqrt[d*Tan[e + f*x]])/Sqrt[d]])/(Sqr t[d]*f) - (2*a^2*Sqrt[d*Tan[e + f*x]])/(d*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[((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]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^2, x_Symbol] :> Simp[d^2*((a + b*Tan[e + f*x])^(m + 1)/(b*f*( m + 1))), x] + Int[(a + b*Tan[e + f*x])^m*Simp[c^2 - d^2 + 2*c*d*Tan[e + f* x], x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && !LeQ [m, -1] && !(EqQ[m, 2] && EqQ[a, 0])
Result contains complex when optimal does not.
Time = 1.64 (sec) , antiderivative size = 295, normalized size of antiderivative = 4.47
method | result | size |
derivativedivides | \(\frac {2 a^{2} \left (-\sqrt {d \tan \left (f x +e \right )}+2 d \left (\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 )}{8 d}+\frac {i \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 d}\) | \(295\) |
default | \(\frac {2 a^{2} \left (-\sqrt {d \tan \left (f x +e \right )}+2 d \left (\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 )}{8 d}+\frac {i \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 d}\) | \(295\) |
parts | \(\frac {a^{2} \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 f d}+\frac {i a^{2} \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 )}{2 f \left (d^{2}\right )^{\frac {1}{4}}}-\frac {2 a^{2} \left (\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 )}{8}\right )}{f d}\) | \(433\) |
Input:
int((a+I*a*tan(f*x+e))^2/(d*tan(f*x+e))^(1/2),x,method=_RETURNVERBOSE)
Output:
2/f*a^2/d*(-(d*tan(f*x+e))^(1/2)+2*d*(1/8/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))+1/8*I/(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))))
Result contains complex when optimal does not.
Time = 0.09 (sec) , antiderivative size = 266, normalized size of antiderivative = 4.03 \[ \int \frac {(a+i a \tan (e+f x))^2}{\sqrt {d \tan (e+f x)}} \, dx=\frac {d \sqrt {-\frac {16 i \, a^{4}}{d f^{2}}} f \log \left (\frac {{\left (-4 i \, a^{2} d e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (d f e^{\left (2 i \, f x + 2 i \, e\right )} + d f\right )} \sqrt {-\frac {16 i \, a^{4}}{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 )}}{2 \, a^{2}}\right ) - d \sqrt {-\frac {16 i \, a^{4}}{d f^{2}}} f \log \left (\frac {{\left (-4 i \, a^{2} d e^{\left (2 i \, f x + 2 i \, e\right )} - {\left (d f e^{\left (2 i \, f x + 2 i \, e\right )} + d f\right )} \sqrt {-\frac {16 i \, a^{4}}{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 )}}{2 \, a^{2}}\right ) - 8 \, a^{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}}}{4 \, d f} \] Input:
integrate((a+I*a*tan(f*x+e))^2/(d*tan(f*x+e))^(1/2),x, algorithm="fricas")
Output:
1/4*(d*sqrt(-16*I*a^4/(d*f^2))*f*log(1/2*(-4*I*a^2*d*e^(2*I*f*x + 2*I*e) + (d*f*e^(2*I*f*x + 2*I*e) + d*f)*sqrt(-16*I*a^4/(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^2) - d*sqrt(-16*I*a^4/(d*f^2))*f*log(1/2*(-4*I*a^2*d*e^(2*I*f*x + 2*I*e) - ( d*f*e^(2*I*f*x + 2*I*e) + d*f)*sqrt(-16*I*a^4/(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^2) - 8*a^2*sqrt((-I*d*e^(2*I*f*x + 2*I*e) + I*d)/(e^(2*I*f*x + 2*I*e) + 1)))/( d*f)
\[ \int \frac {(a+i a \tan (e+f x))^2}{\sqrt {d \tan (e+f x)}} \, dx=- a^{2} \left (\int \left (- \frac {1}{\sqrt {d \tan {\left (e + f x \right )}}}\right )\, dx + \int \frac {\tan ^{2}{\left (e + f x \right )}}{\sqrt {d \tan {\left (e + f x \right )}}}\, dx + \int \left (- \frac {2 i \tan {\left (e + f x \right )}}{\sqrt {d \tan {\left (e + f x \right )}}}\right )\, dx\right ) \] Input:
integrate((a+I*a*tan(f*x+e))**2/(d*tan(f*x+e))**(1/2),x)
Output:
-a**2*(Integral(-1/sqrt(d*tan(e + f*x)), x) + Integral(tan(e + f*x)**2/sqr t(d*tan(e + f*x)), x) + Integral(-2*I*tan(e + f*x)/sqrt(d*tan(e + f*x)), x ))
Result contains complex when optimal does not.
Time = 0.12 (sec) , antiderivative size = 177, normalized size of antiderivative = 2.68 \[ \int \frac {(a+i a \tan (e+f x))^2}{\sqrt {d \tan (e+f x)}} \, dx=-\frac {a^{2} d {\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 )} + 4 \, \sqrt {d \tan \left (f x + e\right )} a^{2}}{2 \, d f} \] Input:
integrate((a+I*a*tan(f*x+e))^2/(d*tan(f*x+e))^(1/2),x, algorithm="maxima")
Output:
-1/2*(a^2*d*(-(2*I + 2)*sqrt(2)*arctan(1/2*sqrt(2)*(sqrt(2)*sqrt(d) + 2*sq rt(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)*s qrt(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))*sq rt(d) + d)/sqrt(d)) + 4*sqrt(d*tan(f*x + e))*a^2)/(d*f)
Result contains complex when optimal does not.
Time = 0.18 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.17 \[ \int \frac {(a+i a \tan (e+f x))^2}{\sqrt {d \tan (e+f x)}} \, dx=-\frac {2 \, a^{2} {\left (-\frac {2 i \, \sqrt {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 )}{\sqrt {d} {\left (\frac {i \, d}{{\left | d \right |}} + 1\right )}} + \frac {\sqrt {d \tan \left (f x + e\right )}}{d}\right )}}{f} \] Input:
integrate((a+I*a*tan(f*x+e))^2/(d*tan(f*x+e))^(1/2),x, algorithm="giac")
Output:
-2*a^2*(-2*I*sqrt(2)*arctan(2*sqrt(d*tan(f*x + e))*abs(d)/(I*sqrt(2)*d^(3/ 2) + sqrt(2)*sqrt(d)*abs(d)))/(sqrt(d)*(I*d/abs(d) + 1)) + sqrt(d*tan(f*x + e))/d)/f
Time = 1.17 (sec) , antiderivative size = 59, normalized size of antiderivative = 0.89 \[ \int \frac {(a+i a \tan (e+f x))^2}{\sqrt {d \tan (e+f x)}} \, dx=-\frac {2\,a^2\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{d\,f}+\frac {\sqrt {4{}\mathrm {i}}\,a^2\,\mathrm {atan}\left (\frac {\sqrt {4{}\mathrm {i}}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{2\,\sqrt {-d}}\right )\,2{}\mathrm {i}}{\sqrt {-d}\,f} \] Input:
int((a + a*tan(e + f*x)*1i)^2/(d*tan(e + f*x))^(1/2),x)
Output:
(4i^(1/2)*a^2*atan((4i^(1/2)*(d*tan(e + f*x))^(1/2))/(2*(-d)^(1/2)))*2i)/( (-d)^(1/2)*f) - (2*a^2*(d*tan(e + f*x))^(1/2))/(d*f)
\[ \int \frac {(a+i a \tan (e+f x))^2}{\sqrt {d \tan (e+f x)}} \, dx=\frac {2 \sqrt {d}\, a^{2} \left (-\sqrt {\tan \left (f x +e \right )}+\left (\int \frac {\sqrt {\tan \left (f x +e \right )}}{\tan \left (f x +e \right )}d x \right ) f +\left (\int \sqrt {\tan \left (f x +e \right )}d x \right ) f i \right )}{d f} \] Input:
int((a+I*a*tan(f*x+e))^2/(d*tan(f*x+e))^(1/2),x)
Output:
(2*sqrt(d)*a**2*( - sqrt(tan(e + f*x)) + int(sqrt(tan(e + f*x))/tan(e + f* x),x)*f + int(sqrt(tan(e + f*x)),x)*f*i))/(d*f)