# Modelling the “Moving Sofa”

I believe that many of you know about the moving sofa problem; if not you can find the description of the problem here.

In this question I am going to rotate the L shaped hall instead of moving a sofa around the corner. By rotating the hall $180^{\circ}$ what remains between the walls will give the shape of the sofa. Like this:

The points on the hall have the following properties:

\begin{eqnarray} A & = & \left( r\cos { \alpha } ,t\sin { \alpha } \right) \\ { A }’ & = & \left( r\cos { \alpha } +\sqrt { 2 } \cos { \left( \frac { \pi }{ 4 } +\frac { \alpha }{ 2 } \right) } ,t\sin { \alpha } +\sqrt { 2 } \sin { \left( \frac { \pi }{ 4 } +\frac { \alpha }{ 2 } \right) } \right) \\ { B } & = & \left( r\cos { \alpha } -\frac { t\sin { \alpha } }{ \tan { \left( \frac { \alpha }{ 2 } \right) } } ,0 \right) \\ { B }’ & = & \left( r\cos { \alpha } -\frac { t\sin { \alpha } }{ \tan { \left( \frac { \alpha }{ 2 } \right) } } -\frac { 1 }{ \sin { \left( \frac { \alpha }{ 2 } \right) } } ,0 \right) \\ C & = & \left( r\cos { \alpha } +t\sin { \alpha } \tan { \left( \frac { \alpha }{ 2 } \right) } ,0 \right) \\ { C }’ & = & \left( r\cos { \alpha } +t\sin { \alpha } \tan { \left( \frac { \alpha }{ 2 } \right) } +\frac { 1 }{ \cos { \left( \frac { \alpha }{ 2 } \right) } } ,0 \right) \end{eqnarray}

Attention: $\alpha$ is not the angle of $AOC$, it is some angle $ADC$ where $D$ changes location on $x$ axis for $r\neq t$. I am saying this because images can create confusion. Anyways I will change them as soon as possible.

I could consider $r=f(\alpha)$ and $t=g(\alpha)$ but for this question I am going to take $r$ and $t$ as constants. If they were functions of $\alpha$ there would appear some interesting shapes. I experimented for different functions however the areas are more difficult to calculate, that’s why I am not going to share. Maybe in the future.

We rotate the hall for $r=t$ in the example above:

In this case:

1. point A moves on a semicircle
2. The envelope of lines between A’ and C’ is a circular arc. One has to prove this but I assume that it is true for $r=t$.

If my second assumption is correct the area of sofa is $A= 2r-\frac { \pi r^{ 2 } }{ 2 } +\frac { \pi }{ 2 }$. The maximum area is reached when $r = 2/\pi$ and it’s value is:
$$A = 2/\pi+\pi/2 = 2,207416099$$

which matches with Hammersley’s sofa. The shape is also similar or same:

Now I am going to increase $t$ with respect to $r$. For $r=2/\pi$ and $t=0.77$:

Well, this looks like Gerver’s sofa.

I believe thearea can be maximized by finding the equations of envelopes above and below the sofa. Look at this question where @Aretino has computed the area below $ABC$.

I don’t know enough to find equations for envelopes. I am afraid that I will make mistakes. I considered to calculate area by counting number of pixels in it, but this is not a good idea because for optimizing the area I have to create many images.

I will give a bounty of 200 for whom calculates the maximum area. As I said the most difficult part of the problem is to find equations of envelopes. @Aretino did it.

PLUS:
Could following be the longest sofa where $(r,t)=((\sqrt 5+1)/2,1)$ ?

If you want to investigate further or use animation for educational purposes here is the Geogebra file:
http://ggbm.at/vemEtGyj

Ok, I had some free time and I count number of pixels in the sofa and I am sure that I have something bigger than Hammersley’s constant.

First, I made a simulation for Hammersley’s sofa where $r=t=2/\pi$ and exported the image to png in 300 dpi (6484×3342 pixels) and using Gimp counted number of pixels which have exactly same value. For Hammersley I got $3039086$ pixels.

For the second case $r=0.59$ and $t=0.66$ and I got $3052780$ pixels. To calculate area for this case:

$$\frac{3052780}{3039086}(2/\pi + \pi/2)=2.217362628$$

which is slightly less than Gerver’s constant which is $2.2195$. Here is the sofa:

WARNING: this answer uses the new parameterization of points introduced by the OP:
$$\begin{eqnarray} A & = & \left( r\cos { \alpha } ,t\sin { \alpha } \right) \\ { A }’ & = & \left( r\cos { \alpha } +\sqrt { 2 } \cos { \left( \frac { \pi }{ 4 } +\frac { \alpha }{ 2 } \right) } ,t\sin { \alpha } +\sqrt { 2 } \sin { \left( \frac { \pi }{ 4 } +\frac { \alpha }{ 2 } \right) } \right) \\ C & = & \left( r\cos { \alpha } +t\sin { \alpha } \tan { \left( \frac { \alpha }{ 2 } \right) } ,0 \right) \\ { C }’ & = & \left( r\cos { \alpha } +t\sin { \alpha } \tan { \left( \frac { \alpha }{ 2 } \right) } +\frac { 1 }{ \cos { \left( \frac { \alpha }{ 2 } \right) } } ,0 \right) \end{eqnarray}$$

Another parameterization, which also apperaed in a first version of this question, was used in a previous answer to a related question.

The inner shape of the sofa is formed by the ellipse of semiaxes $$r$$, $$t$$ and by the envelope of lines $$AC$$ (here and in the following I’ll consider only that part of the sofa in the $$x\ge0$$ half-plane).

