# To find the generalized expression

How to approach to the solution for finding a generalized expression for this definite integral: $$\int_a^{a \sqrt{2}} x^n \arccos\frac{a}{x} \mathrm{d}x$$

I approached this expression in finding the average point on a square just like the one for a circle will be at a distance of $\frac{2r}{3}$ from the center, similarly for a square i took a vertex as a reference and proceeded on diagonal line i.e. form $x=0$ to $x=a$

Kindly help in finding an generalized expression, particularly for $n$ as $1$ and $2$

• files.fm/f/uvcfa8kj is the problem, i can not find any way to start, someone help! Commented May 11, 2018 at 18:51

## 4 Answers

Apart from a factor $a^{n+1}$ this is about the quantities $$K_n:=\int_1^{\sqrt{2}}t^n\arccos{1\over t}\>dt\qquad(n\geq0)\ .$$ Substituting ${\displaystyle t:={1\over\cos\alpha}}$ $\bigl(0\leq\alpha\leq{\pi\over4}\bigr)$ and integrating by parts we obtain $$K_n=\int_0^{\pi/4}{\sin\alpha\over\cos^{n+2}\alpha}\,\alpha\>d\alpha={\alpha\over(n+1)\cos^{n+1}\alpha}\biggr|_0^{\pi/4}-{1\over n+1}\int_0^{\pi/4}{d\alpha\over\cos^{n+1}\alpha}\ ,$$ hence $$K_n={1\over n+1}\bigl(2^{(n-3)/2}\pi -I_n\bigr)\ ,\quad{\rm whereby}\quad I_n:=\int_0^{\pi/4}{d\alpha\over\cos^{n+1}\alpha}\qquad(n\geq0)\ .\tag{1}$$ One computes $$I_0=\log\bigl(1+\sqrt{2}\bigr),\quad I_1=1\ .\tag{2}$$ In order to obtain a recursion formula for the $I_n$ we consider \eqalign{I_n-I_{n-2}&=\int_0^{\pi/4}{\sin\alpha\over \cos^{n+1}\alpha}\,\sin\alpha\>d\alpha={\sin\alpha\over n\cos^n\alpha}\biggr|_0^{\pi/4}-\int_0^{\pi/4}{d\alpha\over n\cos^{n-1}\alpha}\cr &={2^{(n-1)/2}\over n}-{1\over n} I_{n-2}\ .\cr} It follows that $$I_n={1\over n}\bigl(2^{(n-1)/2}+(n-1)I_{n-2}\bigr)\qquad(n\geq2)\ ,$$ so that together with $(1)$ and $(2)$ we can recursively determine the $K_n$ for all $n\geq0$.

• Very elegant solution, for sure ! Commented May 13, 2018 at 2:45

Making $x=\frac ta$, the problem reduces to $$K_n=a^{n+1}\int_{\frac{1}{\sqrt{2}}}^1 t^{-(n+2)} \cos ^{-1}(t) \, dt$$Using a CAS, we can get the antiderivative $$I_n=\int t^{-(n+2)} \cos ^{-1}(t) \, dt$$

$$I_n=\frac{ \, _2F_1\left(\frac{1}{2},-\frac{n}{2};1-\frac{n}{2};t^2\right)-n \cos ^{-1}(t)}{n (n+1)\,t ^{n+1}}$$ Using the bounds, almost as Mariusz Iwaniuk answered, is given by $$\frac{n(n+1)}{a^{n+1}}K_n=2^{\frac{n-3}{2}} \left(\pi n-2 \sqrt{2} \, _2F_1\left(\frac{1}{2},-\frac{n}{2};1-\frac{n}{2};\frac{1}{2}\right)\right)+\sqrt{\pi }\,\frac{ \Gamma \left(1-\frac{n}{2}\right)}{\Gamma \left(\frac{1}{2}-\frac{n}{2}\right)}$$ making $$K_1=\frac{\pi -2}{4} a^2$$ $$K_2=\frac{1}{6} \left(\sqrt{2} (\pi-1) -\sinh ^{-1}(1)\right) a^3$$ $$K_3=\frac{3 \pi -4}{12} a^4$$ $$K_4=\frac{1}{40} \left(\sqrt{2} (8 \pi -7)-3 \sinh ^{-1}(1)\right)a^5$$ $$K_5=\frac{15 \pi -14}{45} a^6$$ $$K_6=\frac{1}{336} \left( \sqrt{2} (96 \pi-67) -15 \sinh ^{-1}(1)\right)a^7$$ $$K_7=\frac{35 \pi -24}{70} a^8$$ $$K_8=\frac 1{3456} \left( \sqrt{2}(1536 \pi-853) -105 \sinh ^{-1}(1)\right)a^9$$ $$K_9=\frac{4 (315 \pi -166)}{1575} a^{10}$$

