# Winter, Beats and Open Office Errors

Not a long while ago, I posted a note on how the northern hemisphere could remain in perpetual winter, if only Earth’s precession rate matched its angular velocity around the sun. Calculating the energy density required integrating a nasty-looking scalar product, and I had claimed that “I do not know of any way to calculate this integral analytically”. This was mainly because I quickly rushed to solving it numerically, without really giving it a good look to see if it can be solved without the use of a computer. It turns out, that it may not be so complicated. We can use very basic trigonometric rules of multiplication of sines and cosines in order to simplify the dot product. I won’t show the math here, but if we mark

$\begin{array}{c} A = -\frac{1}{2}\cos{\varphi}\cos{\eta} \\ B = -\sin{\varphi}\sin{\eta} \\ C = -\frac{1}{2}\cos{\varphi} \end{array}$

then the final result for the dot product is:

$\mathbf{j\cdot \hat{r}_{patch}} = \begin{array}{c} (A+C) \sin{t(\omega_{d}-\omega_{y}+\omega_{p})}+ \\ (A-C) \sin{t(\omega_{d} + \omega_{y} - \omega_{p})} + \\ B \cos{t(\omega_{p} - \omega_{y})} \end{array}$

This is quite an interesting result – it is very much like a beat – a combination of different frequencies inside trigonometric functions. Here we have three different frequencies: Earth’s rotation around its axis, Earth’s orbit around the sun, and Earth’s axial precession. At different values, we get different kinds of interference between the values of the sines, generating pulsating graphs. Beats are usually found in music and acoustics, when sounds from several instruments combine together, and the net result is a combination of the frequencies. This is actually quite nice: one of the more astounding facts of physics is, that despite the vast amount of phenomenon we see and describe around us, the laws and equations are generally the same. In this case, we have surprising similarity between the vibrations that are produced when a flutist and a violinist try to tune their instruments, and the incident energy reaching a given location on Earth when we consider the way that it moves in space. The equations here aren’t exactly the same, because in Earth’s case we also have tilt and latitude, as well as a not-so-simple combination of frequencies. Still, I truly recommend that you take a moment, and consider this aspect of nature; it really is not trivial, and deserves some contemplation.

In any case it follows that the indefinite integral is:

$\int\mathbf{j\cdot \hat{r}_{patch}}dt = \begin{array}{c} -\frac{A+C}{\omega_{d}-\omega_{y}+\omega_{p}} \cos{t(\omega_{d}-\omega_{y} +\omega_{p})}- \\ \frac{(A-C)}{\omega_{d} + \omega_{y} - \omega_{p}} \cos{t(\omega_{d} + \omega_{y} - \omega_{p})} + \\ \frac{B}{\omega_{p} - \omega_{y}} \sin{t(\omega_{p} - \omega_{y})} \end{array}$

The only remaining ordeal now is to figure out when our energy density is smaller than zero. The energy density, after all, is broken up into two parts: when the dot product is smaller than zero, it is nighttime and no energy reaches our portion of Earth, and the integral is equal to zero. After we have found that out, out analytic quest will be complete. Note, however, that I have not yet tried to solve this, and it may turn out to be impossible; this still has to be checked.
What’s more interesting and fun, however, is to play around with the energy density function in a spreadsheet and see how it behaves. First of all, as promised, the beats. This graph was taken for latitude 0, with a large precession in order to show the beat effect. The X axis is time (nevermind in what units) and the Y axis is the energy density:

Note, that if we change the latitude to a non-zero value, the coefficient B suddenly becomes an important factor. For example, for Mediterranean latitudes, we get a deviation from the normal beat:

We will end with one final anecdote. During my fiddling around with the graphs, I wanted to verify that the equations I got yielded correct results for an Earth with precession equal to the yearly rotation. Given out initial position and parameters, we expect to get no energy at all from the sun. However, this is the graph I got:

At first glance, it seems to be anything but zero! Where have we gone wrong? But looking at the values on the Y axis, we see that they do not change at all as we go up or down. This means that the values merely deviate slightly from zero. Very slightly indeed – a quick check shows an error of a measly 10-13! Why is this, and why does the deviation continually grow as the X axis gets bigger? My hypothesis is that this is because of rounding and calculation errors in the sine and cosine functions used by OpenOffice . I do not know how they are implemented, but if it is with Taylor expansion series, large X values may lead to potential loss of data. On the other hand, since the spreadsheet may know explicitly that it is dealing with sine and cosine functions, it might have used the modulo operator early on in order to ease calculations, or it may have used a different mechanism entirely. It might also be that the errors arise just when summing up the entire cell contents, or a combination of both explanations. Since this is open source software, I might take a peek at the code later on. In any case, I find this most amusing, and a reminder to us all as to why analytic solutions are important (in addition to their mathematical beauty when compared to numeric methods, of course; more on that in a later post, perhaps).