# A fun problem...

#### MarkFL

Staff member
I recently had fun on another forum solving a variation of this problem:

Consider the region within a square containing the points which are closer to the center of the square than to any of the sides. What portion of the square is this region?

I am curious to see what other methods may be used to solve this. I will post my method if it differs from those anyone else may give.

This is the result I get:

$\displaystyle 2\left(\sqrt{6}-\frac{7}{3} \right)$

#### Ackbach

##### Indicium Physicus
Staff member
I don't know if you're asking for a particular number or not, but you can figure out the shape of the region just by using geometry.

A parabola is the locus of points equidistant from a point and a line. Hence, the region inside a TV-shape, with each "side" being a parabola, will be the solution. Two parabolas will meet at a diagonal of the square.

To find the area of this region, you could divide the problem into four equal parts, and just solve one of them. Use calculus to find the area between two curves: the diagonals and the corresponding parabola.

#### CaptainBlack

##### Well-known member
I recently had fun on another forum solving a variation of this problem:

Consider the region within a square containing the points which are closer to the center of the square than to any of the sides. What portion of the square is this region?

I am curious to see what other methods may be used to solve this. I will post my method if it differs from those anyone else may give.

This is the result I get:

$\displaystyle 2\left(\sqrt{6}-\frac{7}{3} \right)$
I get $\frac{1}{3}(4\sqrt{2}-5)\approx 0.219$ both by integration (or rather using Wolfram-Alpha to do the integral) and approximatly by Monte-Carlo.

CB

#### Opalg