With CAS help,general integral is:

$\int_a^{a \sqrt{2}} x^n \cos ^{-1}\left(\frac{a}{x}\right) \, dx=\frac{2^{-\frac{3}{2}+\frac{n}{2}} a^{1+n} \pi }{1+n}+\frac{a^{1+n} \sqrt{\pi } \Gamma \left(1-\frac{n}{2}\right)}{n (1+n) \Gamma \left(\frac{1}{2}-\frac{n}{2}\right)}-\frac{2^{n/2} a^{1+n} \, _2F_1\left(\frac{1}{2},-\frac{n}{2};1-\frac{n}{2};\frac{1}{2}\right)}{n (1+n)}=\frac{2^{-\frac{3}{2}+\frac{n}{2}} a^{1+n} \pi }{(1+n)^2}+\frac{2^{-\frac{3}{2}+\frac{n}{2}} a^{1+n} n \pi }{(1+n)^2}+\frac{a^{1+n} B_{\frac{1}{2}}\left(-\frac{n}{2},\frac{1}{2}\right)}{2 (1+n)^2}+\frac{a^{1+n} n B_{\frac{1}{2}}\left(-\frac{n}{2},\frac{1}{2}\right)}{2 (1+n)^2}+\frac{a^{1+n} \sqrt{\pi } \Gamma \left(-\frac{n}{2}\right)}{(1+n)^2 \Gamma \left(-\frac{1}{2}-\frac{n}{2}\right)}$

Where:$\, _2F_1\left(\frac{1}{2},-\frac{n}{2};1-\frac{n}{2};\frac{1}{2}\right)$ is hypergeometric function, $B_{\frac{1}{2}}\left(-\frac{n}{2},\frac{1}{2}\right)$ is incomplete beta function.

Mathematica code:

(2^(-(3/2) + n/2) a^(1 + n) \[Pi])/(1 + n) + (a^(1 + n) Sqrt[\[Pi]] Gamma[1 - n/2])/(n (1 + n) Gamma[1/2 - n/2]) - (
2^(n/2) a^(1 + n) Hypergeometric2F1[1/2, -(n/2), 1 - n/2, 1/2])/(n (1 + n))


Or:

(2^(-(3/2) + n/2) a^(1 + n) \[Pi])/(1 + n)^2 + (
2^(-(3/2) + n/2) a^(1 + n) n \[Pi])/(1 + n)^2 + (
a^(1 + n) Beta[1/2, -(n/2), 1/2])/(2 (1 + n)^2) + (
a^(1 + n) n Beta[1/2, -(n/2), 1/2])/(2 (1 + n)^2) + (
a^(1 + n) Sqrt[\[Pi]] Gamma[-(n/2)])/((1 + n)^2 Gamma[-(1/2) - n/2])


for $n=1$ integral is:

$$\frac{\pi a^2}{4}-\frac{a^2}{2}$$

for $n=2$ integral is:

$$\frac{\pi a^3}{3 \sqrt{2}}-\frac{a^3}{3 \sqrt{2}}-\frac{1}{6} a^3 \ln \left(2+\sqrt{2}\right)+\frac{1}{12} a^3 \ln (2)$$

I am very much thankful to all the three Samaritans namely Christian Blatter, Mariusz Iwaniuk & Claude Leibovici.

I am not writing an answer but to upload a photo i used this shortcut. Blame it on no knowledge of MathJx, Apologies!

I want to express why this problem came. A question i saw somewhere was to find the average point on a square like its a circle of radius 2r/3 centered at center of a disc in the latter's case.

Using the conventional method to find the solution, an expression came which on applying the results from above three people give the answer as ---

The average point is at a radial distance of 0.765*side from any vertex inside a square for which i am attaching a photo.

However as per the answer to the same question here What is average distance from center of square to some point?, its a circle of radius = 0.382*side centered at center of square and a graphical result, as i understand, is like in second image.

Kindly highlight the discrepancy in my approach if its faulty.