Integrand size = 28, antiderivative size = 120 \[ \int \frac {\sqrt {e \cos (c+d x)}}{(a+i a \tan (c+d x))^2} \, dx=\frac {2 \sqrt {e \cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{3 a^2 d \sqrt {\cos (c+d x)}}+\frac {2 i \sqrt {e \cos (c+d x)}}{9 d (a+i a \tan (c+d x))^2}+\frac {2 i \sqrt {e \cos (c+d x)}}{9 d \left (a^2+i a^2 \tan (c+d x)\right )} \] Output:
2/3*(e*cos(d*x+c))^(1/2)*EllipticE(sin(1/2*d*x+1/2*c),2^(1/2))/a^2/d/cos(d *x+c)^(1/2)+2/9*I*(e*cos(d*x+c))^(1/2)/d/(a+I*a*tan(d*x+c))^2+2/9*I*(e*cos (d*x+c))^(1/2)/d/(a^2+I*a^2*tan(d*x+c))
Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.
Time = 4.34 (sec) , antiderivative size = 268, normalized size of antiderivative = 2.23 \[ \int \frac {\sqrt {e \cos (c+d x)}}{(a+i a \tan (c+d x))^2} \, dx=\frac {\sqrt {e \cos (c+d x)} \sec ^3(c+d x) (\cos (d x)+i \sin (d x))^2 \left (6 \, _2F_1\left (-\frac {1}{2},-\frac {1}{4};\frac {3}{4};\cos ^2(d x+\arctan (\tan (c)))\right ) \sec (c) (\cos (2 c)+i \sin (2 c)) \sin (d x+\arctan (\tan (c)))+\sqrt {\sin ^2(d x+\arctan (\tan (c)))} \left (\cos (c+d x) \csc (c) \sqrt {\sec ^2(c)} (\cos (2 d x)-i \sin (2 d x)) (7 \cos (c+2 d x)+5 \cos (3 c+2 d x)-4 i (\sin (c)-2 \sin (c+2 d x)-\sin (3 c+2 d x)))-3 \cos (c+d x+\arctan (\tan (c))) (i+\cot (c))^2 \tan (c)+9 \cos (c-d x-\arctan (\tan (c))) (-2 i-\cot (c)+\tan (c))\right )\right )}{18 a^2 d \sqrt {\sec ^2(c)} \sqrt {\sin ^2(d x+\arctan (\tan (c)))} (-i+\tan (c+d x))^2} \] Input:
Integrate[Sqrt[e*Cos[c + d*x]]/(a + I*a*Tan[c + d*x])^2,x]
Output:
(Sqrt[e*Cos[c + d*x]]*Sec[c + d*x]^3*(Cos[d*x] + I*Sin[d*x])^2*(6*Hypergeo metricPFQ[{-1/2, -1/4}, {3/4}, Cos[d*x + ArcTan[Tan[c]]]^2]*Sec[c]*(Cos[2* c] + I*Sin[2*c])*Sin[d*x + ArcTan[Tan[c]]] + Sqrt[Sin[d*x + ArcTan[Tan[c]] ]^2]*(Cos[c + d*x]*Csc[c]*Sqrt[Sec[c]^2]*(Cos[2*d*x] - I*Sin[2*d*x])*(7*Co s[c + 2*d*x] + 5*Cos[3*c + 2*d*x] - (4*I)*(Sin[c] - 2*Sin[c + 2*d*x] - Sin [3*c + 2*d*x])) - 3*Cos[c + d*x + ArcTan[Tan[c]]]*(I + Cot[c])^2*Tan[c] + 9*Cos[c - d*x - ArcTan[Tan[c]]]*(-2*I - Cot[c] + Tan[c]))))/(18*a^2*d*Sqrt [Sec[c]^2]*Sqrt[Sin[d*x + ArcTan[Tan[c]]]^2]*(-I + Tan[c + d*x])^2)
Time = 0.73 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.26, number of steps used = 10, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.357, Rules used = {3042, 3998, 3042, 3981, 3042, 4256, 3042, 4258, 3042, 3119}
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 {\sqrt {e \cos (c+d x)}}{(a+i a \tan (c+d x))^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sqrt {e \cos (c+d x)}}{(a+i a \tan (c+d x))^2}dx\) |
\(\Big \downarrow \) 3998 |
\(\displaystyle \sqrt {e \cos (c+d x)} \sqrt {e \sec (c+d x)} \int \frac {1}{\sqrt {e \sec (c+d x)} (i \tan (c+d x) a+a)^2}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \sqrt {e \cos (c+d x)} \sqrt {e \sec (c+d x)} \int \frac {1}{\sqrt {e \sec (c+d x)} (i \tan (c+d x) a+a)^2}dx\) |
\(\Big \downarrow \) 3981 |
\(\displaystyle \sqrt {e \cos (c+d x)} \sqrt {e \sec (c+d x)} \left (\frac {5 e^2 \int \frac {1}{(e \sec (c+d x))^{5/2}}dx}{9 a^2}+\frac {4 i e^2}{9 d \left (a^2+i a^2 \tan (c+d x)\right ) (e \sec (c+d x))^{5/2}}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \sqrt {e \cos (c+d x)} \sqrt {e \sec (c+d x)} \left (\frac {5 e^2 \int \frac {1}{\left (e \csc \left (c+d x+\frac {\pi }{2}\right )\right )^{5/2}}dx}{9 a^2}+\frac {4 i e^2}{9 d \left (a^2+i a^2 \tan (c+d x)\right ) (e \sec (c+d x))^{5/2}}\right )\) |
\(\Big \downarrow \) 4256 |
\(\displaystyle \sqrt {e \cos (c+d x)} \sqrt {e \sec (c+d x)} \left (\frac {5 e^2 \left (\frac {3 \int \frac {1}{\sqrt {e \sec (c+d x)}}dx}{5 e^2}+\frac {2 \sin (c+d x)}{5 d e (e \sec (c+d x))^{3/2}}\right )}{9 a^2}+\frac {4 i e^2}{9 d \left (a^2+i a^2 \tan (c+d x)\right ) (e \sec (c+d x))^{5/2}}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \sqrt {e \cos (c+d x)} \sqrt {e \sec (c+d x)} \left (\frac {5 e^2 \left (\frac {3 \int \frac {1}{\sqrt {e \csc \left (c+d x+\frac {\pi }{2}\right )}}dx}{5 e^2}+\frac {2 \sin (c+d x)}{5 d e (e \sec (c+d x))^{3/2}}\right )}{9 a^2}+\frac {4 i e^2}{9 d \left (a^2+i a^2 \tan (c+d x)\right ) (e \sec (c+d x))^{5/2}}\right )\) |
\(\Big \downarrow \) 4258 |
\(\displaystyle \sqrt {e \cos (c+d x)} \sqrt {e \sec (c+d x)} \left (\frac {5 e^2 \left (\frac {3 \int \sqrt {\cos (c+d x)}dx}{5 e^2 \sqrt {\cos (c+d x)} \sqrt {e \sec (c+d x)}}+\frac {2 \sin (c+d x)}{5 d e (e \sec (c+d x))^{3/2}}\right )}{9 a^2}+\frac {4 i e^2}{9 d \left (a^2+i a^2 \tan (c+d x)\right ) (e \sec (c+d x))^{5/2}}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \sqrt {e \cos (c+d x)} \sqrt {e \sec (c+d x)} \left (\frac {5 e^2 \left (\frac {3 \int \sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}dx}{5 e^2 \sqrt {\cos (c+d x)} \sqrt {e \sec (c+d x)}}+\frac {2 \sin (c+d x)}{5 d e (e \sec (c+d x))^{3/2}}\right )}{9 a^2}+\frac {4 i e^2}{9 d \left (a^2+i a^2 \tan (c+d x)\right ) (e \sec (c+d x))^{5/2}}\right )\) |
\(\Big \downarrow \) 3119 |
\(\displaystyle \sqrt {e \cos (c+d x)} \sqrt {e \sec (c+d x)} \left (\frac {5 e^2 \left (\frac {6 E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d e^2 \sqrt {\cos (c+d x)} \sqrt {e \sec (c+d x)}}+\frac {2 \sin (c+d x)}{5 d e (e \sec (c+d x))^{3/2}}\right )}{9 a^2}+\frac {4 i e^2}{9 d \left (a^2+i a^2 \tan (c+d x)\right ) (e \sec (c+d x))^{5/2}}\right )\) |
Input:
Int[Sqrt[e*Cos[c + d*x]]/(a + I*a*Tan[c + d*x])^2,x]
Output:
Sqrt[e*Cos[c + d*x]]*Sqrt[e*Sec[c + d*x]]*((5*e^2*((6*EllipticE[(c + d*x)/ 2, 2])/(5*d*e^2*Sqrt[Cos[c + d*x]]*Sqrt[e*Sec[c + d*x]]) + (2*Sin[c + d*x] )/(5*d*e*(e*Sec[c + d*x])^(3/2))))/(9*a^2) + (((4*I)/9)*e^2)/(d*(e*Sec[c + d*x])^(5/2)*(a^2 + I*a^2*Tan[c + d*x])))
Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticE[(1/2)* (c - Pi/2 + d*x), 2], x] /; FreeQ[{c, d}, x]
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x _)])^(n_), x_Symbol] :> Simp[2*d^2*(d*Sec[e + f*x])^(m - 2)*((a + b*Tan[e + f*x])^(n + 1)/(b*f*(m + 2*n))), x] - Simp[d^2*((m - 2)/(b^2*(m + 2*n))) Int[(d*Sec[e + f*x])^(m - 2)*(a + b*Tan[e + f*x])^(n + 2), x], x] /; FreeQ[ {a, b, d, e, f, m}, x] && EqQ[a^2 + b^2, 0] && LtQ[n, -1] && ((ILtQ[n/2, 0] && IGtQ[m - 1/2, 0]) || EqQ[n, -2] || IGtQ[m + n, 0] || (IntegersQ[n, m + 1/2] && GtQ[2*m + n + 1, 0])) && IntegerQ[2*m]
Int[(cos[(e_.) + (f_.)*(x_)]*(d_.))^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x _)])^(n_.), x_Symbol] :> Simp[(d*Cos[e + f*x])^m*(d*Sec[e + f*x])^m Int[( a + b*Tan[e + f*x])^n/(d*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m , n}, x] && !IntegerQ[m]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[Cos[c + d*x]*(( b*Csc[c + d*x])^(n + 1)/(b*d*n)), x] + Simp[(n + 1)/(b^2*n) Int[(b*Csc[c + d*x])^(n + 2), x], x] /; FreeQ[{b, c, d}, x] && LtQ[n, -1] && IntegerQ[2* n]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(b*Csc[c + d*x] )^n*Sin[c + d*x]^n Int[1/Sin[c + d*x]^n, x], x] /; FreeQ[{b, c, d}, x] && EqQ[n^2, 1/4]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 276 vs. \(2 (104 ) = 208\).
Time = 7.92 (sec) , antiderivative size = 277, normalized size of antiderivative = 2.31
method | result | size |
default | \(\frac {2 e \left (-64 i \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}+64 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{10} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+160 i \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}-128 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}-160 i \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}+104 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{6} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+80 i \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}-40 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-20 i \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+6 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+3 \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}+2 i \sin \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{9 a^{2} \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} e +e}\, d}\) | \(277\) |
Input:
int((e*cos(d*x+c))^(1/2)/(a+I*a*tan(d*x+c))^2,x,method=_RETURNVERBOSE)
Output:
2/9/a^2/sin(1/2*d*x+1/2*c)/(-2*sin(1/2*d*x+1/2*c)^2*e+e)^(1/2)*e*(-64*I*si n(1/2*d*x+1/2*c)^11+64*sin(1/2*d*x+1/2*c)^10*cos(1/2*d*x+1/2*c)+160*I*sin( 1/2*d*x+1/2*c)^9-128*cos(1/2*d*x+1/2*c)*sin(1/2*d*x+1/2*c)^8-160*I*sin(1/2 *d*x+1/2*c)^7+104*sin(1/2*d*x+1/2*c)^6*cos(1/2*d*x+1/2*c)+80*I*sin(1/2*d*x +1/2*c)^5-40*sin(1/2*d*x+1/2*c)^4*cos(1/2*d*x+1/2*c)-20*I*sin(1/2*d*x+1/2* c)^3+6*sin(1/2*d*x+1/2*c)^2*cos(1/2*d*x+1/2*c)+3*EllipticE(cos(1/2*d*x+1/2 *c),2^(1/2))*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*(sin(1/2*d*x+1/2*c)^2)^(1/2) +2*I*sin(1/2*d*x+1/2*c))/d
Time = 0.08 (sec) , antiderivative size = 102, normalized size of antiderivative = 0.85 \[ \int \frac {\sqrt {e \cos (c+d x)}}{(a+i a \tan (c+d x))^2} \, dx=\frac {{\left (\sqrt {\frac {1}{2}} \sqrt {e e^{\left (2 i \, d x + 2 i \, c\right )} + e} {\left (15 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 4 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i\right )} e^{\left (-\frac {1}{2} i \, d x - \frac {1}{2} i \, c\right )} + 24 i \, \sqrt {\frac {1}{2}} \sqrt {e} e^{\left (4 i \, d x + 4 i \, c\right )} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, e^{\left (i \, d x + i \, c\right )}\right )\right )\right )} e^{\left (-4 i \, d x - 4 i \, c\right )}}{18 \, a^{2} d} \] Input:
integrate((e*cos(d*x+c))^(1/2)/(a+I*a*tan(d*x+c))^2,x, algorithm="fricas")
Output:
1/18*(sqrt(1/2)*sqrt(e*e^(2*I*d*x + 2*I*c) + e)*(15*I*e^(4*I*d*x + 4*I*c) + 4*I*e^(2*I*d*x + 2*I*c) + I)*e^(-1/2*I*d*x - 1/2*I*c) + 24*I*sqrt(1/2)*s qrt(e)*e^(4*I*d*x + 4*I*c)*weierstrassZeta(-4, 0, weierstrassPInverse(-4, 0, e^(I*d*x + I*c))))*e^(-4*I*d*x - 4*I*c)/(a^2*d)
\[ \int \frac {\sqrt {e \cos (c+d x)}}{(a+i a \tan (c+d x))^2} \, dx=- \frac {\int \frac {\sqrt {e \cos {\left (c + d x \right )}}}{\tan ^{2}{\left (c + d x \right )} - 2 i \tan {\left (c + d x \right )} - 1}\, dx}{a^{2}} \] Input:
integrate((e*cos(d*x+c))**(1/2)/(a+I*a*tan(d*x+c))**2,x)
Output:
-Integral(sqrt(e*cos(c + d*x))/(tan(c + d*x)**2 - 2*I*tan(c + d*x) - 1), x )/a**2
Exception generated. \[ \int \frac {\sqrt {e \cos (c+d x)}}{(a+i a \tan (c+d x))^2} \, dx=\text {Exception raised: RuntimeError} \] Input:
integrate((e*cos(d*x+c))^(1/2)/(a+I*a*tan(d*x+c))^2,x, algorithm="maxima")
Output:
Exception raised: RuntimeError >> ECL says: THROW: The catch RAT-ERR is un defined.
\[ \int \frac {\sqrt {e \cos (c+d x)}}{(a+i a \tan (c+d x))^2} \, dx=\int { \frac {\sqrt {e \cos \left (d x + c\right )}}{{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{2}} \,d x } \] Input:
integrate((e*cos(d*x+c))^(1/2)/(a+I*a*tan(d*x+c))^2,x, algorithm="giac")
Output:
integrate(sqrt(e*cos(d*x + c))/(I*a*tan(d*x + c) + a)^2, x)
Timed out. \[ \int \frac {\sqrt {e \cos (c+d x)}}{(a+i a \tan (c+d x))^2} \, dx=\int \frac {\sqrt {e\,\cos \left (c+d\,x\right )}}{{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^2} \,d x \] Input:
int((e*cos(c + d*x))^(1/2)/(a + a*tan(c + d*x)*1i)^2,x)
Output:
int((e*cos(c + d*x))^(1/2)/(a + a*tan(c + d*x)*1i)^2, x)
\[ \int \frac {\sqrt {e \cos (c+d x)}}{(a+i a \tan (c+d x))^2} \, dx=-\frac {\sqrt {e}\, \left (\int \frac {\sqrt {\cos \left (d x +c \right )}}{\tan \left (d x +c \right )^{2}-2 \tan \left (d x +c \right ) i -1}d x \right )}{a^{2}} \] Input:
int((e*cos(d*x+c))^(1/2)/(a+I*a*tan(d*x+c))^2,x)
Output:
( - sqrt(e)*int(sqrt(cos(c + d*x))/(tan(c + d*x)**2 - 2*tan(c + d*x)*i - 1 ),x))/a**2