Area of Weird Shapes Start with a circle that has a regular polygon inscribed inside of it. Place it on top of a line so that one of the polygon's vertices is touching the line. Then imagine the circle rolling on the line until the next vertice is touching. 
What is the area of the region between the line and rotated edge of the polygon, the region not passed over by the edge? What if a 2-gon, the diameter of the circle?

 A: The curve $E$ we are talking about is an envelope: Each momentary position of the moving edge is a tangent to $E$, and $E$ separates the points covered by these tangents from the uncovered points. Before we can talk about the area under $E$ we have to get hold of it. 
Consider a disc of radius $a>0$ rolling on the $x$-axis.  At time $t=0$ the disc is touching the $x$-axis at the origin. On the disc is painted a chord with distance $\rho>0$ from the center; at time $t=0$ this chord is horizontal. As the disc moves with angular velocity $1$ to the right the midpoint $m$ of the chord is given by
$$m(t)=(-\rho\sin t+ a t, a-\rho\cos t)\ ,$$
and its direction $u(t)$ is given by
$$u(t)=(\cos t,-\sin t)\ .$$
At time $t$ the chord is on the line
$$\ell_t: \quad s\mapsto m(t)+s u(t)\qquad(-\infty< s<\infty)\ ,$$
resp.
$$\ell_t: \quad s\mapsto(-\rho\sin t+ at+s\cos t, \ a-\rho\cos t-s\sin t)\quad=:f(t,s)\ .$$
We obtain the envelope of this family of lines $(\ell_t)_{t\in{\mathbb R}}$ by computing the Jacobian
$$J_f(t,s)=s-a\sin t$$
and determining the pairs $(t,s)$ for which this Jacobian vanishes. It follows that on each $\ell_t$ the envelope point (i.e., the point where $\ell_t$ touches $E$) is the point with $s=a\sin t$. We therefore obtain the envelope $E$, parametrized by $t$, as
$$\eqalign{E:\quad t\mapsto&(-\rho\sin t+ at+a\sin t\cos t, \ a-\rho\cos t-a\sin^2 t)\cr &=(at,0)+(a\cos t-\rho)(\sin t,\cos t)\ .\cr}\tag{1}$$
As expected the curve $E$ will hit the $x$-axis at time $T$ defined by  $\cos T={\rho\over a}$.
The area $A$ under the principal arc of $E$ can now be computed by
$$A=\int_{-T}^T y(t)\>x'(t)\>dt\ ,$$
whereby you have to plug in the representation $(1)$ of this arc.
A: 
See the diagram and note the variable angle $\theta$, which we will parametrise the problem by.
From the diagram, note that the vertical distance from the closest edge of the square to the line is $y$. $x$ is the horizontal distance travelled along the line by the circular edge (this is also the arc length along the circumference of the circle). It is clear that you want to find the relationship between $y$ and $x$ and then perform the integration to find the required area under that curve.
By applying sine rule to the triangle in the diagram with two sides $R-y$ and $R$ and two angles $\theta$ and $\displaystyle \frac{\pi}{4}$ (and therefore other angle $\displaystyle \pi - (\frac{\pi}{4} + \theta) = \frac{3\pi}{4} - \theta$), you can write:
$\displaystyle \frac{R-y}{\sin \frac{\pi}{4}} = \frac{R}{\sin(\frac{3\pi}{4} - \theta)}$
Solving and simplifying, $\displaystyle y = R\left(1 - \frac 1{\sin\theta + \cos\theta}\right)$ and $x = R\theta$.
From this, you can easily get:  $\displaystyle y = R\left(1 - \frac 1{\sin\frac xR + \cos\frac xR}\right)$
The indefinite integral $\displaystyle \int ydx$ is rather tedious, but a closed form indefinite integral exists. You can find it at Wolfram link
The bounds you require for the definite integral to get the area are $x = 0$ and $\displaystyle x = \frac{R\pi}{2}$ (as the circle rolls so that the next vertex touches the line, it's gone through a quarter of its circumference). That gives the value of area $\displaystyle A = \frac 12R^2\left(\pi - 2\sqrt 2 \tanh^{-1}\left(\frac 1{\sqrt 2}\right)\right) \approx 0.324R^2$. I'm not sure how to copy paste the link to the original result.
