Are night and day lengths over a year equal everywhere on earth? (Question from math.stackexchange, because people told me to better ask here:
Original link)
As you all know, in winter the nights are longer and there is nearly no sun, but in the summer there are really long days.
If you look at different places over the world, you find strange things like a 3 month day in summer with 3 months of darkness in the winter when you keep going north or south enough.
The question I asked myself was:
Question: Is the overall length of day equal to the overall length of night over the time span of one year (thus half of the year for both) at any specific point on earth?
I tried to solve this analytically, but looking at complex trigonometric function that include the earth rotating around its tilted axis around sun lead to nowhere.
However, I noticed that when looking at mountains / high buildings, the overall day length becomes longer, thus this question is meant for a spherical earth with no altitude differences.
 A: The length of day depends on two parameters:


*

*the latitude $\phi$ of the observer 

*the current day of year
We can represent the trajectory of the sun from the point of view of an observer on Earth by a solar circle that intersects Earth's plane. See figure below:

In red is Earth's circle, and the solar circle is divided in two parts:


*

*the blue part corresponds to the night (sun is below the horizon)

*the black part corresponds to the day time (sun is above the horizon)
This representation is valid only 1. during the equinoxes and 2. only at the North Pole: 


*

*As time passes, the solar circle shifts away from the Earth's circle, along the obliquity of the ecliptic $\epsilon=23.439°$. This shift is upward during the summer, and downward during the winter.

*If we leave the North Pole the solar circle tends to be tilted along the West-East axis. At the equator, the solar circle is exactly perpendicular to the Earth's plane.
Let $\epsilon$ be the axial obliquity of the ecliptic of Earth, $\phi$ the latitude of the observer and $n_d \in [0;364]$ the current day of year, $n_d=0$ corresponding to the winter solstice. 
We use a unit circle (radius = 1) to model both the Solar circle and Earth circle.
We can use this representation and parametrize the geometry in order to determine the length of the segment $m(\phi,n_d)$ at any latitude $\phi$ and any day of year $n_d$. The length of $m$ with respect to the diameter of the solar circle will allow us to determine the length of day. 
When the sun is at its zenith, the angle between the observer's zenith  and the position of the sun is:
\begin{equation}
\delta \Phi = 90 - \phi - \mathrm{cos}\left( \pi \cdot \dfrac{n_d}{365.25 / 2} \right) \epsilon
\end{equation}
Thus, the angle $\delta \theta$ between the solar circle and sun's zenith is $\delta \Phi + \phi$, i.e.:
\begin{equation}
\delta \theta = 90 - \mathrm{cos}\left( \pi \cdot \dfrac{n_d}{365.25 / 2} \right) \epsilon
\end{equation}
We aim to determine the fraction of the radius corresponding to the exposed part of the sun's circle, i.e.:
\begin{equation}
m = 1 + \mathrm{tan}(\phi) t
\end{equation}
Where $t$ is the distance between the observer and the center of the sun's circle; given by:
\begin{equation}
t = \mathrm{cos}(\delta \theta) d
\end{equation}
Where $d$ is the distance from observer to the sun's zenith, given by:
\begin{equation}
d = \dfrac{1}{\mathrm{sin}(\delta \theta)}
\end{equation}
Hence the exposed fraction of the solar circle is determined by:
\begin{equation}
m = 1 - \dfrac{\mathrm{tan}(\phi)}{\mathrm{tan}(\delta \theta)}
\end{equation}
With $0 \leq m \leq2$. When $m=2$, the sun circle does not intersect with Earth's surface, thus the sun is shining in the sky the whole day: this is polar summer.
When $m=0$, the sun circle is completely below the horizon: it is polar winter.
The angle between the center the of sun circle and the sunrise/sunsets points on the solar circle is:
\begin{equation}
f = \mathrm{acos}(1 - m)
\end{equation}
And finally the exposed fraction of the sun's circle is:
\begin{equation}
b=f /\pi
\end{equation}
We can multiply this quantity per 24 to obtain the day length (duration for which the sun is above horizon).
Using trigonometry, the above formulas simplify into:

\begin{equation} \large b(\phi, n_d) = \mathrm{acos}\left(
 \mathrm{tan}(\phi) \mathrm{tan}(\epsilon \cdot \mathrm{cos}(0.0172
 \cdot n_d)) \right) / \pi \end{equation}

Where $0.0172=\pi / 182.625$ (see first equation)
I produced the curves corresponding to this relation for different values of the latitude from $\phi = 0°$ to $\phi=+90°$, with respect to the day of year.

In black is the curve corresponding to $\phi=48°$ (e.g. Paris, France.) where the length of day oscillates between 8 hours (winter) and 16 hours (summer).
In red is the curve corresponding to $\phi =70°$ (e.g. Hammerfest, Norway) where the sun never sets for approximately 10 weeks during summer, and never rises for the same duration during winter.
Your question is about the overall length of day over the span of one year. The answer is given graphically by this figure, where you can see that the summer variations of the length of day are completely symetrical with respect to the winter variations.
If you average the length of day over one year, whatever is the value of the latitude $\phi$, the mean length of day is exactly 12 hours. That is true everywhere on Earth.

Notes: 


*

*The actual definitions of day and night are more subtile than what I used here. See Twilight - Wikipedia.


Definition of night used here: sun below horizon ($\theta = 0°$)
Civil dusk:  sun $6°$ below horizon.
Nautical dusk: sun $12°$ below horizon.
Astronomical dusk: sun $18°$ below horizon.
This discrepancy in definitions of the night is due to the fact that the sun continues to illuminate the sky even when it is not directly visible, due to sunlight scattering by the atmosphere.


*I supposed that Earth is perfectly spheric, which is not exactly true.

A: The total time of day and night when averaged over the entire solar year will only be equal in regions close to the equator. In regions close to the poles, the ratio deviates strongly towards more daytime. 
For example, this graph of day/night times in Oslo clearly shows that the city experiences way more daytime as compared to night time. However Singapore experiences almost equal amounts of both.
