Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Consider the square $S = [-1,1]\times[-1,1]$. Suppose we put a smaller square inside it, which is rotated with an angle $\alpha$ relative to the large square. What is the largest such square that does not contain the origin in its interior?

When $\alpha=0$, the answer is obvious: the maximal side-length is $1$. Every square with side-length larger than 1 must contain the origin in its interior. But when $\alpha>0$, it seems that the maximal side-length is smaller, and I don't know how to calculate it.

share|improve this question
    
Have you considered how the angle $\alpha$ causes the alternate-corner angle to change relative to the outer circle? In particular, it may be helpful to consider the angle $\alpha$ compared to the angle from the inner square interior corner to the outermost corner to the outer square center. –  abiessu Oct 6 '13 at 17:22
    
I meant square in all cases, not circle... –  abiessu Oct 6 '13 at 17:27

2 Answers 2

up vote 1 down vote accepted

Draw a line with slope $\alpha\in\ ]0,{\pi\over4}] $ through the origin. A largest square tilted by $\alpha$ not containing $(0,0)$ in its interior is the square with two vertices on this line and the other two vertices on the lines $x=-1$, $\>y=1$. Denote the side of this square by $s$. Looking at the upper rim of the figure we see that the following equation holds: $$s\cos\alpha+{s\over\sin\alpha}=1+\cot \alpha\ .$$ This leads to $$s={\cos\alpha+\sin\alpha\over 1+\cos\alpha\sin\alpha}\ .$$ enter image description here

share|improve this answer
    
"Looking at the upper rim of the figure..." what rim of what figure? –  Erel Segal Halevi Oct 18 '13 at 12:49
    
Ah, I see now. Thanks! –  Erel Segal Halevi Oct 19 '13 at 17:52

OK, this is my current attempt of an answer:

Consider a square that is pushed towards to top-right corner of $S$. The coordinates of this square are (where $c:=cos(\alpha)$ and $s:=sin(\alpha)$):

  • T (top): $(1-dc,1)$
  • R (right): $(1,1-ds)$
  • B (bottom): $(1-ds,1-dc-ds)$
  • L (left): $(1-dc-ds,1-dc)$

Due to symmetry, it is sufficient to study the range: $0 < \alpha < \frac{\pi}{4} $ , where $0<s<c<1$.

Now, an method for deciding if a point is in polygon can be used to decide if $(0,0)$ is in the given square, as a function of $d$.

Using the ray-crossing method, we have to consider a ray from the origin, and check how many times this ray crosses the sides of the above square. If the number is odd, then the origin is inside the square.

Consider, as a ray, the negative y axis.

Assume that $d<1$. In this case, T R and L are all above the origin, therefore the ray cannot cross the lines LT and TR. Additionally, T R and B are all to the right of the origin, therefore the ray also cannot cross the lines TR and RB.

It remains to check whether the negative y axis crosses the side LB, i.e., the y coordinate of the origin is above the line LB. The equation of the side LB is:

$$ cy(x) = (c+s-d-dsc)-sx $$ $$ where: x \in [1-ds-dc,1-ds] $$

If we substitute $x=0$, we get:

$$ cy(0) = c+s-d-dsc $$

If this number is negative, then the origin is above the side LB, and the origin is inside the square. The condition for this is:

$$ c+s-dc^2-dsc-ds^2 < 0 $$ $$ d > \frac{c+s}{1+sc} $$

(An alternative way to reach at the same solution is described in Robert Israel's answer).

You can plot that function here, using this line:

a0=2&a1=(cos(x)+sin(x))/(1+sin(x)*cos(x))&a2=1/(sin(x)+cos(x))&a3=(cos(x)-sin(x))/(cos(x)^2)&a4=1&a5=4&a6=8&a7=1&a8=1&a9=1&b0=500&b1=500&b2=0&b3=0.79&b4=0&b5=2&b6=10&b7=10&b8=5&b9=5&c0=3&c1=0&c2=1&c3=1&c4=1&c5=1&c6=1&c7=0&c8=0&c9=0&d0=1&d1=20&d2=20&d3=0&d4=&d5=&d6=&d7=&d8=&d9=&e0=&e1=&e2=&e3=&e4=14&e5=14&e6=13&e7=12&e8=0&e9=0&f0=0&f1=1&f2=1&f3=0&f4=0&f5=&f6=&f7=&f8=&f9=&g0=&g1=1&g2=1&g3=0&g4=0&g5=0&g6=Y&g7=ffffff&g8=a0b0c0&g9=6080a0&h0=1&z

The minimum is at: $\alpha=\pi/4$, where the lower bound is approximately: $d>0.943$.

To conclude: a square with $d\geq 1$ always contains the origin.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.