Integrate over line of square in polar coordinates

integrationpolar coordinatestrigonometry

I'm not sure if this question already exists, because I'm not sure how to call it. I want to integrate over the line of a square. In a simplified problem, I'd like to solve:

$$ l=\oint\limits_c dl $$

Therefore I figured I could take one line and multiply the result by 4:

$$ l=4\oint\limits_{c'}dl $$

And then I wanted to use an angle ($d\alpha$) to represent $dl$ – however, that's where I failed. In the following figure I illustrated which values I can easily use to get $dl$ ($R$ is known and $r=\frac{R}{\cos\alpha})$:
illustration
With the help of the sine theorem I got the following:
$$\frac{dl}{\sin(d\alpha)}=\frac{r}{\sin(180^\circ-d\alpha-(90^\circ-\alpha))}=\frac{r}{\sin(90^\circ+\alpha-d\alpha)}=\frac{r}{\cos(d\alpha-\alpha)}$$
and with the addition theorem:
$$dl=\frac{r\sin(d\alpha)}{\cos(d\alpha-\alpha)}=\frac{r\sin(d\alpha)}{\sin(d\alpha)\sin\alpha+\cos(d\alpha)\cos\alpha}\simeq\frac{rd\alpha}{d\alpha\sin\alpha+\cos\alpha}$$
But I have no idea how to calculate the resulting integral:
$$l=4\oint\limits_{c'}\frac{rd\alpha}{d\alpha\sin\alpha+\cos\alpha}$$
as $d\alpha$ is in the denominator.

Am I missing some trigonometric rule here?


Edit if I use $r=\frac{R}{cos\alpha}$, I'd have:
$$dl\simeq\frac{Rd\alpha}{\sin\alpha\cos\alpha d\alpha+\cos^2\alpha}$$
which (as wolframalpha tells me) is
$$dl\simeq\frac{2Rd\alpha}{\sin(2\alpha)d\alpha+\cos(2\alpha)+1}$$
However, that doesn't help me much, as $d\alpha$ still is in the denominator.

More with the help of guesswork then through my own thoughts, I found a $dl$ that would work:
$$dl=|2\sin(2\alpha)|d\alpha$$
For a square with $R=1$ for example, I'd have:
$$l=4\oint\limits_{c'}|2\sin(2\alpha)|d\alpha=4\int\limits_{-\frac{\pi}{4}}^{\frac{\pi}{4}}|2\sin(2\alpha)|d\alpha=4\cdot2=8$$
so this behaves as expected – however, I have no idea how this could be trigonometrically (or mathematically, for that matter) explained. Furthermore, this seems to contrast my previous thoughts about $dl$, as illustrated in the following graph from geogebra (with $d\alpha=0.1$ – green is my first attempt, blue is my guessed attempt):
graph

I also did some more research and got here, where the line element in polar coordinates is given by:
$$dl^2=dr^2+r^2d\alpha^2$$
this seems to use the pythagorean theorem, in the sense that $d\alpha$ is straigt for small values, which makes sense. Follwing that, one might say:
$$\tan(d\alpha)=\frac{dr}{d\alpha}$$
implying the following for the line element:
$$dl=\sqrt{d\alpha^2\tan^2(d\alpha)+d\alpha^2}=d\alpha\sqrt{\tan^2(d\alpha)+1}$$
however, I don't know how to use this, as $d\alpha$ also is in the Tangens, is squared, is a summand and is taken the root of. I guess there's something wrong with this solution, as the term $\alpha$ doesn't even appear in it, but even if it wasn't I could not use it any more than my first solution.

I have the feeling that I'm looking at this problem in a way to complicated manner, especially as I can't seem to find useful information in the internet. But if this is true, what is the obvious answer here?

Best Answer

$$l=R\tan\alpha\implies dl=\frac{R\,d\alpha}{\cos^2\alpha}.$$

Related Question