##### MHB Oldtimer
Staff member
I get $\frac{1}{3}(4\sqrt{2}-5)\approx 0.219$ both by integration (or rather using Wolfram-Alpha to do the integral) and approximatly by Monte-Carlo.
I agree (using Ackbach's method, and doing the integral by hand): $\frac{1}{3}(4\sqrt{2}-5)$.

#### MarkFL

Staff member
I used virtually the same method (I found 1/8 the total area), but made a silly error finding the equation of the parabola. Now I get the correct value. No one on the other forum called me on my error.

I deeply appreciate the responses here! Here is my corrected method:

WLOG, I used a square 4 units in area centered at the origin. I found the area bounded by the positive y-axis, the line $\displaystyle y=x$ and the parabola having its focus at the origin and its directrix at $\displaystyle y=1$. We find this parabola from:

$\displaystyle x^2+y^2=(y-1)^2$

$\displaystyle x^2+y^2=y^2-2y+1$

$\displaystyle y=\frac{1-x^2}{2}$

We find the first quadrant intersection of the line and the parabola from:

$\displaystyle x=\frac{1-x^2}{2}$

$\displaystyle x^2+2x-1=0$

$\displaystyle x=\sqrt{2}-1$

Thus, the area A of the region in question is:

$\displaystyle A=8\int_0^{\sqrt{2}-1}\frac{1-x^2}{2}-x\,dx$

$\displaystyle A=4\int_0^{\sqrt{2}-1}1-2x-x^2\,dx$

Dividing by the area of the square, we find the portion is (as you all so graciously found):

$\displaystyle A=\int_0^{\sqrt{2}-1}1-2x-x^2\,dx=\frac{1}{3}(4\sqrt{2}-5)$

#### CaptainBlack

##### Well-known member
I used virtually the same method (I found 1/8 the total area), but made a silly error finding the equation of the parabola. Now I get the correct value. No one on the other forum called me on my error.

I deeply appreciate the responses here! Here is my corrected method:

WLOG, I used a square 4 units in area centered at the origin. I found the area bounded by the positive y-axis, the line $\displaystyle y=x$ and the parabola having its focus at the origin and its directrix at $\displaystyle y=1$. We find this parabola from:

$\displaystyle x^2+y^2=(y-1)^2$

$\displaystyle x^2+y^2=y^2-2y+1$

$\displaystyle y=\frac{1-x^2}{2}$

We find the first quadrant intersection of the line and the parabola from:

$\displaystyle x=\frac{1-x^2}{2}$

$\displaystyle x^2+2x-1=0$

$\displaystyle x=\sqrt{2}-1$

Thus, the area A of the region in question is:

$\displaystyle A=8\int_0^{\sqrt{2}-1}\frac{1-x^2}{2}-x\,dx$

$\displaystyle A=4\int_0^{\sqrt{2}-1}1-2x-x^2\,dx$

Dividing by the area of the square, we find the portion is (as you all so graciously found):

$\displaystyle A=\int_0^{\sqrt{2}-1}1-2x-x^2\,dx=\frac{1}{3}(4\sqrt{2}-5)$
I think this works better in polars.

CB

#### melese

##### Member
I was curious to see what the answer would be if the same question were for equilateral triangle. Looking at the triangle centered at the origin with $(0,1)$ as one of its vertices, I found for each side independently when a point $(x,y)$ is equidistant from it and the origin (Ackbach's method); and I got two(different) parametric equations, and then converted these to single equations(of parabolas).

The lines for the triangle are $y=\sqrt3x+1$, $y=-\sqrt3x+1$, $\displaystyle y=-\frac{1}{2}$. The conditions for equidistance for each side are $\displaystyle(x,y)=\left(\frac{\sqrt3}{8}(3b^2+2b-1),\frac{-3b^2+6b+1}{8}\right)$; $\displaystyle(x,y)=\left(-\frac{\sqrt3}{8}(3b^2+2b-1),\frac{-3b^2+6b+1}{8}\right)$; $\displaystyle y=x^2-\frac{1}{4}$.
The way I obtained the first equation: For a number $b$, the point $(x,y)$ is equidistant from the origin and the intersection of the (perpendicular) lines $\displaystyle y=-\frac{1}{\sqrt3}x+b$ and $y=\sqrt3x+1$.

Converting to parabolas, we get: $\displaystyle y=\frac{1}{3}(-1-\sqrt3x\pm2\sqrt{1+2\sqrt3x})$, $\displaystyle y=\frac{1}{3}(-1+\sqrt3x\pm2\sqrt{1-2\sqrt3x})$.
Then the region is that bounded by all the parabolas mentioned.

By looking at the plane, not all parabolas are needed, so it's enough to use for example $\displaystyle y=\frac{1}{3}(-1-\sqrt3x+2\sqrt{1+2\sqrt3x}$ and $\displaystyle y=x^2-\frac{1}{4}$

With the help of Wolfram-Alpha I found that the area of the reigion is $\displaystyle\frac{5}{12\sqrt3}$, and the ratio to the triangle is $\displaystyle\frac{5}{27}$. (is it odd that it's rational?)

But this approach was tedious so it's possible my answer is incorrect. Can someone see a simpler way?, maybe even to generalize this so that it 'explains' the numberical answers.

#### MarkFL

Staff member
I was curious to see what the answer would be if the same question were for equilateral triangle. Looking at the triangle centered at the origin with $(0,1)$ as one of its vertices, I found for each side independently when a point $(x,y)$ is equidistant from it and the origin (Ackbach's method); and I got two(different) parametric equations, and then converted these to single equations(of parabolas).

The lines for the triangle are $y=\sqrt3x+1$, $y=-\sqrt3x+1$, $\displaystyle y=-\frac{1}{2}$. The conditions for equidistance for each side are $\displaystyle(x,y)=\left(\frac{\sqrt3}{8}(3b^2+2b-1),\frac{-3b^2+6b+1}{8}\right)$; $\displaystyle(x,y)=\left(-\frac{\sqrt3}{8}(3b^2+2b-1),\frac{-3b^2+6b+1}{8}\right)$; $\displaystyle y=x^2-\frac{1}{4}$.
The way I obtained the first equation: For a number $b$, the point $(x,y)$ is equidistant from the origin and the intersection of the (perpendicular) lines $\displaystyle y=-\frac{1}{\sqrt3}x+b$ and $y=\sqrt3x+1$.

Converting to parabolas, we get: $\displaystyle y=\frac{1}{3}(-1-\sqrt3x\pm2\sqrt{1+2\sqrt3x})$, $\displaystyle y=\frac{1}{3}(-1+\sqrt3x\pm2\sqrt{1-2\sqrt3x})$.
Then the region is that bounded by all the parabolas mentioned.

By looking at the plane, not all parabolas are needed, so it's enough to use for example $\displaystyle y=\frac{1}{3}(-1-\sqrt3x+2\sqrt{1+2\sqrt3x}$ and $\displaystyle y=x^2-\frac{1}{4}$

With the help of Wolfram-Alpha I found that the area of the reigion is $\displaystyle\frac{5}{12\sqrt3}$, and the ratio to the triangle is $\displaystyle\frac{5}{27}$. (is it odd that it's rational?)

But this approach was tedious so it's possible my answer is incorrect. Can someone see a simpler way?, maybe even to generalize this so that it 'explains' the numberical answers.
I get the same result that you did...

Here is my method:

I chose an equilateral triangle having sides 1 unit in length, with the center of the horizontal base at the origin.

The center of the triangle is at $\displaystyle \left(0,\frac{1}{2\sqrt{3}} \right)$

With the base of the triangle as the directrix and the center of the triangle as the focus, the equation of the parabola is then:

$\displaystyle y=\sqrt{3}x^2+\frac{1}{4\sqrt{3}}$

The equation of the line passing through the center of the triangle and the rightmost vertex is:

$\displaystyle y=-\frac{1}{\sqrt{3}}x+\frac{1}{2\sqrt{3}}$

We find then that the parabola and line intersect for:

$\displaystyle x=\frac{1}{6}$

Hence, using symmetry, the area of the region is:

$\displaystyle \frac{\sqrt{3}}{2}\int_0^{\frac{1}{6}}1-4x-12x^2\,dx$

Dividing this by the area of the triangle (which is $\displaystyle \frac{\sqrt{3}}{4}$), we find the ratio is:

$\displaystyle 2\int_0^{\frac{1}{6}}1-4x-12x^2\,dx=\frac{5}{27}$

#### MarkFL

Staff member
For an n-gon, I find the portion $\displaystyle P(n)$ is:

$\displaystyle P(n)=\frac{\cos\left(\frac{\pi}{n} \right)\left(\cos\left(\frac{\pi}{n} \right)+2 \right)}{3\left(\cos\left(\frac{\pi}{n} \right)+1 \right)^2}$

where $\displaystyle 2<n\in\mathbb{N}$

Last edited:

#### MarkFL

Staff member
This is how I found the above formula:

Consider an n-gon whose sides are 2 units in length. This regular polygon may be deconstructed into n isosceles triangles. We take one of these triangles, bisect it and orient it in the Cartesian plane as in the diagram: We have:

$\displaystyle \theta=\frac{\pi}{n}$ where $\displaystyle 2<n\in\mathbb{N}$

$\displaystyle h=\cot(\theta)$

The curve in red represents the locus of points equidistant from the upper vertex and the base. We know this curve must be parabolic by the definition of a parabola, and we may find the equation representing it as follows:

$\displaystyle x^2+(y-h)^2=y^2$

$\displaystyle x^2+y^2-2hy+h^2=y^2$

$\displaystyle y=\frac{x^2+h^2}{2h}$

The side of the triangle drawn in green coincides with the line given by:

$\displaystyle y=-hx+h$

Next, we determine the quadrant I x-coordinate where the parabola and the line intersect:

$\displaystyle \frac{x^2+h^2}{2h}=-hx+h$

$\displaystyle x^2+2h^2x-h^2=0$

Taking the positive root, we find by the quadratic formula:

$\displaystyle x_a=\frac{-2h^2+\sqrt{4h^4+4h^2}}{2}=-h^2+h\sqrt{h^2+1}=h(\sqrt{h^2+1}-h)$

Now, to find the area of the region of the triangle above the parabola, we use:

$\displaystyle \int_0^{x_a}(-hx+h)-\left(\frac{x^2+h^2}{2h} \right)\,dx=\frac{1}{2h}\int_0^{x_a} h^2-2h^2x-x^2\,dx$

Dividing this by the area of the triangle $\displaystyle \frac{h}{2}$, we obtain:

$\displaystyle P=\frac{1}{h^2}\int_0^{x_a} h^2-2h^2x-x^2\,dx=\int_0^{x_a} 1-2x-\frac{1}{h^2}x^2\,dx=$

$\displaystyle \left[x-x^2-\frac{1}{3h^2}x^3 \right]_0^{x_a}=x_a-x_a^2-\frac{1}{3h^2}x_a^3$

Recall, we have:

$\displaystyle x_a=h\left(\sqrt{h^2+1}-h \right)=\cot(\theta)\left(\sqrt{\cot^2(\theta )+1}-\cot(\theta) \right)=\cot(\theta)(\csc(\theta)-\cot(\theta))=$

$\displaystyle \cot(\theta)\frac{1-\cos(\theta)}{\sin(\theta)}=\cos(\theta)\frac{1-\cos(\theta)}{1-\cos^2(\theta)}=\frac{\cos(\theta)}{\cos(\theta)+1}$

$\displaystyle x_a^2=\frac{\cos^2(\theta)}{(\cos(\theta)+1)^2}$

$\displaystyle \frac{1}{3h^2}x_a^3=\frac{1}{3}\tan^2(\theta)\frac{\cos^3(\theta)}{(\cos(\theta)+1)^3}=\frac{\sin^2(\theta)\cos(\theta)}{3(\cos(\theta)+1)^3}=\frac{ \cos(\theta)(1-\cos(\theta))}{3(\cos(\theta)+1)^2}$

Thus, we have:

$\displaystyle x_a-x_a^2-\frac{1}{3h^2}x_a^3=$

$\displaystyle \frac{3\cos(\theta)(\cos(\theta)+1)-3\cos^2(\theta)-\cos(\theta)(1-\cos(\theta))}{3(\cos(\theta)+1)^2}=$

$\displaystyle \frac{\cos(\theta)(\cos(\theta)+2)}{3(\cos(\theta)+1)^2}$

And since $\displaystyle \theta=\frac{\pi}{n}$ we have:

$\displaystyle P(n)=\frac{\cos(\frac{\pi}{n})(\cos(\frac{\pi}{n})+2)}{3(\cos(\frac{\pi}{n})+1)^2}$

Last edited: