Integrand size = 26, antiderivative size = 116 \[ \int \cos ^2(c+d x) (a+i a \tan (c+d x))^{7/2} \, dx=\frac {3 i \sqrt {2} a^{7/2} \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}-\frac {3 i a^3 \sqrt {a+i a \tan (c+d x)}}{d}-\frac {i a^3 (a+i a \tan (c+d x))^{3/2}}{d (a-i a \tan (c+d x))} \] Output:
3*I*2^(1/2)*a^(7/2)*arctanh(1/2*(a+I*a*tan(d*x+c))^(1/2)*2^(1/2)/a^(1/2))/ d-3*I*a^3*(a+I*a*tan(d*x+c))^(1/2)/d-I*a^3*(a+I*a*tan(d*x+c))^(3/2)/d/(a-I *a*tan(d*x+c))
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.12 (sec) , antiderivative size = 51, normalized size of antiderivative = 0.44 \[ \int \cos ^2(c+d x) (a+i a \tan (c+d x))^{7/2} \, dx=-\frac {i a \operatorname {Hypergeometric2F1}\left (2,\frac {5}{2},\frac {7}{2},\frac {1}{2} (1+i \tan (c+d x))\right ) (a+i a \tan (c+d x))^{5/2}}{10 d} \] Input:
Integrate[Cos[c + d*x]^2*(a + I*a*Tan[c + d*x])^(7/2),x]
Output:
((-1/10*I)*a*Hypergeometric2F1[2, 5/2, 7/2, (1 + I*Tan[c + d*x])/2]*(a + I *a*Tan[c + d*x])^(5/2))/d
Time = 0.29 (sec) , antiderivative size = 100, normalized size of antiderivative = 0.86, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {3042, 3968, 51, 60, 73, 219}
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 \cos ^2(c+d x) (a+i a \tan (c+d x))^{7/2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a+i a \tan (c+d x))^{7/2}}{\sec (c+d x)^2}dx\) |
\(\Big \downarrow \) 3968 |
\(\displaystyle -\frac {i a^3 \int \frac {(i \tan (c+d x) a+a)^{3/2}}{(a-i a \tan (c+d x))^2}d(i a \tan (c+d x))}{d}\) |
\(\Big \downarrow \) 51 |
\(\displaystyle -\frac {i a^3 \left (\frac {(a+i a \tan (c+d x))^{3/2}}{a-i a \tan (c+d x)}-\frac {3}{2} \int \frac {\sqrt {i \tan (c+d x) a+a}}{a-i a \tan (c+d x)}d(i a \tan (c+d x))\right )}{d}\) |
\(\Big \downarrow \) 60 |
\(\displaystyle -\frac {i a^3 \left (\frac {(a+i a \tan (c+d x))^{3/2}}{a-i a \tan (c+d x)}-\frac {3}{2} \left (2 a \int \frac {1}{(a-i a \tan (c+d x)) \sqrt {i \tan (c+d x) a+a}}d(i a \tan (c+d x))-2 \sqrt {a+i a \tan (c+d x)}\right )\right )}{d}\) |
\(\Big \downarrow \) 73 |
\(\displaystyle -\frac {i a^3 \left (\frac {(a+i a \tan (c+d x))^{3/2}}{a-i a \tan (c+d x)}-\frac {3}{2} \left (4 a \int \frac {1}{a^2 \tan ^2(c+d x)+2 a}d\sqrt {i \tan (c+d x) a+a}-2 \sqrt {a+i a \tan (c+d x)}\right )\right )}{d}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle -\frac {i a^3 \left (\frac {(a+i a \tan (c+d x))^{3/2}}{a-i a \tan (c+d x)}-\frac {3}{2} \left (2 i \sqrt {2} \sqrt {a} \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2}}\right )-2 \sqrt {a+i a \tan (c+d x)}\right )\right )}{d}\) |
Input:
Int[Cos[c + d*x]^2*(a + I*a*Tan[c + d*x])^(7/2),x]
Output:
((-I)*a^3*((a + I*a*Tan[c + d*x])^(3/2)/(a - I*a*Tan[c + d*x]) - (3*((2*I) *Sqrt[2]*Sqrt[a]*ArcTan[(Sqrt[a]*Tan[c + d*x])/Sqrt[2]] - 2*Sqrt[a + I*a*T an[c + d*x]]))/2))/d
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[ (a + b*x)^(m + 1)*((c + d*x)^n/(b*(m + 1))), x] - Simp[d*(n/(b*(m + 1))) Int[(a + b*x)^(m + 1)*(c + d*x)^(n - 1), x], x] /; FreeQ[{a, b, c, d, n}, x ] && ILtQ[m, -1] && FractionQ[n] && GtQ[n, 0]
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[ (a + b*x)^(m + 1)*((c + d*x)^n/(b*(m + n + 1))), x] + Simp[n*((b*c - a*d)/( b*(m + n + 1))) Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a, b, c, d}, x] && GtQ[n, 0] && NeQ[m + n + 1, 0] && !(IGtQ[m, 0] && ( !Integer Q[n] || (GtQ[m, 0] && LtQ[m - n, 0]))) && !ILtQ[m + n + 2, 0] && IntLinear Q[a, b, c, d, m, n, x]
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ {p = Denominator[m]}, Simp[p/b Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL inearQ[a, b, c, d, m, n, x]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_ ), x_Symbol] :> Simp[1/(a^(m - 2)*b*f) Subst[Int[(a - x)^(m/2 - 1)*(a + x )^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && EqQ[a^2 + b^2, 0] && IntegerQ[m/2]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 461 vs. \(2 (96 ) = 192\).
Time = 10.76 (sec) , antiderivative size = 462, normalized size of antiderivative = 3.98
method | result | size |
default | \(-\frac {2 \cos \left (d x +c \right )^{3} \left (i \left (-3 \cos \left (d x +c \right )-3\right ) \sin \left (d x +c \right ) \operatorname {arctanh}\left (\frac {\left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right ) \sqrt {2}}{\sqrt {\cot \left (d x +c \right )^{2}-2 \cot \left (d x +c \right ) \csc \left (d x +c \right )+\csc \left (d x +c \right )^{2}-1}}\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}+\operatorname {arctanh}\left (\frac {\left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right ) \sqrt {2}}{\sqrt {\cot \left (d x +c \right )^{2}-2 \cot \left (d x +c \right ) \csc \left (d x +c \right )+\csc \left (d x +c \right )^{2}-1}}\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \left (3 \cos \left (d x +c \right )^{2}+3 \cos \left (d x +c \right )\right )+\left (3 \cos \left (d x +c \right )+3\right ) \sin \left (d x +c \right ) \arctan \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \sqrt {2}}{2}\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}+i \cos \left (d x +c \right ) \left (3 \cos \left (d x +c \right )+3\right ) \arctan \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \sqrt {2}}{2}\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}+\left (1-\cos \left (d x +c \right )\right ) \sin \left (d x +c \right )+i \left (\cos \left (d x +c \right )^{2}+2 \cos \left (d x +c \right )+1\right )\right ) \sqrt {a \left (1+i \tan \left (d x +c \right )\right )}\, a^{3} \left (-\tan \left (d x +c \right )+i\right )^{3}}{d \left (\left (4 \cos \left (d x +c \right )^{2}+2 \cos \left (d x +c \right )-1\right ) \sin \left (d x +c \right )+i \left (-4 \cos \left (d x +c \right )^{3}-2 \cos \left (d x +c \right )^{2}+3 \cos \left (d x +c \right )+1\right )\right )}\) | \(462\) |
Input:
int(cos(d*x+c)^2*(a+I*a*tan(d*x+c))^(7/2),x,method=_RETURNVERBOSE)
Output:
-2/d*cos(d*x+c)^3*(I*(-3*cos(d*x+c)-3)*sin(d*x+c)*arctanh(1/(cot(d*x+c)^2- 2*cot(d*x+c)*csc(d*x+c)+csc(d*x+c)^2-1)^(1/2)*(csc(d*x+c)-cot(d*x+c))*2^(1 /2))*(-cos(d*x+c)/(cos(d*x+c)+1))^(1/2)+arctanh(1/(cot(d*x+c)^2-2*cot(d*x+ c)*csc(d*x+c)+csc(d*x+c)^2-1)^(1/2)*(csc(d*x+c)-cot(d*x+c))*2^(1/2))*(-cos (d*x+c)/(cos(d*x+c)+1))^(1/2)*(3*cos(d*x+c)^2+3*cos(d*x+c))+(3*cos(d*x+c)+ 3)*sin(d*x+c)*arctan(1/2*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*2^(1/2))*(-c os(d*x+c)/(cos(d*x+c)+1))^(1/2)+I*cos(d*x+c)*(3*cos(d*x+c)+3)*arctan(1/2*( -2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*2^(1/2))*(-cos(d*x+c)/(cos(d*x+c)+1))^ (1/2)+(1-cos(d*x+c))*sin(d*x+c)+I*(cos(d*x+c)^2+2*cos(d*x+c)+1))*(a*(1+I*t an(d*x+c)))^(1/2)*a^3*(-tan(d*x+c)+I)^3/((4*cos(d*x+c)^2+2*cos(d*x+c)-1)*s in(d*x+c)+I*(-4*cos(d*x+c)^3-2*cos(d*x+c)^2+3*cos(d*x+c)+1))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 235 vs. \(2 (89) = 178\).
Time = 0.09 (sec) , antiderivative size = 235, normalized size of antiderivative = 2.03 \[ \int \cos ^2(c+d x) (a+i a \tan (c+d x))^{7/2} \, dx=-\frac {3 \, \sqrt {2} \sqrt {-\frac {a^{7}}{d^{2}}} d \log \left (\frac {4 \, {\left (a^{4} e^{\left (i \, d x + i \, c\right )} + \sqrt {-\frac {a^{7}}{d^{2}}} {\left (i \, d e^{\left (2 i \, d x + 2 i \, c\right )} + i \, d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{a^{3}}\right ) - 3 \, \sqrt {2} \sqrt {-\frac {a^{7}}{d^{2}}} d \log \left (\frac {4 \, {\left (a^{4} e^{\left (i \, d x + i \, c\right )} + \sqrt {-\frac {a^{7}}{d^{2}}} {\left (-i \, d e^{\left (2 i \, d x + 2 i \, c\right )} - i \, d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{a^{3}}\right ) + 2 \, \sqrt {2} {\left (i \, a^{3} e^{\left (3 i \, d x + 3 i \, c\right )} + 3 i \, a^{3} e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}}{2 \, d} \] Input:
integrate(cos(d*x+c)^2*(a+I*a*tan(d*x+c))^(7/2),x, algorithm="fricas")
Output:
-1/2*(3*sqrt(2)*sqrt(-a^7/d^2)*d*log(4*(a^4*e^(I*d*x + I*c) + sqrt(-a^7/d^ 2)*(I*d*e^(2*I*d*x + 2*I*c) + I*d)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1)))*e^(- I*d*x - I*c)/a^3) - 3*sqrt(2)*sqrt(-a^7/d^2)*d*log(4*(a^4*e^(I*d*x + I*c) + sqrt(-a^7/d^2)*(-I*d*e^(2*I*d*x + 2*I*c) - I*d)*sqrt(a/(e^(2*I*d*x + 2*I *c) + 1)))*e^(-I*d*x - I*c)/a^3) + 2*sqrt(2)*(I*a^3*e^(3*I*d*x + 3*I*c) + 3*I*a^3*e^(I*d*x + I*c))*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1)))/d
Timed out. \[ \int \cos ^2(c+d x) (a+i a \tan (c+d x))^{7/2} \, dx=\text {Timed out} \] Input:
integrate(cos(d*x+c)**2*(a+I*a*tan(d*x+c))**(7/2),x)
Output:
Timed out
Time = 0.12 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.01 \[ \int \cos ^2(c+d x) (a+i a \tan (c+d x))^{7/2} \, dx=-\frac {i \, {\left (3 \, \sqrt {2} a^{\frac {9}{2}} \log \left (-\frac {\sqrt {2} \sqrt {a} - \sqrt {i \, a \tan \left (d x + c\right ) + a}}{\sqrt {2} \sqrt {a} + \sqrt {i \, a \tan \left (d x + c\right ) + a}}\right ) + 4 \, \sqrt {i \, a \tan \left (d x + c\right ) + a} a^{4} - \frac {4 \, \sqrt {i \, a \tan \left (d x + c\right ) + a} a^{5}}{i \, a \tan \left (d x + c\right ) - a}\right )}}{2 \, a d} \] Input:
integrate(cos(d*x+c)^2*(a+I*a*tan(d*x+c))^(7/2),x, algorithm="maxima")
Output:
-1/2*I*(3*sqrt(2)*a^(9/2)*log(-(sqrt(2)*sqrt(a) - sqrt(I*a*tan(d*x + c) + a))/(sqrt(2)*sqrt(a) + sqrt(I*a*tan(d*x + c) + a))) + 4*sqrt(I*a*tan(d*x + c) + a)*a^4 - 4*sqrt(I*a*tan(d*x + c) + a)*a^5/(I*a*tan(d*x + c) - a))/(a *d)
Exception generated. \[ \int \cos ^2(c+d x) (a+i a \tan (c+d x))^{7/2} \, dx=\text {Exception raised: TypeError} \] Input:
integrate(cos(d*x+c)^2*(a+I*a*tan(d*x+c))^(7/2),x, algorithm="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 TypeDone
Timed out. \[ \int \cos ^2(c+d x) (a+i a \tan (c+d x))^{7/2} \, dx=\int {\cos \left (c+d\,x\right )}^2\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{7/2} \,d x \] Input:
int(cos(c + d*x)^2*(a + a*tan(c + d*x)*1i)^(7/2),x)
Output:
int(cos(c + d*x)^2*(a + a*tan(c + d*x)*1i)^(7/2), x)
\[ \int \cos ^2(c+d x) (a+i a \tan (c+d x))^{7/2} \, dx=\sqrt {a}\, a^{3} \left (-\left (\int \sqrt {\tan \left (d x +c \right ) i +1}\, \cos \left (d x +c \right )^{2} \tan \left (d x +c \right )^{3}d x \right ) i -3 \left (\int \sqrt {\tan \left (d x +c \right ) i +1}\, \cos \left (d x +c \right )^{2} \tan \left (d x +c \right )^{2}d x \right )+3 \left (\int \sqrt {\tan \left (d x +c \right ) i +1}\, \cos \left (d x +c \right )^{2} \tan \left (d x +c \right )d x \right ) i +\int \sqrt {\tan \left (d x +c \right ) i +1}\, \cos \left (d x +c \right )^{2}d x \right ) \] Input:
int(cos(d*x+c)^2*(a+I*a*tan(d*x+c))^(7/2),x)
Output:
sqrt(a)*a**3*( - int(sqrt(tan(c + d*x)*i + 1)*cos(c + d*x)**2*tan(c + d*x) **3,x)*i - 3*int(sqrt(tan(c + d*x)*i + 1)*cos(c + d*x)**2*tan(c + d*x)**2, x) + 3*int(sqrt(tan(c + d*x)*i + 1)*cos(c + d*x)**2*tan(c + d*x),x)*i + in t(sqrt(tan(c + d*x)*i + 1)*cos(c + d*x)**2,x))