Integrand size = 23, antiderivative size = 113 \[ \int \frac {\cot ^2(e+f x)}{(a+a \sin (e+f x))^{3/2}} \, dx=\frac {3 \text {arctanh}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {a+a \sin (e+f x)}}\right )}{a^{3/2} f}-\frac {2 \sqrt {2} \text {arctanh}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {2} \sqrt {a+a \sin (e+f x)}}\right )}{a^{3/2} f}-\frac {\cot (e+f x)}{a f \sqrt {a+a \sin (e+f x)}} \] Output:
3*arctanh(a^(1/2)*cos(f*x+e)/(a+a*sin(f*x+e))^(1/2))/a^(3/2)/f-2*arctanh(1 /2*a^(1/2)*cos(f*x+e)*2^(1/2)/(a+a*sin(f*x+e))^(1/2))*2^(1/2)/a^(3/2)/f-co t(f*x+e)/a/f/(a+a*sin(f*x+e))^(1/2)
Result contains complex when optimal does not.
Time = 3.03 (sec) , antiderivative size = 206, normalized size of antiderivative = 1.82 \[ \int \frac {\cot ^2(e+f x)}{(a+a \sin (e+f x))^{3/2}} \, dx=\frac {\left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^3 \left ((16+16 i) (-1)^{3/4} \text {arctanh}\left (\left (\frac {1}{2}+\frac {i}{2}\right ) (-1)^{3/4} \left (-1+\tan \left (\frac {1}{4} (e+f x)\right )\right )\right )-\cot \left (\frac {1}{4} (e+f x)\right )+2 \left (3 \log \left (1+\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )-3 \log \left (1-\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )+\sec \left (\frac {1}{2} (e+f x)\right )+\csc (e+f x) \sin ^2\left (\frac {1}{4} (e+f x)\right )-\csc (e+f x) \sin \left (\frac {1}{4} (e+f x)\right ) \sin \left (\frac {3}{4} (e+f x)\right )\right )\right )}{4 f (a (1+\sin (e+f x)))^{3/2}} \] Input:
Integrate[Cot[e + f*x]^2/(a + a*Sin[e + f*x])^(3/2),x]
Output:
((Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^3*((16 + 16*I)*(-1)^(3/4)*ArcTanh[( 1/2 + I/2)*(-1)^(3/4)*(-1 + Tan[(e + f*x)/4])] - Cot[(e + f*x)/4] + 2*(3*L og[1 + Cos[(e + f*x)/2] - Sin[(e + f*x)/2]] - 3*Log[1 - Cos[(e + f*x)/2] + Sin[(e + f*x)/2]] + Sec[(e + f*x)/2] + Csc[e + f*x]*Sin[(e + f*x)/4]^2 - Csc[e + f*x]*Sin[(e + f*x)/4]*Sin[(3*(e + f*x))/4])))/(4*f*(a*(1 + Sin[e + f*x]))^(3/2))
Time = 0.64 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.07, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.435, Rules used = {3042, 3194, 27, 3042, 3464, 3042, 3128, 219, 3252, 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 \frac {\cot ^2(e+f x)}{(a \sin (e+f x)+a)^{3/2}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\tan (e+f x)^2 (a \sin (e+f x)+a)^{3/2}}dx\) |
\(\Big \downarrow \) 3194 |
\(\displaystyle \frac {\int -\frac {\csc (e+f x) (3 a-a \sin (e+f x))}{2 \sqrt {\sin (e+f x) a+a}}dx}{a^2}-\frac {\cot (e+f x)}{a f \sqrt {a \sin (e+f x)+a}}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {\int \frac {\csc (e+f x) (3 a-a \sin (e+f x))}{\sqrt {\sin (e+f x) a+a}}dx}{2 a^2}-\frac {\cot (e+f x)}{a f \sqrt {a \sin (e+f x)+a}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\int \frac {3 a-a \sin (e+f x)}{\sin (e+f x) \sqrt {\sin (e+f x) a+a}}dx}{2 a^2}-\frac {\cot (e+f x)}{a f \sqrt {a \sin (e+f x)+a}}\) |
\(\Big \downarrow \) 3464 |
\(\displaystyle -\frac {3 \int \csc (e+f x) \sqrt {\sin (e+f x) a+a}dx-4 a \int \frac {1}{\sqrt {\sin (e+f x) a+a}}dx}{2 a^2}-\frac {\cot (e+f x)}{a f \sqrt {a \sin (e+f x)+a}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {3 \int \frac {\sqrt {\sin (e+f x) a+a}}{\sin (e+f x)}dx-4 a \int \frac {1}{\sqrt {\sin (e+f x) a+a}}dx}{2 a^2}-\frac {\cot (e+f x)}{a f \sqrt {a \sin (e+f x)+a}}\) |
\(\Big \downarrow \) 3128 |
\(\displaystyle -\frac {\frac {8 a \int \frac {1}{2 a-\frac {a^2 \cos ^2(e+f x)}{\sin (e+f x) a+a}}d\frac {a \cos (e+f x)}{\sqrt {\sin (e+f x) a+a}}}{f}+3 \int \frac {\sqrt {\sin (e+f x) a+a}}{\sin (e+f x)}dx}{2 a^2}-\frac {\cot (e+f x)}{a f \sqrt {a \sin (e+f x)+a}}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle -\frac {3 \int \frac {\sqrt {\sin (e+f x) a+a}}{\sin (e+f x)}dx+\frac {4 \sqrt {2} \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {2} \sqrt {a \sin (e+f x)+a}}\right )}{f}}{2 a^2}-\frac {\cot (e+f x)}{a f \sqrt {a \sin (e+f x)+a}}\) |
\(\Big \downarrow \) 3252 |
\(\displaystyle -\frac {\frac {4 \sqrt {2} \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {2} \sqrt {a \sin (e+f x)+a}}\right )}{f}-\frac {6 a \int \frac {1}{a-\frac {a^2 \cos ^2(e+f x)}{\sin (e+f x) a+a}}d\frac {a \cos (e+f x)}{\sqrt {\sin (e+f x) a+a}}}{f}}{2 a^2}-\frac {\cot (e+f x)}{a f \sqrt {a \sin (e+f x)+a}}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle -\frac {\frac {4 \sqrt {2} \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {2} \sqrt {a \sin (e+f x)+a}}\right )}{f}-\frac {6 \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {a \sin (e+f x)+a}}\right )}{f}}{2 a^2}-\frac {\cot (e+f x)}{a f \sqrt {a \sin (e+f x)+a}}\) |
Input:
Int[Cot[e + f*x]^2/(a + a*Sin[e + f*x])^(3/2),x]
Output:
-1/2*((-6*Sqrt[a]*ArcTanh[(Sqrt[a]*Cos[e + f*x])/Sqrt[a + a*Sin[e + f*x]]] )/f + (4*Sqrt[2]*Sqrt[a]*ArcTanh[(Sqrt[a]*Cos[e + f*x])/(Sqrt[2]*Sqrt[a + a*Sin[e + f*x]])])/f)/a^2 - Cot[e + f*x]/(a*f*Sqrt[a + a*Sin[e + f*x]])
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, 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[1/Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[-2/d Subst[Int[1/(2*a - x^2), x], x, b*(Cos[c + d*x]/Sqrt[a + b*Sin[c + d*x]])], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)/tan[(e_.) + (f_.)*(x_)]^2, x_Symbol] :> Simp[-(a + b*Sin[e + f*x])^(m + 1)/(a*f*Tan[e + f*x]), x] + Si mp[1/b^2 Int[(a + b*Sin[e + f*x])^(m + 1)*((b*m - a*(m + 1)*Sin[e + f*x]) /Sin[e + f*x]), x], x] /; FreeQ[{a, b, e, f}, x] && EqQ[a^2 - b^2, 0] && In tegerQ[m - 1/2] && LtQ[m, -1]
Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/((c_.) + (d_.)*sin[(e_.) + ( f_.)*(x_)]), x_Symbol] :> Simp[-2*(b/f) Subst[Int[1/(b*c + a*d - d*x^2), x], x, b*(Cos[e + f*x]/Sqrt[a + b*Sin[e + f*x]])], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]
Int[((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])/(Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])), x_Symbol] :> Simp[(A *b - a*B)/(b*c - a*d) Int[1/Sqrt[a + b*Sin[e + f*x]], x], x] + Simp[(B*c - A*d)/(b*c - a*d) Int[Sqrt[a + b*Sin[e + f*x]]/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]
Time = 0.29 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.19
method | result | size |
default | \(-\frac {\left (1+\sin \left (f x +e \right )\right ) \sqrt {-a \left (-1+\sin \left (f x +e \right )\right )}\, \left (\sin \left (f x +e \right ) a^{2} \left (2 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a -\sin \left (f x +e \right ) a}\, \sqrt {2}}{2 \sqrt {a}}\right )-3 \,\operatorname {arctanh}\left (\frac {\sqrt {a -\sin \left (f x +e \right ) a}}{\sqrt {a}}\right )\right )+\sqrt {a -\sin \left (f x +e \right ) a}\, a^{\frac {3}{2}}\right )}{a^{\frac {7}{2}} \sin \left (f x +e \right ) \cos \left (f x +e \right ) \sqrt {a +\sin \left (f x +e \right ) a}\, f}\) | \(134\) |
Input:
int(cot(f*x+e)^2/(a+sin(f*x+e)*a)^(3/2),x,method=_RETURNVERBOSE)
Output:
-1/a^(7/2)*(1+sin(f*x+e))*(-a*(-1+sin(f*x+e)))^(1/2)*(sin(f*x+e)*a^2*(2*2^ (1/2)*arctanh(1/2*(a-sin(f*x+e)*a)^(1/2)*2^(1/2)/a^(1/2))-3*arctanh((a-sin (f*x+e)*a)^(1/2)/a^(1/2)))+(a-sin(f*x+e)*a)^(1/2)*a^(3/2))/sin(f*x+e)/cos( f*x+e)/(a+sin(f*x+e)*a)^(1/2)/f
Leaf count of result is larger than twice the leaf count of optimal. 421 vs. \(2 (96) = 192\).
Time = 0.11 (sec) , antiderivative size = 421, normalized size of antiderivative = 3.73 \[ \int \frac {\cot ^2(e+f x)}{(a+a \sin (e+f x))^{3/2}} \, dx=\frac {3 \, {\left (\cos \left (f x + e\right )^{2} - {\left (\cos \left (f x + e\right ) + 1\right )} \sin \left (f x + e\right ) - 1\right )} \sqrt {a} \log \left (\frac {a \cos \left (f x + e\right )^{3} - 7 \, a \cos \left (f x + e\right )^{2} + 4 \, {\left (\cos \left (f x + e\right )^{2} + {\left (\cos \left (f x + e\right ) + 3\right )} \sin \left (f x + e\right ) - 2 \, \cos \left (f x + e\right ) - 3\right )} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {a} - 9 \, a \cos \left (f x + e\right ) + {\left (a \cos \left (f x + e\right )^{2} + 8 \, a \cos \left (f x + e\right ) - a\right )} \sin \left (f x + e\right ) - a}{\cos \left (f x + e\right )^{3} + \cos \left (f x + e\right )^{2} + {\left (\cos \left (f x + e\right )^{2} - 1\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 1}\right ) + \frac {4 \, \sqrt {2} {\left (a \cos \left (f x + e\right )^{2} - {\left (a \cos \left (f x + e\right ) + a\right )} \sin \left (f x + e\right ) - a\right )} \log \left (-\frac {\cos \left (f x + e\right )^{2} - {\left (\cos \left (f x + e\right ) - 2\right )} \sin \left (f x + e\right ) - \frac {2 \, \sqrt {2} \sqrt {a \sin \left (f x + e\right ) + a} {\left (\cos \left (f x + e\right ) - \sin \left (f x + e\right ) + 1\right )}}{\sqrt {a}} + 3 \, \cos \left (f x + e\right ) + 2}{\cos \left (f x + e\right )^{2} - {\left (\cos \left (f x + e\right ) + 2\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 2}\right )}{\sqrt {a}} + 4 \, \sqrt {a \sin \left (f x + e\right ) + a} {\left (\cos \left (f x + e\right ) - \sin \left (f x + e\right ) + 1\right )}}{4 \, {\left (a^{2} f \cos \left (f x + e\right )^{2} - a^{2} f - {\left (a^{2} f \cos \left (f x + e\right ) + a^{2} f\right )} \sin \left (f x + e\right )\right )}} \] Input:
integrate(cot(f*x+e)^2/(a+a*sin(f*x+e))^(3/2),x, algorithm="fricas")
Output:
1/4*(3*(cos(f*x + e)^2 - (cos(f*x + e) + 1)*sin(f*x + e) - 1)*sqrt(a)*log( (a*cos(f*x + e)^3 - 7*a*cos(f*x + e)^2 + 4*(cos(f*x + e)^2 + (cos(f*x + e) + 3)*sin(f*x + e) - 2*cos(f*x + e) - 3)*sqrt(a*sin(f*x + e) + a)*sqrt(a) - 9*a*cos(f*x + e) + (a*cos(f*x + e)^2 + 8*a*cos(f*x + e) - a)*sin(f*x + e ) - a)/(cos(f*x + e)^3 + cos(f*x + e)^2 + (cos(f*x + e)^2 - 1)*sin(f*x + e ) - cos(f*x + e) - 1)) + 4*sqrt(2)*(a*cos(f*x + e)^2 - (a*cos(f*x + e) + a )*sin(f*x + e) - a)*log(-(cos(f*x + e)^2 - (cos(f*x + e) - 2)*sin(f*x + e) - 2*sqrt(2)*sqrt(a*sin(f*x + e) + a)*(cos(f*x + e) - sin(f*x + e) + 1)/sq rt(a) + 3*cos(f*x + e) + 2)/(cos(f*x + e)^2 - (cos(f*x + e) + 2)*sin(f*x + e) - cos(f*x + e) - 2))/sqrt(a) + 4*sqrt(a*sin(f*x + e) + a)*(cos(f*x + e ) - sin(f*x + e) + 1))/(a^2*f*cos(f*x + e)^2 - a^2*f - (a^2*f*cos(f*x + e) + a^2*f)*sin(f*x + e))
\[ \int \frac {\cot ^2(e+f x)}{(a+a \sin (e+f x))^{3/2}} \, dx=\int \frac {\cot ^{2}{\left (e + f x \right )}}{\left (a \left (\sin {\left (e + f x \right )} + 1\right )\right )^{\frac {3}{2}}}\, dx \] Input:
integrate(cot(f*x+e)**2/(a+a*sin(f*x+e))**(3/2),x)
Output:
Integral(cot(e + f*x)**2/(a*(sin(e + f*x) + 1))**(3/2), x)
\[ \int \frac {\cot ^2(e+f x)}{(a+a \sin (e+f x))^{3/2}} \, dx=\int { \frac {\cot \left (f x + e\right )^{2}}{{\left (a \sin \left (f x + e\right ) + a\right )}^{\frac {3}{2}}} \,d x } \] Input:
integrate(cot(f*x+e)^2/(a+a*sin(f*x+e))^(3/2),x, algorithm="maxima")
Output:
integrate(cot(f*x + e)^2/(a*sin(f*x + e) + a)^(3/2), x)
Leaf count of result is larger than twice the leaf count of optimal. 205 vs. \(2 (96) = 192\).
Time = 0.17 (sec) , antiderivative size = 205, normalized size of antiderivative = 1.81 \[ \int \frac {\cot ^2(e+f x)}{(a+a \sin (e+f x))^{3/2}} \, dx=\frac {\sqrt {2} \sqrt {a} {\left (\frac {3 \, \sqrt {2} \log \left (\frac {{\left | -2 \, \sqrt {2} + 4 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) \right |}}{{\left | 2 \, \sqrt {2} + 4 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) \right |}}\right )}{a^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} + \frac {4 \, \log \left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{a^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} - \frac {4 \, \log \left (-\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{a^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} - \frac {4 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{{\left (2 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 1\right )} a^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}\right )}}{4 \, f} \] Input:
integrate(cot(f*x+e)^2/(a+a*sin(f*x+e))^(3/2),x, algorithm="giac")
Output:
1/4*sqrt(2)*sqrt(a)*(3*sqrt(2)*log(abs(-2*sqrt(2) + 4*sin(-1/4*pi + 1/2*f* x + 1/2*e))/abs(2*sqrt(2) + 4*sin(-1/4*pi + 1/2*f*x + 1/2*e)))/(a^2*sgn(co s(-1/4*pi + 1/2*f*x + 1/2*e))) + 4*log(sin(-1/4*pi + 1/2*f*x + 1/2*e) + 1) /(a^2*sgn(cos(-1/4*pi + 1/2*f*x + 1/2*e))) - 4*log(-sin(-1/4*pi + 1/2*f*x + 1/2*e) + 1)/(a^2*sgn(cos(-1/4*pi + 1/2*f*x + 1/2*e))) - 4*sin(-1/4*pi + 1/2*f*x + 1/2*e)/((2*sin(-1/4*pi + 1/2*f*x + 1/2*e)^2 - 1)*a^2*sgn(cos(-1/ 4*pi + 1/2*f*x + 1/2*e))))/f
Timed out. \[ \int \frac {\cot ^2(e+f x)}{(a+a \sin (e+f x))^{3/2}} \, dx=\int \frac {{\mathrm {cot}\left (e+f\,x\right )}^2}{{\left (a+a\,\sin \left (e+f\,x\right )\right )}^{3/2}} \,d x \] Input:
int(cot(e + f*x)^2/(a + a*sin(e + f*x))^(3/2),x)
Output:
int(cot(e + f*x)^2/(a + a*sin(e + f*x))^(3/2), x)
\[ \int \frac {\cot ^2(e+f x)}{(a+a \sin (e+f x))^{3/2}} \, dx=\frac {\sqrt {a}\, \left (\int \frac {\sqrt {\sin \left (f x +e \right )+1}\, \cot \left (f x +e \right )^{2}}{\sin \left (f x +e \right )^{2}+2 \sin \left (f x +e \right )+1}d x \right )}{a^{2}} \] Input:
int(cot(f*x+e)^2/(a+a*sin(f*x+e))^(3/2),x)
Output:
(sqrt(a)*int((sqrt(sin(e + f*x) + 1)*cot(e + f*x)**2)/(sin(e + f*x)**2 + 2 *sin(e + f*x) + 1),x))/a**2