Integrand size = 23, antiderivative size = 84 \[ \int \frac {\csc (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^{3/2}} \, dx=-\frac {\text {arctanh}\left (\frac {\sqrt {a} \sec (e+f x)}{\sqrt {a-b+b \sec ^2(e+f x)}}\right )}{a^{3/2} f}-\frac {b \sec (e+f x)}{a (a-b) f \sqrt {a-b+b \sec ^2(e+f x)}} \] Output:
-arctanh(a^(1/2)*sec(f*x+e)/(a-b+b*sec(f*x+e)^2)^(1/2))/a^(3/2)/f-b*sec(f* x+e)/a/(a-b)/f/(a-b+b*sec(f*x+e)^2)^(1/2)
Leaf count is larger than twice the leaf count of optimal. \(505\) vs. \(2(84)=168\).
Time = 5.57 (sec) , antiderivative size = 505, normalized size of antiderivative = 6.01 \[ \int \frac {\csc (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^{3/2}} \, dx=\frac {\cos (e+f x) \sec ^6\left (\frac {1}{2} (e+f x)\right ) \left (2 (a-b) \text {arctanh}\left (\tan ^2\left (\frac {1}{2} (e+f x)\right )-\frac {\sqrt {4 b \tan ^2\left (\frac {1}{2} (e+f x)\right )+a \left (-1+\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )^2}}{\sqrt {a}}\right ) (a+b+(a-b) \cos (2 (e+f x)))+a^2 \log \left (a-2 b-a \tan ^2\left (\frac {1}{2} (e+f x)\right )+\sqrt {a} \sqrt {4 b \tan ^2\left (\frac {1}{2} (e+f x)\right )+a \left (-1+\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )^2}\right )-b^2 \log \left (a-2 b-a \tan ^2\left (\frac {1}{2} (e+f x)\right )+\sqrt {a} \sqrt {4 b \tan ^2\left (\frac {1}{2} (e+f x)\right )+a \left (-1+\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )^2}\right )+(a-b)^2 \cos (2 (e+f x)) \log \left (a-2 b-a \tan ^2\left (\frac {1}{2} (e+f x)\right )+\sqrt {a} \sqrt {4 b \tan ^2\left (\frac {1}{2} (e+f x)\right )+a \left (-1+\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )^2}\right )-\sqrt {2} \sqrt {a} b \sqrt {(a+b+(a-b) \cos (2 (e+f x))) \sec ^4\left (\frac {1}{2} (e+f x)\right )}-\sqrt {2} \sqrt {a} b \cos (e+f x) \sqrt {(a+b+(a-b) \cos (2 (e+f x))) \sec ^4\left (\frac {1}{2} (e+f x)\right )}\right ) \sqrt {(a+b+(a-b) \cos (2 (e+f x))) \sec ^2(e+f x)}}{2 a^{3/2} (a-b) f \left ((a+b+(a-b) \cos (2 (e+f x))) \sec ^4\left (\frac {1}{2} (e+f x)\right )\right )^{3/2}} \] Input:
Integrate[Csc[e + f*x]/(a + b*Tan[e + f*x]^2)^(3/2),x]
Output:
(Cos[e + f*x]*Sec[(e + f*x)/2]^6*(2*(a - b)*ArcTanh[Tan[(e + f*x)/2]^2 - S qrt[4*b*Tan[(e + f*x)/2]^2 + a*(-1 + Tan[(e + f*x)/2]^2)^2]/Sqrt[a]]*(a + b + (a - b)*Cos[2*(e + f*x)]) + a^2*Log[a - 2*b - a*Tan[(e + f*x)/2]^2 + S qrt[a]*Sqrt[4*b*Tan[(e + f*x)/2]^2 + a*(-1 + Tan[(e + f*x)/2]^2)^2]] - b^2 *Log[a - 2*b - a*Tan[(e + f*x)/2]^2 + Sqrt[a]*Sqrt[4*b*Tan[(e + f*x)/2]^2 + a*(-1 + Tan[(e + f*x)/2]^2)^2]] + (a - b)^2*Cos[2*(e + f*x)]*Log[a - 2*b - a*Tan[(e + f*x)/2]^2 + Sqrt[a]*Sqrt[4*b*Tan[(e + f*x)/2]^2 + a*(-1 + Ta n[(e + f*x)/2]^2)^2]] - Sqrt[2]*Sqrt[a]*b*Sqrt[(a + b + (a - b)*Cos[2*(e + f*x)])*Sec[(e + f*x)/2]^4] - Sqrt[2]*Sqrt[a]*b*Cos[e + f*x]*Sqrt[(a + b + (a - b)*Cos[2*(e + f*x)])*Sec[(e + f*x)/2]^4])*Sqrt[(a + b + (a - b)*Cos[ 2*(e + f*x)])*Sec[e + f*x]^2])/(2*a^(3/2)*(a - b)*f*((a + b + (a - b)*Cos[ 2*(e + f*x)])*Sec[(e + f*x)/2]^4)^(3/2))
Time = 0.45 (sec) , antiderivative size = 82, normalized size of antiderivative = 0.98, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3042, 4147, 25, 296, 291, 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 {\csc (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^{3/2}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sin (e+f x) \left (a+b \tan (e+f x)^2\right )^{3/2}}dx\) |
\(\Big \downarrow \) 4147 |
\(\displaystyle \frac {\int -\frac {1}{\left (1-\sec ^2(e+f x)\right ) \left (b \sec ^2(e+f x)+a-b\right )^{3/2}}d\sec (e+f x)}{f}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {\int \frac {1}{\left (1-\sec ^2(e+f x)\right ) \left (b \sec ^2(e+f x)+a-b\right )^{3/2}}d\sec (e+f x)}{f}\) |
\(\Big \downarrow \) 296 |
\(\displaystyle \frac {-\frac {\int \frac {1}{\left (1-\sec ^2(e+f x)\right ) \sqrt {b \sec ^2(e+f x)+a-b}}d\sec (e+f x)}{a}-\frac {b \sec (e+f x)}{a (a-b) \sqrt {a+b \sec ^2(e+f x)-b}}}{f}\) |
\(\Big \downarrow \) 291 |
\(\displaystyle \frac {-\frac {\int \frac {1}{1-\frac {a \sec ^2(e+f x)}{b \sec ^2(e+f x)+a-b}}d\frac {\sec (e+f x)}{\sqrt {b \sec ^2(e+f x)+a-b}}}{a}-\frac {b \sec (e+f x)}{a (a-b) \sqrt {a+b \sec ^2(e+f x)-b}}}{f}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {-\frac {\text {arctanh}\left (\frac {\sqrt {a} \sec (e+f x)}{\sqrt {a+b \sec ^2(e+f x)-b}}\right )}{a^{3/2}}-\frac {b \sec (e+f x)}{a (a-b) \sqrt {a+b \sec ^2(e+f x)-b}}}{f}\) |
Input:
Int[Csc[e + f*x]/(a + b*Tan[e + f*x]^2)^(3/2),x]
Output:
(-(ArcTanh[(Sqrt[a]*Sec[e + f*x])/Sqrt[a - b + b*Sec[e + f*x]^2]]/a^(3/2)) - (b*Sec[e + f*x])/(a*(a - b)*Sqrt[a - b + b*Sec[e + f*x]^2]))/f
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_.)*(x_)^2]*((c_) + (d_.)*(x_)^2)), x_Symbol] :> Subst [Int[1/(c - (b*c - a*d)*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Sim p[(-b)*x*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q + 1)/(2*a*(p + 1)*(b*c - a*d)) ), x] + Simp[(b*c + 2*(p + 1)*(b*c - a*d))/(2*a*(p + 1)*(b*c - a*d)) Int[ (a + b*x^2)^(p + 1)*(c + d*x^2)^q, x], x] /; FreeQ[{a, b, c, d, q}, x] && N eQ[b*c - a*d, 0] && EqQ[2*(p + q + 2) + 1, 0] && (LtQ[p, -1] || !LtQ[q, -1 ]) && NeQ[p, -1]
Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^ (p_.), x_Symbol] :> With[{ff = FreeFactors[Sec[e + f*x], x]}, Simp[1/(f*ff^ m) Subst[Int[(-1 + ff^2*x^2)^((m - 1)/2)*((a - b + b*ff^2*x^2)^p/x^(m + 1 )), x], x, Sec[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[( m - 1)/2]
Leaf count of result is larger than twice the leaf count of optimal. \(751\) vs. \(2(76)=152\).
Time = 5.94 (sec) , antiderivative size = 752, normalized size of antiderivative = 8.95
method | result | size |
default | \(\frac {\left (a \left (1-\cos \left (f x +e \right )\right )^{4} \csc \left (f x +e \right )^{4}-2 a \left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}+4 \left (1-\cos \left (f x +e \right )\right )^{2} b \csc \left (f x +e \right )^{2}+a \right ) \left (2 \left (1-\cos \left (f x +e \right )\right )^{2} b \,a^{\frac {3}{2}} \csc \left (f x +e \right )^{2}+2 \ln \left (\frac {2 \sqrt {a}\, \sqrt {\frac {a \cos \left (f x +e \right )^{2}+b \sin \left (f x +e \right )^{2}}{\left (\cos \left (f x +e \right )+1\right )^{2}}}\, \cos \left (f x +e \right )+2 \sqrt {\frac {a \cos \left (f x +e \right )^{2}+b \sin \left (f x +e \right )^{2}}{\left (\cos \left (f x +e \right )+1\right )^{2}}}\, \sqrt {a}-2 a \cos \left (f x +e \right )+2 \cos \left (f x +e \right ) b +2 b}{\sqrt {a}\, \left (\cos \left (f x +e \right )+1\right )}\right ) a^{2} \sqrt {\frac {a \cos \left (f x +e \right )^{2}+b \sin \left (f x +e \right )^{2}}{\left (\cos \left (f x +e \right )+1\right )^{2}}}-2 \ln \left (\frac {2 \sqrt {a}\, \sqrt {\frac {a \cos \left (f x +e \right )^{2}+b \sin \left (f x +e \right )^{2}}{\left (\cos \left (f x +e \right )+1\right )^{2}}}\, \cos \left (f x +e \right )+2 \sqrt {\frac {a \cos \left (f x +e \right )^{2}+b \sin \left (f x +e \right )^{2}}{\left (\cos \left (f x +e \right )+1\right )^{2}}}\, \sqrt {a}-2 a \cos \left (f x +e \right )+2 \cos \left (f x +e \right ) b +2 b}{\sqrt {a}\, \left (\cos \left (f x +e \right )+1\right )}\right ) a \sqrt {\frac {a \cos \left (f x +e \right )^{2}+b \sin \left (f x +e \right )^{2}}{\left (\cos \left (f x +e \right )+1\right )^{2}}}\, b +2 \ln \left (\frac {-2 a \left (1-\cos \left (f x +e \right )\right )^{2}+4 \left (1-\cos \left (f x +e \right )\right )^{2} b +4 \sqrt {\frac {a \cos \left (f x +e \right )^{2}+b \sin \left (f x +e \right )^{2}}{\left (\cos \left (f x +e \right )+1\right )^{2}}}\, \sqrt {a}\, \sin \left (f x +e \right )^{2}+2 a \sin \left (f x +e \right )^{2}}{\left (1-\cos \left (f x +e \right )\right )^{2}}\right ) a^{2} \sqrt {\frac {a \cos \left (f x +e \right )^{2}+b \sin \left (f x +e \right )^{2}}{\left (\cos \left (f x +e \right )+1\right )^{2}}}-2 \ln \left (\frac {-2 a \left (1-\cos \left (f x +e \right )\right )^{2}+4 \left (1-\cos \left (f x +e \right )\right )^{2} b +4 \sqrt {\frac {a \cos \left (f x +e \right )^{2}+b \sin \left (f x +e \right )^{2}}{\left (\cos \left (f x +e \right )+1\right )^{2}}}\, \sqrt {a}\, \sin \left (f x +e \right )^{2}+2 a \sin \left (f x +e \right )^{2}}{\left (1-\cos \left (f x +e \right )\right )^{2}}\right ) a \sqrt {\frac {a \cos \left (f x +e \right )^{2}+b \sin \left (f x +e \right )^{2}}{\left (\cos \left (f x +e \right )+1\right )^{2}}}\, b +2 b \,a^{\frac {3}{2}}\right )}{2 f \,a^{\frac {5}{2}} \left (a -b \right ) \left (a +b \tan \left (f x +e \right )^{2}\right )^{\frac {3}{2}} \left (\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1\right )^{3}}\) | \(752\) |
Input:
int(csc(f*x+e)/(a+b*tan(f*x+e)^2)^(3/2),x,method=_RETURNVERBOSE)
Output:
1/2/f/a^(5/2)/(a-b)*(a*(1-cos(f*x+e))^4*csc(f*x+e)^4-2*a*(1-cos(f*x+e))^2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e)^2)^(3/2)/((1-c os(f*x+e))^2*csc(f*x+e)^2-1)^3
Leaf count of result is larger than twice the leaf count of optimal. 179 vs. \(2 (76) = 152\).
Time = 0.21 (sec) , antiderivative size = 370, normalized size of antiderivative = 4.40 \[ \int \frac {\csc (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^{3/2}} \, dx=\left [-\frac {2 \, a b \sqrt {\frac {{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right ) - {\left ({\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{2} + a b - b^{2}\right )} \sqrt {a} \log \left (-\frac {2 \, {\left ({\left (a - b\right )} \cos \left (f x + e\right )^{2} - 2 \, \sqrt {a} \sqrt {\frac {{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right ) + a + b\right )}}{\cos \left (f x + e\right )^{2} - 1}\right )}{2 \, {\left ({\left (a^{4} - 2 \, a^{3} b + a^{2} b^{2}\right )} f \cos \left (f x + e\right )^{2} + {\left (a^{3} b - a^{2} b^{2}\right )} f\right )}}, -\frac {a b \sqrt {\frac {{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right ) + {\left ({\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{2} + a b - b^{2}\right )} \sqrt {-a} \arctan \left (-\frac {\sqrt {-a} \sqrt {\frac {{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right )}{{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}\right )}{{\left (a^{4} - 2 \, a^{3} b + a^{2} b^{2}\right )} f \cos \left (f x + e\right )^{2} + {\left (a^{3} b - a^{2} b^{2}\right )} f}\right ] \] Input:
integrate(csc(f*x+e)/(a+b*tan(f*x+e)^2)^(3/2),x, algorithm="fricas")
Output:
[-1/2*(2*a*b*sqrt(((a - b)*cos(f*x + e)^2 + b)/cos(f*x + e)^2)*cos(f*x + e ) - ((a^2 - 2*a*b + b^2)*cos(f*x + e)^2 + a*b - b^2)*sqrt(a)*log(-2*((a - b)*cos(f*x + e)^2 - 2*sqrt(a)*sqrt(((a - b)*cos(f*x + e)^2 + b)/cos(f*x + e)^2)*cos(f*x + e) + a + b)/(cos(f*x + e)^2 - 1)))/((a^4 - 2*a^3*b + a^2*b ^2)*f*cos(f*x + e)^2 + (a^3*b - a^2*b^2)*f), -(a*b*sqrt(((a - b)*cos(f*x + e)^2 + b)/cos(f*x + e)^2)*cos(f*x + e) + ((a^2 - 2*a*b + b^2)*cos(f*x + e )^2 + a*b - b^2)*sqrt(-a)*arctan(-sqrt(-a)*sqrt(((a - b)*cos(f*x + e)^2 + b)/cos(f*x + e)^2)*cos(f*x + e)/((a - b)*cos(f*x + e)^2 + b)))/((a^4 - 2*a ^3*b + a^2*b^2)*f*cos(f*x + e)^2 + (a^3*b - a^2*b^2)*f)]
\[ \int \frac {\csc (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^{3/2}} \, dx=\int \frac {\csc {\left (e + f x \right )}}{\left (a + b \tan ^{2}{\left (e + f x \right )}\right )^{\frac {3}{2}}}\, dx \] Input:
integrate(csc(f*x+e)/(a+b*tan(f*x+e)**2)**(3/2),x)
Output:
Integral(csc(e + f*x)/(a + b*tan(e + f*x)**2)**(3/2), x)
\[ \int \frac {\csc (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^{3/2}} \, dx=\int { \frac {\csc \left (f x + e\right )}{{\left (b \tan \left (f x + e\right )^{2} + a\right )}^{\frac {3}{2}}} \,d x } \] Input:
integrate(csc(f*x+e)/(a+b*tan(f*x+e)^2)^(3/2),x, algorithm="maxima")
Output:
integrate(csc(f*x + e)/(b*tan(f*x + e)^2 + a)^(3/2), x)
Exception generated. \[ \int \frac {\csc (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^{3/2}} \, dx=\text {Exception raised: TypeError} \] Input:
integrate(csc(f*x+e)/(a+b*tan(f*x+e)^2)^(3/2),x, algorithm="giac")
Output:
Exception raised: TypeError >> an error occurred running a Giac command:IN PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Degree mismatch inside factorisatio n over extensionNot implemented, e.g. for multivariate mod/approx polynomi alsError:
Timed out. \[ \int \frac {\csc (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^{3/2}} \, dx=\int \frac {1}{\sin \left (e+f\,x\right )\,{\left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a\right )}^{3/2}} \,d x \] Input:
int(1/(sin(e + f*x)*(a + b*tan(e + f*x)^2)^(3/2)),x)
Output:
int(1/(sin(e + f*x)*(a + b*tan(e + f*x)^2)^(3/2)), x)
\[ \int \frac {\csc (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^{3/2}} \, dx=\int \frac {\sqrt {\tan \left (f x +e \right )^{2} b +a}\, \csc \left (f x +e \right )}{\tan \left (f x +e \right )^{4} b^{2}+2 \tan \left (f x +e \right )^{2} a b +a^{2}}d x \] Input:
int(csc(f*x+e)/(a+b*tan(f*x+e)^2)^(3/2),x)
Output:
int((sqrt(tan(e + f*x)**2*b + a)*csc(e + f*x))/(tan(e + f*x)**4*b**2 + 2*t an(e + f*x)**2*a*b + a**2),x)