Integrand size = 36, antiderivative size = 158 \[ \int \tan ^m(c+d x) \sqrt {a+i a \tan (c+d x)} (A+B \tan (c+d x)) \, dx=-\frac {(i A+B) \operatorname {AppellF1}\left (\frac {1}{2},-m,1,\frac {3}{2},1+i \tan (c+d x),\frac {1}{2} (1+i \tan (c+d x))\right ) (-i \tan (c+d x))^{-m} \tan ^m(c+d x) \sqrt {a+i a \tan (c+d x)}}{d}+\frac {2 B \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-m,\frac {3}{2},1+i \tan (c+d x)\right ) (-i \tan (c+d x))^{-m} \tan ^m(c+d x) \sqrt {a+i a \tan (c+d x)}}{d} \] Output:
-(I*A+B)*AppellF1(1/2,-m,1,3/2,1+I*tan(d*x+c),1/2+1/2*I*tan(d*x+c))*tan(d* x+c)^m*(a+I*a*tan(d*x+c))^(1/2)/d/((-I*tan(d*x+c))^m)+2*B*hypergeom([1/2, -m],[3/2],1+I*tan(d*x+c))*tan(d*x+c)^m*(a+I*a*tan(d*x+c))^(1/2)/d/((-I*tan (d*x+c))^m)
\[ \int \tan ^m(c+d x) \sqrt {a+i a \tan (c+d x)} (A+B \tan (c+d x)) \, dx=\int \tan ^m(c+d x) \sqrt {a+i a \tan (c+d x)} (A+B \tan (c+d x)) \, dx \] Input:
Integrate[Tan[c + d*x]^m*Sqrt[a + I*a*Tan[c + d*x]]*(A + B*Tan[c + d*x]),x ]
Output:
Integrate[Tan[c + d*x]^m*Sqrt[a + I*a*Tan[c + d*x]]*(A + B*Tan[c + d*x]), x]
Time = 0.70 (sec) , antiderivative size = 159, normalized size of antiderivative = 1.01, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.306, Rules used = {3042, 4084, 3042, 4047, 25, 27, 152, 150, 4082, 77, 75}
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 \sqrt {a+i a \tan (c+d x)} \tan ^m(c+d x) (A+B \tan (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sqrt {a+i a \tan (c+d x)} \tan (c+d x)^m (A+B \tan (c+d x))dx\) |
\(\Big \downarrow \) 4084 |
\(\displaystyle (A-i B) \int \tan ^m(c+d x) \sqrt {i \tan (c+d x) a+a}dx+\frac {i B \int \tan ^m(c+d x) (a-i a \tan (c+d x)) \sqrt {i \tan (c+d x) a+a}dx}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (A-i B) \int \tan (c+d x)^m \sqrt {i \tan (c+d x) a+a}dx+\frac {i B \int \tan (c+d x)^m (a-i a \tan (c+d x)) \sqrt {i \tan (c+d x) a+a}dx}{a}\) |
\(\Big \downarrow \) 4047 |
\(\displaystyle \frac {i a^2 (A-i B) \int -\frac {\tan ^m(c+d x)}{a (a-i a \tan (c+d x)) \sqrt {i \tan (c+d x) a+a}}d(i a \tan (c+d x))}{d}+\frac {i B \int \tan (c+d x)^m (a-i a \tan (c+d x)) \sqrt {i \tan (c+d x) a+a}dx}{a}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {i B \int \tan (c+d x)^m (a-i a \tan (c+d x)) \sqrt {i \tan (c+d x) a+a}dx}{a}-\frac {i a^2 (A-i B) \int \frac {\tan ^m(c+d x)}{a (a-i a \tan (c+d x)) \sqrt {i \tan (c+d x) a+a}}d(i a \tan (c+d x))}{d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {i B \int \tan (c+d x)^m (a-i a \tan (c+d x)) \sqrt {i \tan (c+d x) a+a}dx}{a}-\frac {i a (A-i B) \int \frac {\tan ^m(c+d x)}{(a-i a \tan (c+d x)) \sqrt {i \tan (c+d x) a+a}}d(i a \tan (c+d x))}{d}\) |
\(\Big \downarrow \) 152 |
\(\displaystyle \frac {i B \int \tan (c+d x)^m (a-i a \tan (c+d x)) \sqrt {i \tan (c+d x) a+a}dx}{a}-\frac {i a (A-i B) \sqrt {1+i \tan (c+d x)} \int \frac {\tan ^m(c+d x)}{\sqrt {i \tan (c+d x)+1} (a-i a \tan (c+d x))}d(i a \tan (c+d x))}{d \sqrt {a+i a \tan (c+d x)}}\) |
\(\Big \downarrow \) 150 |
\(\displaystyle \frac {i B \int \tan (c+d x)^m (a-i a \tan (c+d x)) \sqrt {i \tan (c+d x) a+a}dx}{a}+\frac {a (A-i B) \sqrt {1+i \tan (c+d x)} \tan ^{m+1}(c+d x) \operatorname {AppellF1}\left (m+1,\frac {1}{2},1,m+2,-i \tan (c+d x),i \tan (c+d x)\right )}{d (m+1) \sqrt {a+i a \tan (c+d x)}}\) |
\(\Big \downarrow \) 4082 |
\(\displaystyle \frac {i a B \int \frac {\tan ^m(c+d x)}{\sqrt {i \tan (c+d x) a+a}}d\tan (c+d x)}{d}+\frac {a (A-i B) \sqrt {1+i \tan (c+d x)} \tan ^{m+1}(c+d x) \operatorname {AppellF1}\left (m+1,\frac {1}{2},1,m+2,-i \tan (c+d x),i \tan (c+d x)\right )}{d (m+1) \sqrt {a+i a \tan (c+d x)}}\) |
\(\Big \downarrow \) 77 |
\(\displaystyle \frac {i a B \tan ^m(c+d x) (-i \tan (c+d x))^{-m} \int \frac {(-i \tan (c+d x))^m}{\sqrt {i \tan (c+d x) a+a}}d\tan (c+d x)}{d}+\frac {a (A-i B) \sqrt {1+i \tan (c+d x)} \tan ^{m+1}(c+d x) \operatorname {AppellF1}\left (m+1,\frac {1}{2},1,m+2,-i \tan (c+d x),i \tan (c+d x)\right )}{d (m+1) \sqrt {a+i a \tan (c+d x)}}\) |
\(\Big \downarrow \) 75 |
\(\displaystyle \frac {a (A-i B) \sqrt {1+i \tan (c+d x)} \tan ^{m+1}(c+d x) \operatorname {AppellF1}\left (m+1,\frac {1}{2},1,m+2,-i \tan (c+d x),i \tan (c+d x)\right )}{d (m+1) \sqrt {a+i a \tan (c+d x)}}+\frac {2 B \sqrt {a+i a \tan (c+d x)} \tan ^m(c+d x) (-i \tan (c+d x))^{-m} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-m,\frac {3}{2},i \tan (c+d x)+1\right )}{d}\) |
Input:
Int[Tan[c + d*x]^m*Sqrt[a + I*a*Tan[c + d*x]]*(A + B*Tan[c + d*x]),x]
Output:
(a*(A - I*B)*AppellF1[1 + m, 1/2, 1, 2 + m, (-I)*Tan[c + d*x], I*Tan[c + d *x]]*Sqrt[1 + I*Tan[c + d*x]]*Tan[c + d*x]^(1 + m))/(d*(1 + m)*Sqrt[a + I* a*Tan[c + d*x]]) + (2*B*Hypergeometric2F1[1/2, -m, 3/2, 1 + I*Tan[c + d*x] ]*Tan[c + d*x]^m*Sqrt[a + I*a*Tan[c + d*x]])/(d*((-I)*Tan[c + d*x])^m)
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((c + d*x )^(n + 1)/(d*(n + 1)*(-d/(b*c))^m))*Hypergeometric2F1[-m, n + 1, n + 2, 1 + d*(x/c)], x] /; FreeQ[{b, c, d, m, n}, x] && !IntegerQ[n] && (IntegerQ[m] || GtQ[-d/(b*c), 0])
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((-b)*(c/ d))^IntPart[m]*((b*x)^FracPart[m]/((-d)*(x/c))^FracPart[m]) Int[((-d)*(x/ c))^m*(c + d*x)^n, x], x] /; FreeQ[{b, c, d, m, n}, x] && !IntegerQ[m] && !IntegerQ[n] && !GtQ[c, 0] && !GtQ[-d/(b*c), 0]
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((e_) + (f_.)*(x_))^(p_), x_ ] :> Simp[c^n*e^p*((b*x)^(m + 1)/(b*(m + 1)))*AppellF1[m + 1, -n, -p, m + 2 , (-d)*(x/c), (-f)*(x/e)], x] /; FreeQ[{b, c, d, e, f, m, n, p}, x] && !In tegerQ[m] && !IntegerQ[n] && GtQ[c, 0] && (IntegerQ[p] || GtQ[e, 0])
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((e_) + (f_.)*(x_))^(p_), x_ ] :> Simp[c^IntPart[n]*((c + d*x)^FracPart[n]/(1 + d*(x/c))^FracPart[n]) Int[(b*x)^m*(1 + d*(x/c))^n*(e + f*x)^p, x], x] /; FreeQ[{b, c, d, e, f, m, n, p}, x] && !IntegerQ[m] && !IntegerQ[n] && !GtQ[c, 0]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[a*(b/f) Subst[Int[(a + x)^(m - 1)*(( c + (d/b)*x)^n/(b^2 + a*x)), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^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[b*(B/f) Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^n, x], x, Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[ a^2 + b^2, 0] && EqQ[A*b + a*B, 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*b + a*B)/b Int[(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^n, x], x] - Simp[B/b Int[(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^n*(a - b*Tan[ e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[A*b + a*B, 0]
\[\int \tan \left (d x +c \right )^{m} \sqrt {a +i a \tan \left (d x +c \right )}\, \left (A +B \tan \left (d x +c \right )\right )d x\]
Input:
int(tan(d*x+c)^m*(a+I*a*tan(d*x+c))^(1/2)*(A+B*tan(d*x+c)),x)
Output:
int(tan(d*x+c)^m*(a+I*a*tan(d*x+c))^(1/2)*(A+B*tan(d*x+c)),x)
\[ \int \tan ^m(c+d x) \sqrt {a+i a \tan (c+d x)} (A+B \tan (c+d x)) \, dx=\int { {\left (B \tan \left (d x + c\right ) + A\right )} \sqrt {i \, a \tan \left (d x + c\right ) + a} \tan \left (d x + c\right )^{m} \,d x } \] Input:
integrate(tan(d*x+c)^m*(a+I*a*tan(d*x+c))^(1/2)*(A+B*tan(d*x+c)),x, algori thm="fricas")
Output:
integral(sqrt(2)*((A - I*B)*e^(3*I*d*x + 3*I*c) + (A + I*B)*e^(I*d*x + I*c ))*((-I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2*I*c) + 1))^m*sqrt(a/(e^(2 *I*d*x + 2*I*c) + 1))/(e^(2*I*d*x + 2*I*c) + 1), x)
\[ \int \tan ^m(c+d x) \sqrt {a+i a \tan (c+d x)} (A+B \tan (c+d x)) \, dx=\int \sqrt {i a \left (\tan {\left (c + d x \right )} - i\right )} \left (A + B \tan {\left (c + d x \right )}\right ) \tan ^{m}{\left (c + d x \right )}\, dx \] Input:
integrate(tan(d*x+c)**m*(a+I*a*tan(d*x+c))**(1/2)*(A+B*tan(d*x+c)),x)
Output:
Integral(sqrt(I*a*(tan(c + d*x) - I))*(A + B*tan(c + d*x))*tan(c + d*x)**m , x)
\[ \int \tan ^m(c+d x) \sqrt {a+i a \tan (c+d x)} (A+B \tan (c+d x)) \, dx=\int { {\left (B \tan \left (d x + c\right ) + A\right )} \sqrt {i \, a \tan \left (d x + c\right ) + a} \tan \left (d x + c\right )^{m} \,d x } \] Input:
integrate(tan(d*x+c)^m*(a+I*a*tan(d*x+c))^(1/2)*(A+B*tan(d*x+c)),x, algori thm="maxima")
Output:
integrate((B*tan(d*x + c) + A)*sqrt(I*a*tan(d*x + c) + a)*tan(d*x + c)^m, x)
Exception generated. \[ \int \tan ^m(c+d x) \sqrt {a+i a \tan (c+d x)} (A+B \tan (c+d x)) \, dx=\text {Exception raised: TypeError} \] Input:
integrate(tan(d*x+c)^m*(a+I*a*tan(d*x+c))^(1/2)*(A+B*tan(d*x+c)),x, algori thm="giac")
Output:
Exception raised: TypeError >> an error occurred running a Giac command:IN PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Error: Bad Argument TypeError: Bad Argument TypeError: Bad Argument TypeError: Bad Argument TypeDone
Timed out. \[ \int \tan ^m(c+d x) \sqrt {a+i a \tan (c+d x)} (A+B \tan (c+d x)) \, dx=\int {\mathrm {tan}\left (c+d\,x\right )}^m\,\left (A+B\,\mathrm {tan}\left (c+d\,x\right )\right )\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}} \,d x \] Input:
int(tan(c + d*x)^m*(A + B*tan(c + d*x))*(a + a*tan(c + d*x)*1i)^(1/2),x)
Output:
int(tan(c + d*x)^m*(A + B*tan(c + d*x))*(a + a*tan(c + d*x)*1i)^(1/2), x)
\[ \int \tan ^m(c+d x) \sqrt {a+i a \tan (c+d x)} (A+B \tan (c+d x)) \, dx=\frac {\sqrt {a}\, \left (-2 \tan \left (d x +c \right )^{m} \sqrt {\tan \left (d x +c \right ) i +1}\, a i +2 \left (\int \frac {\tan \left (d x +c \right )^{m} \sqrt {\tan \left (d x +c \right ) i +1}}{\tan \left (d x +c \right )}d x \right ) a d i m +2 \left (\int \tan \left (d x +c \right )^{m} \sqrt {\tan \left (d x +c \right ) i +1}\, \tan \left (d x +c \right )d x \right ) a d i m +\left (\int \tan \left (d x +c \right )^{m} \sqrt {\tan \left (d x +c \right ) i +1}\, \tan \left (d x +c \right )d x \right ) a d i +\left (\int \tan \left (d x +c \right )^{m} \sqrt {\tan \left (d x +c \right ) i +1}\, \tan \left (d x +c \right )d x \right ) b d \right )}{d} \] Input:
int(tan(d*x+c)^m*(a+I*a*tan(d*x+c))^(1/2)*(A+B*tan(d*x+c)),x)
Output:
(sqrt(a)*( - 2*tan(c + d*x)**m*sqrt(tan(c + d*x)*i + 1)*a*i + 2*int((tan(c + d*x)**m*sqrt(tan(c + d*x)*i + 1))/tan(c + d*x),x)*a*d*i*m + 2*int(tan(c + d*x)**m*sqrt(tan(c + d*x)*i + 1)*tan(c + d*x),x)*a*d*i*m + int(tan(c + d*x)**m*sqrt(tan(c + d*x)*i + 1)*tan(c + d*x),x)*a*d*i + int(tan(c + d*x)* *m*sqrt(tan(c + d*x)*i + 1)*tan(c + d*x),x)*b*d))/d