Integrand size = 17, antiderivative size = 120 \[ \int \frac {\csc ^2(x)}{a+b \cot (x)+c \csc (x)} \, dx=-\frac {2 a c \text {arctanh}\left (\frac {a-(b-c) \tan \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2-c^2}}\right )}{\left (b^2-c^2\right ) \sqrt {a^2+b^2-c^2}}+\frac {\log \left (\tan \left (\frac {x}{2}\right )\right )}{b+c}-\frac {b \log \left (b+c+2 a \tan \left (\frac {x}{2}\right )-(b-c) \tan ^2\left (\frac {x}{2}\right )\right )}{b^2-c^2} \] Output:
-2*a*c*arctanh((a-(b-c)*tan(1/2*x))/(a^2+b^2-c^2)^(1/2))/(b^2-c^2)/(a^2+b^ 2-c^2)^(1/2)+ln(tan(1/2*x))/(b+c)-b*ln(b+c+2*a*tan(1/2*x)-(b-c)*tan(1/2*x) ^2)/(b^2-c^2)
Time = 5.23 (sec) , antiderivative size = 104, normalized size of antiderivative = 0.87 \[ \int \frac {\csc ^2(x)}{a+b \cot (x)+c \csc (x)} \, dx=\frac {\frac {2 a c \text {arctanh}\left (\frac {a+(-b+c) \tan \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2-c^2}}\right )}{\sqrt {a^2+b^2-c^2}}-(b+c) \log \left (\cos \left (\frac {x}{2}\right )\right )+(-b+c) \log \left (\sin \left (\frac {x}{2}\right )\right )+b \log (c+b \cos (x)+a \sin (x))}{(-b+c) (b+c)} \] Input:
Integrate[Csc[x]^2/(a + b*Cot[x] + c*Csc[x]),x]
Output:
((2*a*c*ArcTanh[(a + (-b + c)*Tan[x/2])/Sqrt[a^2 + b^2 - c^2]])/Sqrt[a^2 + b^2 - c^2] - (b + c)*Log[Cos[x/2]] + (-b + c)*Log[Sin[x/2]] + b*Log[c + b *Cos[x] + a*Sin[x]])/((-b + c)*(b + c))
Time = 0.64 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.412, Rules used = {3042, 4897, 3042, 4902, 27, 2159, 2009}
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 ^2(x)}{a+b \cot (x)+c \csc (x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\csc (x)^2}{a+b \cot (x)+c \csc (x)}dx\) |
\(\Big \downarrow \) 4897 |
\(\displaystyle \int \frac {\csc (x)}{a \sin (x)+b \cos (x)+c}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\csc (x)}{a \sin (x)+b \cos (x)+c}dx\) |
\(\Big \downarrow \) 4902 |
\(\displaystyle 2 \int \frac {\cot \left (\frac {x}{2}\right ) \left (\tan ^2\left (\frac {x}{2}\right )+1\right )}{2 \left (-\left ((b-c) \tan ^2\left (\frac {x}{2}\right )\right )+2 a \tan \left (\frac {x}{2}\right )+b+c\right )}d\tan \left (\frac {x}{2}\right )\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \int \frac {\left (\tan ^2\left (\frac {x}{2}\right )+1\right ) \cot \left (\frac {x}{2}\right )}{2 a \tan \left (\frac {x}{2}\right )-\left ((b-c) \tan ^2\left (\frac {x}{2}\right )\right )+b+c}d\tan \left (\frac {x}{2}\right )\) |
\(\Big \downarrow \) 2159 |
\(\displaystyle \int \left (\frac {2 \left (b \tan \left (\frac {x}{2}\right )-a\right )}{(b+c) \left (2 a \tan \left (\frac {x}{2}\right )-\left ((b-c) \tan ^2\left (\frac {x}{2}\right )\right )+b+c\right )}+\frac {\cot \left (\frac {x}{2}\right )}{b+c}\right )d\tan \left (\frac {x}{2}\right )\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {2 a c \text {arctanh}\left (\frac {a-(b-c) \tan \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2-c^2}}\right )}{\left (b^2-c^2\right ) \sqrt {a^2+b^2-c^2}}-\frac {b \log \left (2 a \tan \left (\frac {x}{2}\right )-\left ((b-c) \tan ^2\left (\frac {x}{2}\right )\right )+b+c\right )}{b^2-c^2}+\frac {\log \left (\tan \left (\frac {x}{2}\right )\right )}{b+c}\) |
Input:
Int[Csc[x]^2/(a + b*Cot[x] + c*Csc[x]),x]
Output:
(-2*a*c*ArcTanh[(a - (b - c)*Tan[x/2])/Sqrt[a^2 + b^2 - c^2]])/((b^2 - c^2 )*Sqrt[a^2 + b^2 - c^2]) + Log[Tan[x/2]]/(b + c) - (b*Log[b + c + 2*a*Tan[ x/2] - (b - c)*Tan[x/2]^2])/(b^2 - c^2)
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p _.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*Pq*(a + b*x + c*x^2)^p, x ], x] /; FreeQ[{a, b, c, d, e, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]
Int[u_, x_Symbol] :> With[{w = Block[{$ShowSteps = False, $StepCounter = Nu ll}, Int[SubstFor[1/(1 + FreeFactors[Tan[FunctionOfTrig[u, x]/2], x]^2*x^2) , Tan[FunctionOfTrig[u, x]/2]/FreeFactors[Tan[FunctionOfTrig[u, x]/2], x], u, x], x]]}, Module[{v = FunctionOfTrig[u, x], d}, Simp[d = FreeFactors[Tan [v/2], x]; 2*(d/Coefficient[v, x, 1]) Subst[Int[SubstFor[1/(1 + d^2*x^2), Tan[v/2]/d, u, x], x], x, Tan[v/2]/d], x]] /; CalculusFreeQ[w, x]] /; Inve rseFunctionFreeQ[u, x] && !FalseQ[FunctionOfTrig[u, x]]
Time = 0.82 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.02
method | result | size |
default | \(\frac {\ln \left (\tan \left (\frac {x}{2}\right )\right )}{b +c}+\frac {\frac {b \ln \left (-b \tan \left (\frac {x}{2}\right )^{2}+c \tan \left (\frac {x}{2}\right )^{2}+2 a \tan \left (\frac {x}{2}\right )+b +c \right )}{-b +c}+\frac {\left (-2 a -\frac {2 b a}{-b +c}\right ) \arctan \left (\frac {2 \left (-b +c \right ) \tan \left (\frac {x}{2}\right )+2 a}{2 \sqrt {-a^{2}-b^{2}+c^{2}}}\right )}{\sqrt {-a^{2}-b^{2}+c^{2}}}}{b +c}\) | \(123\) |
risch | \(\text {Expression too large to display}\) | \(1342\) |
Input:
int(csc(x)^2/(a+b*cot(x)+c*csc(x)),x,method=_RETURNVERBOSE)
Output:
ln(tan(1/2*x))/(b+c)+1/(b+c)*(b/(-b+c)*ln(-b*tan(1/2*x)^2+c*tan(1/2*x)^2+2 *a*tan(1/2*x)+b+c)+(-2*a-2*b*a/(-b+c))/(-a^2-b^2+c^2)^(1/2)*arctan(1/2*(2* (-b+c)*tan(1/2*x)+2*a)/(-a^2-b^2+c^2)^(1/2)))
Leaf count of result is larger than twice the leaf count of optimal. 260 vs. \(2 (110) = 220\).
Time = 1.45 (sec) , antiderivative size = 669, normalized size of antiderivative = 5.58 \[ \int \frac {\csc ^2(x)}{a+b \cot (x)+c \csc (x)} \, dx =\text {Too large to display} \] Input:
integrate(csc(x)^2/(a+b*cot(x)+c*csc(x)),x, algorithm="fricas")
Output:
[-1/2*(sqrt(a^2 + b^2 - c^2)*a*c*log((a^4 + 3*a^2*b^2 + 2*b^4 + (a^2 - b^2 )*c^2 + 2*(a^2*b + b^3)*c*cos(x) + (a^4 - b^4 - 2*(a^2 - b^2)*c^2)*cos(x)^ 2 + 2*((a^3 + a*b^2)*c - (a^3*b + a*b^3 - 2*a*b*c^2)*cos(x))*sin(x) + 2*(2 *a*b*c*cos(x)^2 - a*b*c + (a^3 + a*b^2)*cos(x) - (a^2*b + b^3 - (a^2 - b^2 )*c*cos(x))*sin(x))*sqrt(a^2 + b^2 - c^2))/(2*b*c*cos(x) - (a^2 - b^2)*cos (x)^2 + a^2 + c^2 + 2*(a*b*cos(x) + a*c)*sin(x))) + (a^2*b + b^3 - b*c^2)* log(2*b*c*cos(x) - (a^2 - b^2)*cos(x)^2 + a^2 + c^2 + 2*(a*b*cos(x) + a*c) *sin(x)) - (a^2*b + b^3 - b*c^2 - c^3 + (a^2 + b^2)*c)*log(1/2*cos(x) + 1/ 2) - (a^2*b + b^3 - b*c^2 + c^3 - (a^2 + b^2)*c)*log(-1/2*cos(x) + 1/2))/( a^2*b^2 + b^4 + c^4 - (a^2 + 2*b^2)*c^2), 1/2*(2*sqrt(-a^2 - b^2 + c^2)*a* c*arctan((b*c*cos(x) + a*c*sin(x) + a^2 + b^2)*sqrt(-a^2 - b^2 + c^2)/((a^ 3 + a*b^2 - a*c^2)*cos(x) - (a^2*b + b^3 - b*c^2)*sin(x))) - (a^2*b + b^3 - b*c^2)*log(2*b*c*cos(x) - (a^2 - b^2)*cos(x)^2 + a^2 + c^2 + 2*(a*b*cos( x) + a*c)*sin(x)) + (a^2*b + b^3 - b*c^2 - c^3 + (a^2 + b^2)*c)*log(1/2*co s(x) + 1/2) + (a^2*b + b^3 - b*c^2 + c^3 - (a^2 + b^2)*c)*log(-1/2*cos(x) + 1/2))/(a^2*b^2 + b^4 + c^4 - (a^2 + 2*b^2)*c^2)]
\[ \int \frac {\csc ^2(x)}{a+b \cot (x)+c \csc (x)} \, dx=\int \frac {\csc ^{2}{\left (x \right )}}{a + b \cot {\left (x \right )} + c \csc {\left (x \right )}}\, dx \] Input:
integrate(csc(x)**2/(a+b*cot(x)+c*csc(x)),x)
Output:
Integral(csc(x)**2/(a + b*cot(x) + c*csc(x)), x)
Exception generated. \[ \int \frac {\csc ^2(x)}{a+b \cot (x)+c \csc (x)} \, dx=\text {Exception raised: ValueError} \] Input:
integrate(csc(x)^2/(a+b*cot(x)+c*csc(x)),x, algorithm="maxima")
Output:
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(c^2-b^2-a^2>0)', see `assume?` f or more de
Time = 0.31 (sec) , antiderivative size = 142, normalized size of antiderivative = 1.18 \[ \int \frac {\csc ^2(x)}{a+b \cot (x)+c \csc (x)} \, dx=\frac {2 \, {\left (\pi \left \lfloor \frac {x}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (-2 \, b + 2 \, c\right ) + \arctan \left (-\frac {b \tan \left (\frac {1}{2} \, x\right ) - c \tan \left (\frac {1}{2} \, x\right ) - a}{\sqrt {-a^{2} - b^{2} + c^{2}}}\right )\right )} a c}{\sqrt {-a^{2} - b^{2} + c^{2}} {\left (b^{2} - c^{2}\right )}} - \frac {b \log \left (-b \tan \left (\frac {1}{2} \, x\right )^{2} + c \tan \left (\frac {1}{2} \, x\right )^{2} + 2 \, a \tan \left (\frac {1}{2} \, x\right ) + b + c\right )}{b^{2} - c^{2}} + \frac {\log \left ({\left | \tan \left (\frac {1}{2} \, x\right ) \right |}\right )}{b + c} \] Input:
integrate(csc(x)^2/(a+b*cot(x)+c*csc(x)),x, algorithm="giac")
Output:
2*(pi*floor(1/2*x/pi + 1/2)*sgn(-2*b + 2*c) + arctan(-(b*tan(1/2*x) - c*ta n(1/2*x) - a)/sqrt(-a^2 - b^2 + c^2)))*a*c/(sqrt(-a^2 - b^2 + c^2)*(b^2 - c^2)) - b*log(-b*tan(1/2*x)^2 + c*tan(1/2*x)^2 + 2*a*tan(1/2*x) + b + c)/( b^2 - c^2) + log(abs(tan(1/2*x)))/(b + c)
Time = 22.35 (sec) , antiderivative size = 531, normalized size of antiderivative = 4.42 \[ \int \frac {\csc ^2(x)}{a+b \cot (x)+c \csc (x)} \, dx=\frac {\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )}{b+c}-\frac {\ln \left (2\,a-2\,b\,\mathrm {tan}\left (\frac {x}{2}\right )-\frac {\left (\mathrm {tan}\left (\frac {x}{2}\right )\,\left (-8\,a^2-8\,b^2+6\,b\,c+2\,c^2\right )-4\,a\,c+\frac {2\,\left (b-c\right )\,\left (a^2\,b-b\,c^2+b^3+a\,c\,\sqrt {a^2+b^2-c^2}\right )\,\left (4\,\mathrm {tan}\left (\frac {x}{2}\right )\,a^2+a\,b+a\,c+3\,\mathrm {tan}\left (\frac {x}{2}\right )\,b^2-3\,\mathrm {tan}\left (\frac {x}{2}\right )\,c^2\right )}{\left (b^2-c^2\right )\,\left (a^2+b^2-c^2\right )}\right )\,\left (a^2\,b-b\,c^2+b^3+a\,c\,\sqrt {a^2+b^2-c^2}\right )}{\left (b^2-c^2\right )\,\left (a^2+b^2-c^2\right )}\right )\,\left (b\,\left (a^2-c^2\right )+b^3+a\,c\,\sqrt {a^2+b^2-c^2}\right )}{\left (b^2-c^2\right )\,\left (a^2+b^2-c^2\right )}-\frac {\ln \left (2\,a-2\,b\,\mathrm {tan}\left (\frac {x}{2}\right )-\frac {\left (\mathrm {tan}\left (\frac {x}{2}\right )\,\left (-8\,a^2-8\,b^2+6\,b\,c+2\,c^2\right )-4\,a\,c+\frac {2\,\left (b-c\right )\,\left (a^2\,b-b\,c^2+b^3-a\,c\,\sqrt {a^2+b^2-c^2}\right )\,\left (4\,\mathrm {tan}\left (\frac {x}{2}\right )\,a^2+a\,b+a\,c+3\,\mathrm {tan}\left (\frac {x}{2}\right )\,b^2-3\,\mathrm {tan}\left (\frac {x}{2}\right )\,c^2\right )}{\left (b^2-c^2\right )\,\left (a^2+b^2-c^2\right )}\right )\,\left (a^2\,b-b\,c^2+b^3-a\,c\,\sqrt {a^2+b^2-c^2}\right )}{\left (b^2-c^2\right )\,\left (a^2+b^2-c^2\right )}\right )\,\left (b\,\left (a^2-c^2\right )+b^3-a\,c\,\sqrt {a^2+b^2-c^2}\right )}{\left (b^2-c^2\right )\,\left (a^2+b^2-c^2\right )} \] Input:
int(1/(sin(x)^2*(a + c/sin(x) + b*cot(x))),x)
Output:
log(tan(x/2))/(b + c) - (log(2*a - 2*b*tan(x/2) - ((tan(x/2)*(6*b*c - 8*a^ 2 - 8*b^2 + 2*c^2) - 4*a*c + (2*(b - c)*(a^2*b - b*c^2 + b^3 + a*c*(a^2 + b^2 - c^2)^(1/2))*(a*b + a*c + 4*a^2*tan(x/2) + 3*b^2*tan(x/2) - 3*c^2*tan (x/2)))/((b^2 - c^2)*(a^2 + b^2 - c^2)))*(a^2*b - b*c^2 + b^3 + a*c*(a^2 + b^2 - c^2)^(1/2)))/((b^2 - c^2)*(a^2 + b^2 - c^2)))*(b*(a^2 - c^2) + b^3 + a*c*(a^2 + b^2 - c^2)^(1/2)))/((b^2 - c^2)*(a^2 + b^2 - c^2)) - (log(2*a - 2*b*tan(x/2) - ((tan(x/2)*(6*b*c - 8*a^2 - 8*b^2 + 2*c^2) - 4*a*c + (2* (b - c)*(a^2*b - b*c^2 + b^3 - a*c*(a^2 + b^2 - c^2)^(1/2))*(a*b + a*c + 4 *a^2*tan(x/2) + 3*b^2*tan(x/2) - 3*c^2*tan(x/2)))/((b^2 - c^2)*(a^2 + b^2 - c^2)))*(a^2*b - b*c^2 + b^3 - a*c*(a^2 + b^2 - c^2)^(1/2)))/((b^2 - c^2) *(a^2 + b^2 - c^2)))*(b*(a^2 - c^2) + b^3 - a*c*(a^2 + b^2 - c^2)^(1/2)))/ ((b^2 - c^2)*(a^2 + b^2 - c^2))
Time = 0.15 (sec) , antiderivative size = 262, normalized size of antiderivative = 2.18 \[ \int \frac {\csc ^2(x)}{a+b \cot (x)+c \csc (x)} \, dx=\frac {2 \sqrt {-a^{2}-b^{2}+c^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {x}{2}\right ) b -\tan \left (\frac {x}{2}\right ) c -a}{\sqrt {-a^{2}-b^{2}+c^{2}}}\right ) a c -\mathrm {log}\left (\tan \left (\frac {x}{2}\right )^{2} b -\tan \left (\frac {x}{2}\right )^{2} c -2 \tan \left (\frac {x}{2}\right ) a -b -c \right ) a^{2} b -\mathrm {log}\left (\tan \left (\frac {x}{2}\right )^{2} b -\tan \left (\frac {x}{2}\right )^{2} c -2 \tan \left (\frac {x}{2}\right ) a -b -c \right ) b^{3}+\mathrm {log}\left (\tan \left (\frac {x}{2}\right )^{2} b -\tan \left (\frac {x}{2}\right )^{2} c -2 \tan \left (\frac {x}{2}\right ) a -b -c \right ) b \,c^{2}+\mathrm {log}\left (\tan \left (\frac {x}{2}\right )\right ) a^{2} b -\mathrm {log}\left (\tan \left (\frac {x}{2}\right )\right ) a^{2} c +\mathrm {log}\left (\tan \left (\frac {x}{2}\right )\right ) b^{3}-\mathrm {log}\left (\tan \left (\frac {x}{2}\right )\right ) b^{2} c -\mathrm {log}\left (\tan \left (\frac {x}{2}\right )\right ) b \,c^{2}+\mathrm {log}\left (\tan \left (\frac {x}{2}\right )\right ) c^{3}}{a^{2} b^{2}-a^{2} c^{2}+b^{4}-2 b^{2} c^{2}+c^{4}} \] Input:
int(csc(x)^2/(a+b*cot(x)+c*csc(x)),x)
Output:
(2*sqrt( - a**2 - b**2 + c**2)*atan((tan(x/2)*b - tan(x/2)*c - a)/sqrt( - a**2 - b**2 + c**2))*a*c - log(tan(x/2)**2*b - tan(x/2)**2*c - 2*tan(x/2)* a - b - c)*a**2*b - log(tan(x/2)**2*b - tan(x/2)**2*c - 2*tan(x/2)*a - b - c)*b**3 + log(tan(x/2)**2*b - tan(x/2)**2*c - 2*tan(x/2)*a - b - c)*b*c** 2 + log(tan(x/2))*a**2*b - log(tan(x/2))*a**2*c + log(tan(x/2))*b**3 - log (tan(x/2))*b**2*c - log(tan(x/2))*b*c**2 + log(tan(x/2))*c**3)/(a**2*b**2 - a**2*c**2 + b**4 - 2*b**2*c**2 + c**4)