The equations of lines $$AC$$ can be expressed as a function of $$\alpha$$
($$0\le\alpha\le\pi$$) as $$F(x,y,\alpha)=0$$, where:
$$F(x,y,\alpha)= -t y \sin\alpha \tan{\alpha\over2} – t \sin\alpha \left(x – r \cos\alpha – t \sin\alpha \tan{\alpha\over2}\right).$$
The equation of the envelope can be found from:
$$F(x,y,\alpha)={\partial\over\partial\alpha}F(x,y,\alpha)=0,$$
giving the parametric equations for the envelope:
\begin{align} x_{inner}=& (r-t) \cos\alpha+\frac{1}{2}(t-r) \cos2\alpha+\frac{1}{2}(r+t),\\ y_{inner}=& 4 (t-r) \sin\frac{\alpha}{2}\, \cos^3\frac{\alpha}{2}.\\ \end{align}

We need not consider this envelope if $$t, because in that case $$y_{inner}<0$$.
If $$t>r$$ the envelope meets the ellipse at a point $$P$$: the corresponding value of $$\alpha$$ can be found from the equation
$$(x_{inner}/r)^2+(y_{inner}/t)^2=1$$,
whose solution $$\alpha=\bar\alpha$$ is given by:
$$\begin{cases} \displaystyle\bar\alpha= 2\arccos\sqrt{t\over{t+r}}, &\text{for t\le3r;}\\ \displaystyle\bar\alpha= \arccos\sqrt{t\over{2(t-r)}}, &\text{for t\ge3r.}\\ \end{cases}$$

The corresponding values $$\bar\theta$$ for the parameter of the ellipse can be easily computed from: $$\bar\theta=\arcsin(y_{inner}(\bar\alpha)/t)$$:
$$\begin{cases} \displaystyle\bar\theta= \arcsin\frac{4 \sqrt{rt} (t-r)}{(r+t)^2}, &\text{for t\le3r;}\\ \displaystyle\bar\theta= \arcsin\frac{\sqrt{t(t-2 r)}}{t-r}, &\text{for t\ge3r.}\\ \end{cases}$$

For $$t\ge r$$ we can then represent half the area under the inner shape of the sofa as an integral:
$${1\over2}Area_{inner}=\int_0^{2t-r} y\,dx= \int_{\pi/2}^{\bar\theta}t\sin\theta{d\over d\theta}(r\cos\theta)\,d\theta+ \int_{\bar\alpha}^{\pi} y_{inner}{dx_{inner}\over d\alpha}\,d\alpha.$$

This can be computed explicitly, here’s for instance the result for $$r:
\begin{align} {1\over2}Area_{inner}= {\pi\over4}(r^2-rt+t^2) +\frac{1}{48} (t-r)^2 \left[-24 \cos ^{-1}\frac{\sqrt{t}}{\sqrt{r+t}} +12 \sin \left(2 \cos^{-1}\frac{\sqrt{t}}{\sqrt{r+t}}\right)\\ +12 \sin \left(4 \cos^{-1}\frac{\sqrt{t}}{\sqrt{r+t}}\right) -4 \sin \left(6 \cos^{-1}\frac{\sqrt{t}}{\sqrt{r+t}}\right) -3 \sin \left(8 \cos^{-1}\frac{\sqrt{t}}{\sqrt{r+t}}\right) \right]\\ -2 r t {\sqrt{rt} |r^2-6 r t+t^2|\over(r+t)^4} -{1\over4} r t \sin ^{-1}\frac{4 \sqrt{rt} (t-r)}{(r+t)^2}\\ \end{align}

The outer shape of the sofa is formed by line $$y=1$$ and by the envelope of lines $$A’C’$$. By repeating the same steps as above one can find the parametric equations of the outer envelope:
\begin{align} x_{outer}&= (r-t) \left(\cos\alpha-{1\over2}\cos2\alpha\right) +\cos\frac{\alpha}{2}+{1\over2}(r+t)\\ y_{outer}&= \sin\frac{\alpha}{2} \left(-3 (r-t) \cos\frac{\alpha}{2} +(t-r) \cos\frac{3 \alpha}{2}+1\right)\\ \end{align}
This curve meets line $$y=1$$ for $$\alpha=\pi$$ if $$t-r\le\bar x$$, where
$$\bar x=\frac{1}{432} \left(17 \sqrt{26 \left(11-\sqrt{13}\right)}-29 \sqrt{2 \left(11-\sqrt{13}\right)}\right)\approx 0.287482$$.
In that case the intersection point has coordinates $$(2t-r,1)$$ and the area under the outer shape of the sofa can be readily found:
$${1\over2}Area_{outer}={1\over3}(r+2t)+{\pi\over4}(1-(t-r)^2)$$
If, on the other hand, $$t-r>\bar x$$ then one must find the value of parameter $$\alpha$$ at which the envelope meets the line, by solving the equation $$y_{outer}=1$$ and looking for the smallest positive solution. This has to be done, in general, by some numerical method.

The area of the sofa can then be found as $$Area_{tot}=Area_{outer}-Area_{inner}$$. I used Mathematica to draw a contour plot of this area, as a function of $$r$$ (horizontal axis) and $$t$$ (vertical axis):

There is a clear maximum in the region around $$r = 0.6$$ and $$t = 0.7$$. In this region one can use the simple expressions for $$Area_{inner}$$ and $$Area_{outer}$$ given above, to find the exact value of the maximum. A numerical search gives $$2.217856997942074266$$ for the maximum area, reached for $$r=0.605513519698965$$ and $$t=0.6678342468712839$$.