Primitive of x squared by Arccosecant of x over a

Theorem

$\displaystyle \int x^2 \operatorname{arccsc} \frac x a \ \mathrm d x = \begin{cases} \displaystyle \frac {x^3} 3 \operatorname{arccsc} \frac x a - \frac {a x \sqrt{x^2 - a^2} } 6 - \frac {a^3} 6 \ln \left({x + \sqrt {x^2 - a^2} }\right) + C & : 0 < \operatorname{arccsc} \dfrac x a < \dfrac \pi 2 \\ \displaystyle \frac {x^3} 3 \operatorname{arccsc} \frac x a + \frac {a x \sqrt{x^2 - a^2} } 6 + \frac {a^3} 6 \ln \left({x + \sqrt {x^2 - a^2} }\right) + C & : -\dfrac \pi 2 < \operatorname{arccsc} \dfrac x a < 0 \\ \end{cases}$

Proof

With a view to expressing the primitive in the form:

$\displaystyle \int u \frac {\mathrm d v}{\mathrm d x} \ \mathrm d x = u v - \int v \frac {\mathrm d u}{\mathrm d x} \ \mathrm d x$

let:

 $\displaystyle u$ $=$ $\displaystyle \operatorname{arccsc} \frac x a$ $\displaystyle \implies \ \$ $\displaystyle \frac {\mathrm d u} {\mathrm d x}$ $=$ $\displaystyle \begin{cases} \dfrac {-a} {x \sqrt {x^2 - a^2} } & : 0 < \operatorname{arccsc} \dfrac x a < \dfrac \pi 2 \\ \dfrac a {x \sqrt {x^2 - a^2} } & : -\dfrac \pi 2 < \operatorname{arccsc} \dfrac x a < 0 \\ \end{cases}$ Derivative of $\operatorname{arccsc} \dfrac x a$

and let:

 $\displaystyle \frac {\mathrm d v} {\mathrm d x}$ $=$ $\displaystyle x^2$ $\displaystyle \implies \ \$ $\displaystyle v$ $=$ $\displaystyle \frac {x^3} 3$ Primitive of Power

First let $\operatorname{arccsc} \dfrac x a$ be in the interval $\left({0 \,.\,.\,\dfrac \pi 2}\right)$.

Then:

 $\displaystyle \int x^2 \operatorname{arccsc} \frac x a \ \mathrm d x$ $=$ $\displaystyle \frac {x^3} 3 \operatorname{arccsc} \frac x a - \int \frac {x^3} 3 \left({\frac {-a} {x \sqrt {x^2 - a^2} } }\right) \ \mathrm d x + C$ Integration by Parts $\displaystyle$ $=$ $\displaystyle \frac {x^3} 3 \operatorname{arccsc} \frac x a + \frac a 3 \int \frac {x^2 \ \mathrm d x} {\sqrt {x^2 - a^2} } + C$ Primitive of Constant Multiple of Function $\displaystyle$ $=$ $\displaystyle \frac {x^3} 3 \operatorname{arccsc} \frac x a + \frac a 3 \left({\frac {x \sqrt {x^2 - a^2} } 2 + \frac {a^2} 2 \ln \left({x + \sqrt {x^2 - a^2} }\right)}\right) + C$ Primitive of $\dfrac {x^2} {\sqrt {x^2 - a^2} }$ $\displaystyle$ $=$ $\displaystyle \frac {x^3} 3 \operatorname{arccsc} \frac x a + \frac {a x \sqrt{x^2 - a^2} } 6 + \frac {a^3} 6 \ln \left({x + \sqrt {x^2 - a^2} }\right) + C$ simplifying

Similarly, let $\operatorname{arccsc} \dfrac x a$ be in the interval $\left({-\dfrac \pi 2 \,.\,.\, 0}\right)$.

Then:

 $\displaystyle \int x^2 \operatorname{arccsc} \frac x a \ \mathrm d x$ $=$ $\displaystyle \frac {x^3} 3 \operatorname{arccsc} \frac x a - \int \frac {x^3} 3 \left({\frac a {x \sqrt {x^2 - a^2} } }\right) \ \mathrm d x + C$ Integration by Parts $\displaystyle$ $=$ $\displaystyle \frac {x^3} 3 \operatorname{arccsc} \frac x a - \frac a 3 \int \frac {x^2 \ \mathrm d x} {\sqrt {x^2 - a^2} } + C$ Primitive of Constant Multiple of Function $\displaystyle$ $=$ $\displaystyle \frac {x^3} 3 \operatorname{arccsc} \frac x a - \frac a 3 \left({\frac {x \sqrt {x^2 - a^2} } 2 + \frac {a^2} 2 \ln \left({x + \sqrt {x^2 - a^2} }\right)}\right) + C$ Primitive of $\dfrac {x^2} {\sqrt {x^2 - a^2} }$ $\displaystyle$ $=$ $\displaystyle \frac {x^3} 3 \operatorname{arccsc} \frac x a - \frac {a x \sqrt{x^2 - a^2} } 6 - \frac {a^3} 6 \ln \left({x + \sqrt {x^2 - a^2} }\right) + C$ simplifying

$\blacksquare$