Integrand size = 26, antiderivative size = 60 \[ \int \frac {a+i a \tan (c+d x)}{\sqrt {e \cos (c+d x)}} \, dx=\frac {2 i a}{d \sqrt {e \cos (c+d x)}}+\frac {2 a \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{d \sqrt {e \cos (c+d x)}} \] Output:
2*I*a/d/(e*cos(d*x+c))^(1/2)+2*a*cos(d*x+c)^(1/2)*InverseJacobiAM(1/2*d*x+ 1/2*c,2^(1/2))/d/(e*cos(d*x+c))^(1/2)
Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.
Time = 1.38 (sec) , antiderivative size = 143, normalized size of antiderivative = 2.38 \[ \int \frac {a+i a \tan (c+d x)}{\sqrt {e \cos (c+d x)}} \, dx=-\frac {\sqrt {2} a \sqrt {e \cos (c+d x)} (-i+\cot (c)) \left (\sqrt {2} \sqrt {\csc ^2(c)}+i \cos (c+d x) \sqrt {1+\cos (2 d x-2 \arctan (\cot (c)))} \csc (c) \, _2F_1\left (\frac {1}{4},\frac {1}{2};\frac {5}{4};\sin ^2(d x-\arctan (\cot (c)))\right ) \sec (d x-\arctan (\cot (c)))\right ) \sin (c) (\cos (d x)-i \sin (d x)) (-i+\tan (c+d x))}{d e \sqrt {\csc ^2(c)}} \] Input:
Integrate[(a + I*a*Tan[c + d*x])/Sqrt[e*Cos[c + d*x]],x]
Output:
-((Sqrt[2]*a*Sqrt[e*Cos[c + d*x]]*(-I + Cot[c])*(Sqrt[2]*Sqrt[Csc[c]^2] + I*Cos[c + d*x]*Sqrt[1 + Cos[2*d*x - 2*ArcTan[Cot[c]]]]*Csc[c]*Hypergeometr icPFQ[{1/4, 1/2}, {5/4}, Sin[d*x - ArcTan[Cot[c]]]^2]*Sec[d*x - ArcTan[Cot [c]]])*Sin[c]*(Cos[d*x] - I*Sin[d*x])*(-I + Tan[c + d*x]))/(d*e*Sqrt[Csc[c ]^2]))
Time = 0.49 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.42, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {3042, 3998, 3042, 3967, 3042, 4258, 3042, 3120}
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 (c+d x)}{\sqrt {e \cos (c+d x)}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a+i a \tan (c+d x)}{\sqrt {e \cos (c+d x)}}dx\) |
\(\Big \downarrow \) 3998 |
\(\displaystyle \frac {\int \sqrt {e \sec (c+d x)} (i \tan (c+d x) a+a)dx}{\sqrt {e \cos (c+d x)} \sqrt {e \sec (c+d x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \sqrt {e \sec (c+d x)} (i \tan (c+d x) a+a)dx}{\sqrt {e \cos (c+d x)} \sqrt {e \sec (c+d x)}}\) |
\(\Big \downarrow \) 3967 |
\(\displaystyle \frac {a \int \sqrt {e \sec (c+d x)}dx+\frac {2 i a \sqrt {e \sec (c+d x)}}{d}}{\sqrt {e \cos (c+d x)} \sqrt {e \sec (c+d x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {a \int \sqrt {e \csc \left (c+d x+\frac {\pi }{2}\right )}dx+\frac {2 i a \sqrt {e \sec (c+d x)}}{d}}{\sqrt {e \cos (c+d x)} \sqrt {e \sec (c+d x)}}\) |
\(\Big \downarrow \) 4258 |
\(\displaystyle \frac {a \sqrt {\cos (c+d x)} \sqrt {e \sec (c+d x)} \int \frac {1}{\sqrt {\cos (c+d x)}}dx+\frac {2 i a \sqrt {e \sec (c+d x)}}{d}}{\sqrt {e \cos (c+d x)} \sqrt {e \sec (c+d x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {a \sqrt {\cos (c+d x)} \sqrt {e \sec (c+d x)} \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx+\frac {2 i a \sqrt {e \sec (c+d x)}}{d}}{\sqrt {e \cos (c+d x)} \sqrt {e \sec (c+d x)}}\) |
\(\Big \downarrow \) 3120 |
\(\displaystyle \frac {\frac {2 a \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {e \sec (c+d x)}}{d}+\frac {2 i a \sqrt {e \sec (c+d x)}}{d}}{\sqrt {e \cos (c+d x)} \sqrt {e \sec (c+d x)}}\) |
Input:
Int[(a + I*a*Tan[c + d*x])/Sqrt[e*Cos[c + d*x]],x]
Output:
(((2*I)*a*Sqrt[e*Sec[c + d*x]])/d + (2*a*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[e*Sec[c + d*x]])/d)/(Sqrt[e*Cos[c + d*x]]*Sqrt[e*Sec[c + d*x]])
Int[1/Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticF[(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_)]), x_Symbol] :> Simp[b*((d*Sec[e + f*x])^m/(f*m)), x] + Simp[a Int[(d *Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2*m] || NeQ[a^2 + b^2, 0])
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[(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]
Time = 2.23 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.92
method | result | size |
parts | \(\frac {2 i a}{d \sqrt {e \cos \left (d x +c \right )}}+\frac {2 a \sqrt {\cos \left (d x +c \right )}\, \operatorname {InverseJacobiAM}\left (\frac {d x}{2}+\frac {c}{2}, \sqrt {2}\right )}{d \sqrt {e \cos \left (d x +c \right )}}\) | \(55\) |
default | \(\frac {2 \left (-\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+i \sin \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a}{\sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} e +e}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) d}\) | \(94\) |
Input:
int((a+I*a*tan(d*x+c))/(e*cos(d*x+c))^(1/2),x,method=_RETURNVERBOSE)
Output:
2*I*a/d/(e*cos(d*x+c))^(1/2)+2*a*cos(d*x+c)^(1/2)*InverseJacobiAM(1/2*d*x+ 1/2*c,2^(1/2))/d/(e*cos(d*x+c))^(1/2)
Time = 0.08 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.43 \[ \int \frac {a+i a \tan (c+d x)}{\sqrt {e \cos (c+d x)}} \, dx=-\frac {4 \, {\left (-i \, \sqrt {\frac {1}{2}} \sqrt {e e^{\left (2 i \, d x + 2 i \, c\right )} + e} a e^{\left (\frac {1}{2} i \, d x + \frac {1}{2} i \, c\right )} + \sqrt {\frac {1}{2}} {\left (i \, a e^{\left (2 i \, d x + 2 i \, c\right )} + i \, a\right )} \sqrt {e} {\rm weierstrassPInverse}\left (-4, 0, e^{\left (i \, d x + i \, c\right )}\right )\right )}}{d e e^{\left (2 i \, d x + 2 i \, c\right )} + d e} \] Input:
integrate((a+I*a*tan(d*x+c))/(e*cos(d*x+c))^(1/2),x, algorithm="fricas")
Output:
-4*(-I*sqrt(1/2)*sqrt(e*e^(2*I*d*x + 2*I*c) + e)*a*e^(1/2*I*d*x + 1/2*I*c) + sqrt(1/2)*(I*a*e^(2*I*d*x + 2*I*c) + I*a)*sqrt(e)*weierstrassPInverse(- 4, 0, e^(I*d*x + I*c)))/(d*e*e^(2*I*d*x + 2*I*c) + d*e)
\[ \int \frac {a+i a \tan (c+d x)}{\sqrt {e \cos (c+d x)}} \, dx=i a \left (\int \left (- \frac {i}{\sqrt {e \cos {\left (c + d x \right )}}}\right )\, dx + \int \frac {\tan {\left (c + d x \right )}}{\sqrt {e \cos {\left (c + d x \right )}}}\, dx\right ) \] Input:
integrate((a+I*a*tan(d*x+c))/(e*cos(d*x+c))**(1/2),x)
Output:
I*a*(Integral(-I/sqrt(e*cos(c + d*x)), x) + Integral(tan(c + d*x)/sqrt(e*c os(c + d*x)), x))
\[ \int \frac {a+i a \tan (c+d x)}{\sqrt {e \cos (c+d x)}} \, dx=\int { \frac {i \, a \tan \left (d x + c\right ) + a}{\sqrt {e \cos \left (d x + c\right )}} \,d x } \] Input:
integrate((a+I*a*tan(d*x+c))/(e*cos(d*x+c))^(1/2),x, algorithm="maxima")
Output:
integrate((I*a*tan(d*x + c) + a)/sqrt(e*cos(d*x + c)), x)
Exception generated. \[ \int \frac {a+i a \tan (c+d x)}{\sqrt {e \cos (c+d x)}} \, dx=\text {Exception raised: TypeError} \] Input:
integrate((a+I*a*tan(d*x+c))/(e*cos(d*x+c))^(1/2),x, algorithm="giac")
Output:
Exception raised: TypeError >> an error occurred running a Giac command:IN PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Unable to divide, perhaps due to ro unding error%%%{%%{[%%%{-4,[1]%%%},0]:[1,0,%%%{1,[1]%%%}]%%},[2,1]%%%}+%%% {%%%{8,[2
Time = 1.37 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.23 \[ \int \frac {a+i a \tan (c+d x)}{\sqrt {e \cos (c+d x)}} \, dx=\frac {2\,a\,\sqrt {\cos \left (c+d\,x\right )}\,\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{d\,\sqrt {e\,\cos \left (c+d\,x\right )}}+\frac {a\,\cos \left (c+d\,x\right )\,\sqrt {e\,\cos \left (c+d\,x\right )}\,4{}\mathrm {i}}{d\,e\,\left (\cos \left (2\,c+2\,d\,x\right )+1\right )} \] Input:
int((a + a*tan(c + d*x)*1i)/(e*cos(c + d*x))^(1/2),x)
Output:
(2*a*cos(c + d*x)^(1/2)*ellipticF(c/2 + (d*x)/2, 2))/(d*(e*cos(c + d*x))^( 1/2)) + (a*cos(c + d*x)*(e*cos(c + d*x))^(1/2)*4i)/(d*e*(cos(2*c + 2*d*x) + 1))
\[ \int \frac {a+i a \tan (c+d x)}{\sqrt {e \cos (c+d x)}} \, dx=\frac {\sqrt {e}\, a \left (\int \frac {\sqrt {\cos \left (d x +c \right )}}{\cos \left (d x +c \right )}d x +\left (\int \frac {\sqrt {\cos \left (d x +c \right )}\, \tan \left (d x +c \right )}{\cos \left (d x +c \right )}d x \right ) i \right )}{e} \] Input:
int((a+I*a*tan(d*x+c))/(e*cos(d*x+c))^(1/2),x)
Output:
(sqrt(e)*a*(int(sqrt(cos(c + d*x))/cos(c + d*x),x) + int((sqrt(cos(c + d*x ))*tan(c + d*x))/cos(c + d*x),x)*i))/e