Integrand size = 26, antiderivative size = 154 \[ \int \cos ^3(c+d x) \sqrt {a+i a \tan (c+d x)} \, dx=\frac {5 i \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a} \sec (c+d x)}{\sqrt {2} \sqrt {a+i a \tan (c+d x)}}\right )}{8 \sqrt {2} d}+\frac {5 i a \cos (c+d x)}{12 d \sqrt {a+i a \tan (c+d x)}}-\frac {5 i \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{8 d}-\frac {i \cos ^3(c+d x) \sqrt {a+i a \tan (c+d x)}}{3 d} \] Output:
5/16*I*a^(1/2)*arctanh(1/2*a^(1/2)*sec(d*x+c)*2^(1/2)/(a+I*a*tan(d*x+c))^( 1/2))*2^(1/2)/d+5/12*I*a*cos(d*x+c)/d/(a+I*a*tan(d*x+c))^(1/2)-5/8*I*cos(d *x+c)*(a+I*a*tan(d*x+c))^(1/2)/d-1/3*I*cos(d*x+c)^3*(a+I*a*tan(d*x+c))^(1/ 2)/d
Time = 0.65 (sec) , antiderivative size = 126, normalized size of antiderivative = 0.82 \[ \int \cos ^3(c+d x) \sqrt {a+i a \tan (c+d x)} \, dx=-\frac {i e^{-3 i (c+d x)} \left (-3+11 e^{2 i (c+d x)}+16 e^{4 i (c+d x)}+2 e^{6 i (c+d x)}-15 e^{2 i (c+d x)} \sqrt {1+e^{2 i (c+d x)}} \text {arctanh}\left (\sqrt {1+e^{2 i (c+d x)}}\right )\right ) \sqrt {a+i a \tan (c+d x)}}{48 d} \] Input:
Integrate[Cos[c + d*x]^3*Sqrt[a + I*a*Tan[c + d*x]],x]
Output:
((-1/48*I)*(-3 + 11*E^((2*I)*(c + d*x)) + 16*E^((4*I)*(c + d*x)) + 2*E^((6 *I)*(c + d*x)) - 15*E^((2*I)*(c + d*x))*Sqrt[1 + E^((2*I)*(c + d*x))]*ArcT anh[Sqrt[1 + E^((2*I)*(c + d*x))]])*Sqrt[a + I*a*Tan[c + d*x]])/(d*E^((3*I )*(c + d*x)))
Time = 0.64 (sec) , antiderivative size = 163, normalized size of antiderivative = 1.06, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.346, Rules used = {3042, 3978, 3042, 3983, 3042, 3971, 3042, 3970, 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 ^3(c+d x) \sqrt {a+i a \tan (c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sqrt {a+i a \tan (c+d x)}}{\sec (c+d x)^3}dx\) |
\(\Big \downarrow \) 3978 |
\(\displaystyle \frac {5}{6} a \int \frac {\cos (c+d x)}{\sqrt {i \tan (c+d x) a+a}}dx-\frac {i \cos ^3(c+d x) \sqrt {a+i a \tan (c+d x)}}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {5}{6} a \int \frac {1}{\sec (c+d x) \sqrt {i \tan (c+d x) a+a}}dx-\frac {i \cos ^3(c+d x) \sqrt {a+i a \tan (c+d x)}}{3 d}\) |
\(\Big \downarrow \) 3983 |
\(\displaystyle \frac {5}{6} a \left (\frac {3 \int \cos (c+d x) \sqrt {i \tan (c+d x) a+a}dx}{4 a}+\frac {i \cos (c+d x)}{2 d \sqrt {a+i a \tan (c+d x)}}\right )-\frac {i \cos ^3(c+d x) \sqrt {a+i a \tan (c+d x)}}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {5}{6} a \left (\frac {3 \int \frac {\sqrt {i \tan (c+d x) a+a}}{\sec (c+d x)}dx}{4 a}+\frac {i \cos (c+d x)}{2 d \sqrt {a+i a \tan (c+d x)}}\right )-\frac {i \cos ^3(c+d x) \sqrt {a+i a \tan (c+d x)}}{3 d}\) |
\(\Big \downarrow \) 3971 |
\(\displaystyle \frac {5}{6} a \left (\frac {3 \left (\frac {1}{2} a \int \frac {\sec (c+d x)}{\sqrt {i \tan (c+d x) a+a}}dx-\frac {i \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{d}\right )}{4 a}+\frac {i \cos (c+d x)}{2 d \sqrt {a+i a \tan (c+d x)}}\right )-\frac {i \cos ^3(c+d x) \sqrt {a+i a \tan (c+d x)}}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {5}{6} a \left (\frac {3 \left (\frac {1}{2} a \int \frac {\sec (c+d x)}{\sqrt {i \tan (c+d x) a+a}}dx-\frac {i \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{d}\right )}{4 a}+\frac {i \cos (c+d x)}{2 d \sqrt {a+i a \tan (c+d x)}}\right )-\frac {i \cos ^3(c+d x) \sqrt {a+i a \tan (c+d x)}}{3 d}\) |
\(\Big \downarrow \) 3970 |
\(\displaystyle \frac {5}{6} a \left (\frac {3 \left (\frac {i a \int \frac {1}{2-\frac {a \sec ^2(c+d x)}{i \tan (c+d x) a+a}}d\frac {\sec (c+d x)}{\sqrt {i \tan (c+d x) a+a}}}{d}-\frac {i \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{d}\right )}{4 a}+\frac {i \cos (c+d x)}{2 d \sqrt {a+i a \tan (c+d x)}}\right )-\frac {i \cos ^3(c+d x) \sqrt {a+i a \tan (c+d x)}}{3 d}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {5}{6} a \left (\frac {3 \left (\frac {i \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a} \sec (c+d x)}{\sqrt {2} \sqrt {a+i a \tan (c+d x)}}\right )}{\sqrt {2} d}-\frac {i \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{d}\right )}{4 a}+\frac {i \cos (c+d x)}{2 d \sqrt {a+i a \tan (c+d x)}}\right )-\frac {i \cos ^3(c+d x) \sqrt {a+i a \tan (c+d x)}}{3 d}\) |
Input:
Int[Cos[c + d*x]^3*Sqrt[a + I*a*Tan[c + d*x]],x]
Output:
((-1/3*I)*Cos[c + d*x]^3*Sqrt[a + I*a*Tan[c + d*x]])/d + (5*a*(((I/2)*Cos[ c + d*x])/(d*Sqrt[a + I*a*Tan[c + d*x]]) + (3*((I*Sqrt[a]*ArcTanh[(Sqrt[a] *Sec[c + d*x])/(Sqrt[2]*Sqrt[a + I*a*Tan[c + d*x]])])/(Sqrt[2]*d) - (I*Cos [c + d*x]*Sqrt[a + I*a*Tan[c + d*x]])/d))/(4*a)))/6
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_)]/Sqrt[(a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]], x_S ymbol] :> Simp[-2*(a/(b*f)) Subst[Int[1/(2 - a*x^2), x], x, Sec[e + f*x]/ Sqrt[a + b*Tan[e + f*x]]], x] /; FreeQ[{a, b, e, f}, x] && EqQ[a^2 + b^2, 0 ]
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*( x_)])^(n_), x_Symbol] :> Simp[b*(d*Sec[e + f*x])^m*((a + b*Tan[e + f*x])^n/ (a*f*m)), x] + Simp[a/(2*d^2) Int[(d*Sec[e + f*x])^(m + 2)*(a + b*Tan[e + f*x])^(n - 1), x], x] /; FreeQ[{a, b, d, e, f}, x] && EqQ[a^2 + b^2, 0] && EqQ[m/2 + n, 0] && GtQ[n, 0]
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x _)])^(n_), x_Symbol] :> Simp[b*(d*Sec[e + f*x])^m*((a + b*Tan[e + f*x])^n/( a*f*m)), x] + Simp[a*((m + n)/(m*d^2)) Int[(d*Sec[e + f*x])^(m + 2)*(a + b*Tan[e + f*x])^(n - 1), x], x] /; FreeQ[{a, b, d, e, f}, x] && EqQ[a^2 + b ^2, 0] && GtQ[n, 0] && LtQ[m, -1] && IntegersQ[2*m, 2*n]
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*( x_)])^(n_), x_Symbol] :> Simp[a*(d*Sec[e + f*x])^m*((a + b*Tan[e + f*x])^n/ (b*f*(m + 2*n))), x] + Simp[Simplify[m + n]/(a*(m + 2*n)) Int[(d*Sec[e + f*x])^m*(a + b*Tan[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, m}, x ] && EqQ[a^2 + b^2, 0] && LtQ[n, 0] && NeQ[m + 2*n, 0] && IntegersQ[2*m, 2* n]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 339 vs. \(2 (123 ) = 246\).
Time = 4.66 (sec) , antiderivative size = 340, normalized size of antiderivative = 2.21
method | result | size |
default | \(\frac {\left (15 i \sin \left (d x +c \right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {arctanh}\left (\frac {\sqrt {2}\, \left (\cot \left (d x +c \right )-\csc \left (d x +c \right )\right )}{\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 )+\left (-15 \cos \left (d x +c \right )-15\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {arctanh}\left (\frac {\sqrt {2}\, \left (\cot \left (d x +c \right )-\csc \left (d x +c \right )\right )}{\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 )+i \left (-15 \cos \left (d x +c \right )-15\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \arctan \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \sqrt {2}}{2}\right )-15 \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \arctan \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \sqrt {2}}{2}\right ) \sin \left (d x +c \right )+i \cos \left (d x +c \right ) \left (4 \cos \left (d x +c \right )^{2}-30\right )+20 \sin \left (d x +c \right ) \cos \left (d x +c \right )^{2}\right ) \sqrt {a \left (1+i \tan \left (d x +c \right )\right )}}{48 d}\) | \(340\) |
Input:
int(cos(d*x+c)^3*(a+I*a*tan(d*x+c))^(1/2),x,method=_RETURNVERBOSE)
Output:
1/48/d*(15*I*sin(d*x+c)*(-cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*arctanh(2^(1/2) *(cot(d*x+c)-csc(d*x+c))/(cot(d*x+c)^2-2*cot(d*x+c)*csc(d*x+c)+csc(d*x+c)^ 2-1)^(1/2))+(-15*cos(d*x+c)-15)*(-cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*arctanh (2^(1/2)*(cot(d*x+c)-csc(d*x+c))/(cot(d*x+c)^2-2*cot(d*x+c)*csc(d*x+c)+csc (d*x+c)^2-1)^(1/2))+I*(-15*cos(d*x+c)-15)*(-cos(d*x+c)/(cos(d*x+c)+1))^(1/ 2)*arctan(1/2*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*2^(1/2))-15*(-cos(d*x+c )/(cos(d*x+c)+1))^(1/2)*arctan(1/2*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*2^ (1/2))*sin(d*x+c)+I*cos(d*x+c)*(4*cos(d*x+c)^2-30)+20*sin(d*x+c)*cos(d*x+c )^2)*(a*(1+I*tan(d*x+c)))^(1/2)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 245 vs. \(2 (115) = 230\).
Time = 0.09 (sec) , antiderivative size = 245, normalized size of antiderivative = 1.59 \[ \int \cos ^3(c+d x) \sqrt {a+i a \tan (c+d x)} \, dx=\frac {{\left (15 \, \sqrt {\frac {1}{2}} d \sqrt {-\frac {a}{d^{2}}} e^{\left (2 i \, d x + 2 i \, c\right )} \log \left (\frac {5 \, {\left (\sqrt {2} \sqrt {\frac {1}{2}} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {-\frac {a}{d^{2}}} + i \, a\right )} e^{\left (-i \, d x - i \, c\right )}}{4 \, d}\right ) - 15 \, \sqrt {\frac {1}{2}} d \sqrt {-\frac {a}{d^{2}}} e^{\left (2 i \, d x + 2 i \, c\right )} \log \left (-\frac {5 \, {\left (\sqrt {2} \sqrt {\frac {1}{2}} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {-\frac {a}{d^{2}}} - i \, a\right )} e^{\left (-i \, d x - i \, c\right )}}{4 \, d}\right ) + \sqrt {2} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} {\left (-2 i \, e^{\left (6 i \, d x + 6 i \, c\right )} - 16 i \, e^{\left (4 i \, d x + 4 i \, c\right )} - 11 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 3 i\right )}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{48 \, d} \] Input:
integrate(cos(d*x+c)^3*(a+I*a*tan(d*x+c))^(1/2),x, algorithm="fricas")
Output:
1/48*(15*sqrt(1/2)*d*sqrt(-a/d^2)*e^(2*I*d*x + 2*I*c)*log(5/4*(sqrt(2)*sqr t(1/2)*(d*e^(2*I*d*x + 2*I*c) + d)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*sqrt( -a/d^2) + I*a)*e^(-I*d*x - I*c)/d) - 15*sqrt(1/2)*d*sqrt(-a/d^2)*e^(2*I*d* x + 2*I*c)*log(-5/4*(sqrt(2)*sqrt(1/2)*(d*e^(2*I*d*x + 2*I*c) + d)*sqrt(a/ (e^(2*I*d*x + 2*I*c) + 1))*sqrt(-a/d^2) - I*a)*e^(-I*d*x - I*c)/d) + sqrt( 2)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*(-2*I*e^(6*I*d*x + 6*I*c) - 16*I*e^(4 *I*d*x + 4*I*c) - 11*I*e^(2*I*d*x + 2*I*c) + 3*I))*e^(-2*I*d*x - 2*I*c)/d
Timed out. \[ \int \cos ^3(c+d x) \sqrt {a+i a \tan (c+d x)} \, dx=\text {Timed out} \] Input:
integrate(cos(d*x+c)**3*(a+I*a*tan(d*x+c))**(1/2),x)
Output:
Timed out
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 935 vs. \(2 (115) = 230\).
Time = 0.27 (sec) , antiderivative size = 935, normalized size of antiderivative = 6.07 \[ \int \cos ^3(c+d x) \sqrt {a+i a \tan (c+d x)} \, dx=\text {Too large to display} \] Input:
integrate(cos(d*x+c)^3*(a+I*a*tan(d*x+c))^(1/2),x, algorithm="maxima")
Output:
-1/192*(8*(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(3/4)*(I*sqrt(2)*cos(3/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1 )) - sqrt(2)*sin(3/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)))*sqr t(a) + 12*(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*((-I*sqrt(2)*cos(2*d*x + 2*c) - sqrt(2)*sin(2*d*x + 2*c) + 4*I*sq rt(2))*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) + (sqrt(2) *cos(2*d*x + 2*c) - I*sqrt(2)*sin(2*d*x + 2*c) - 4*sqrt(2))*sin(1/2*arctan 2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)))*sqrt(a) + 15*(2*sqrt(2)*arctan 2((cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4) *sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)), (cos(2*d*x + 2* c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*cos(1/2*arctan2( sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) + 1) - 2*sqrt(2)*arctan2((cos(2*d *x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*sin(1/2*a rctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)), (cos(2*d*x + 2*c)^2 + sin (2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) - 1) - I*sqrt(2)*log(sqrt(cos(2*d*x + 2*c)^ 2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))^2 + sqrt(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d *x + 2*c) + 1))^2 + 2*(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(...
Exception generated. \[ \int \cos ^3(c+d x) \sqrt {a+i a \tan (c+d x)} \, dx=\text {Exception raised: TypeError} \] Input:
integrate(cos(d*x+c)^3*(a+I*a*tan(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:Error: Bad Argument TypeError: Bad Argument TypeDone
Timed out. \[ \int \cos ^3(c+d x) \sqrt {a+i a \tan (c+d x)} \, dx=\int {\cos \left (c+d\,x\right )}^3\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}} \,d x \] Input:
int(cos(c + d*x)^3*(a + a*tan(c + d*x)*1i)^(1/2),x)
Output:
int(cos(c + d*x)^3*(a + a*tan(c + d*x)*1i)^(1/2), x)
\[ \int \cos ^3(c+d x) \sqrt {a+i a \tan (c+d x)} \, dx=\sqrt {a}\, \left (\int \sqrt {\tan \left (d x +c \right ) i +1}\, \cos \left (d x +c \right )^{3}d x \right ) \] Input:
int(cos(d*x+c)^3*(a+I*a*tan(d*x+c))^(1/2),x)
Output:
sqrt(a)*int(sqrt(tan(c + d*x)*i + 1)*cos(c + d*x)**3,x)