Length of the day

This note is supplementary to a previous one entitled "Sunrise Direction". The same model of Earth with respect to the Sun is used to predict the length of day, on any given day in the year, and anywhere on Earth.

We have three coordinate reference frames to relate, the first one (Frame 1) is the reference frame that has its center at the center of Earth, with the z-axis set perpendicular to the orbital plane (the plane in which the Earth orbits the Sun). Also, the x-axis is selected to point towards the center of the Sun.

The second reference frame (Frame 2) is attached to Earth, centered at the Earth center, with its z-axis along the axis of Earth rotation. The x-axis orientation, results naturally when we look at this frame as being the result of two consecutive geometric rotations, the first is about the z-axis (of the orbital plane). And the second is about the y-axis of the frame resulting from the first rotation.

Finally, the third frame (Frame 3), is the frame attached to a moving point on the surface of Earth, with its three axes pointing towards the standard directions of local East, local North, and local Vertical. Thus, let r1=[x1,y1,z1]T r_1 = [x_1, y_1, z_1 ]^T be the coordinate vector in the orbital plane, and r=[x,y,z]T r' = [x', y', z' ]^T be the corresponding coordinate vector in the frame resulting from the first rotation, and let r2=[x2,y2,z2]T r_2 = [x_2, y_2, z_2 ]^T be the corresponding coordinate vector in Frame 2. We can relate these three vectors as follows

r1=Rr r_1 = R' r'

where R R' is the rotation matrix about the z-axis by an angle ϕ \phi , and is given by

R=[cosϕsinϕ0sinϕcosϕ0001] R' = \begin{bmatrix} \cos \phi && -\sin \phi && 0 \\ \sin \phi && \cos \phi && 0 \\ 0 && 0 && 1 \end{bmatrix}

In addition,

r=Ryr2 r' = R_y r_2

where Ry R_y is the rotation matrix about the y-axis by an angle θ \theta , and is given by

Ry=[cosθ0sinθ010sinθ0cosθ] R_y = \begin{bmatrix} \cos \theta && 0 && \sin \theta \\ 0 && 1 && 0 \\ -\sin \theta && 0 && \cos \theta \end{bmatrix}


r1=RRyr2=R1r2 r_1 = R' R_y r_2 = R_1 r_2


R1=RRy=[cosϕcosθsinϕcosϕsinθsinϕcosθcosϕsinϕsinθsinθ0cosθ] R_1 = R' R_y = \begin{bmatrix} \cos \phi \cos \theta && -\sin \phi && \cos \phi \sin \theta \\ \sin \phi \cos \theta && \cos \phi && -\sin \phi \sin \theta \\ -\sin \theta && 0 && \cos \theta \end{bmatrix}

Next, we consider Frame 3. We note that the unit vectors pointing East and North and Vertically Up, at a given point that has a latitude of (90θL) (90^{\circ} - \theta_L ) is given by

vEast=[sinϕt,cosϕt,0]T v_{East} = [ - \sin \phi_t , \cos \phi_t , 0 ]^T


vNorth=[cosθLcosϕt,cosθLsinϕt,sinθL]T v_{North} = [ - \cos \theta_L \cos \phi_t , - \cos \theta_L \sin \phi_t, \sin \theta_L ]^T


vVertical=[sinθLcosϕt,sinθLsinϕt,cosθL]T v_{Vertical} = [ \sin \theta_L \cos \phi_t, \sin \theta_L \sin \phi_t, \cos \theta_L]^T

Where ϕt \phi_t is the rotation angle counterclockwise from the x-axis of the Earth reference frame.
Together, these three vectors form an orthornormal basis for the reference frame we name Frame 3, and can written with respect to frame 2 as

R2=[vEast,vNorth,vVertical] R_2 = [ v_{East}, v_{North}, v_{Vertical} ]


R2=[sinϕtcosθLcosϕtsinθLcosϕtcosϕtcosθLsinϕtsinθLsinϕt0sinθLcosθL] R_2 = \begin{bmatrix} -\sin \phi_t && -\cos \theta_L \cos \phi_t && \sin \theta_L \cos \phi_t \\ \cos \phi_t && - \cos \theta_L \sin \phi_t && \sin \theta_L \sin \phi_t \\ 0 && \sin \theta_L && \cos \theta_L \end{bmatrix}

Now, in the orbital reference frame (Frame 1), the direction to the Sun is pointing in the positive x-direction,

u1=[1,0,0]T u_1 = [1, 0, 0]^T

It follows that the direction of the sun , when expressed with respect to Frame 3, is related to u1 u_1 , by

u1=R1R2u3 u_1 = R_1 R_2 u3 From which

u3=R2TR1Tu1 u_3 = R_2^T R_1^T u_1

Being a rotation matrix, the inverse of Ri R_i is its transpose. Performing the indicated multiplication, results in u3 u_3

u3=[sinϕtcosϕt0cosθLcosϕtcosθLsinϕtsinθLsinθLcosϕtsinθLsinϕtcosθL][cosϕcosθsinϕcosϕsinθ] u_3 = \begin{bmatrix} - \sin \phi_t && \cos \phi_t && 0 \\ - \cos \theta_L \cos \phi_t && -\cos \theta_L \sin \phi_t && \sin \theta_L \\ \sin \theta_L \cos \phi_t && \sin \theta_L \sin \phi_t && \cos \theta_L \end{bmatrix} \begin{bmatrix} \cos \phi \cos \theta \\ -\sin \phi \\ \cos \phi \sin \theta \end{bmatrix}

u3=[cosϕcosθsinϕtsinϕcosϕtcosϕcosθcosθLcosϕt+sinϕcosθLsinϕt+cosϕsinθsinθLcosϕcosθsinθLcosϕtsinϕsinθLsinϕt+cosϕsinθcosθL] u_3 = \begin{bmatrix} - \cos \phi \cos \theta \sin \phi_t - \sin \phi \cos \phi_t \\ - \cos \phi \cos \theta \cos \theta_L \cos \phi_t + \sin \phi \cos \theta_L \sin \phi_t + \cos \phi \sin \theta \sin \theta_L \\ \cos \phi \cos \theta \sin \theta_L \cos \phi_t - \sin \phi \sin \theta_L \sin \phi_t + \cos \phi \sin \theta \cos \theta_L \end{bmatrix}

Now, at sunrise , the z-component of this vector is zero, because the Sun will be coming from the horizon. So we need to solve for ϕt \phi_t that will result in zero z-component of u3 u_3 . To that end, let

a=cosϕcosθsinθL a = \cos \phi \cos \theta \sin \theta_L

b=sinϕsinθL b = -\sin \phi \sin \theta_L

c=cosϕsinθcosθL c = \cos \phi \sin \theta \cos \theta_L


u3z=acosϕt+bsinϕt+c=0 u_{3z} = a \cos \phi_t + b \sin \phi_t + c = 0

Define ψ \psi to be the angle with cosψ=a/a2+b2 \cos \psi = a / \sqrt{a^2+b^2} and sinψ=b/a2+b2 \sin \psi = b / \sqrt{a^2 + b^2} , then

a2+b2cos(ϕtψ)+c=0 \sqrt{a^2+b^2} \cos (\phi_t - \psi) + c = 0

This raised-cosine crosses from negative to positive at

ϕt=ψcos1(c/a2+b2) \phi_t = \psi - \cos^{-1} (- c / \sqrt{a^2+b^2} )

This corresponds to sunrise, and it crosses from positive to negative at

ϕt=ψ+cos1(c/a2+b2) \phi_t = \psi + \cos^{-1} (- c / \sqrt{a^2+b^2} )

And this corresponds to sunset.

Therefore, the angle swing between sunrise and sunset is given by

Δϕt=2cos1(c/a2+b2) \Delta \phi_t = 2 \cos^{-1} (- c / \sqrt{a^2+b^2} )

Since ϕt \phi_t changes linearly with time, and since it covers 2π 2 \pi in T=23.934471 T=23.934471 hours (this is called a stellar day), it follows that the length of the day is given by

DayLength=T(Δϕt/(2π)) Day Length = T ( \Delta \phi_t / (2 \pi ) )

Using the expressions for a,b,c a, b, c , and simplifying, results in

DayLength=(T/π)cos1(cotθLsinθcosϕsin2ϕ+cos2ϕcos2θ) Day Length = (T / \pi ) \cos^{-1} ( \frac{- \cot \theta_L \sin \theta \cos \phi} {\sqrt{\sin^2 \phi + \cos^2 \phi \cos^2 \theta } } )

As an example, to compute the day length, in Ottawa, on December 13th, compute angle ϕ \phi from the number of days that have passed since June 21st, and this number is 175 days. Hence

ϕ=(175/365.25)360=172.48 \phi = -(175/365.25) * 360^{\circ} = - 172.48^{\circ}

And since Ottawa has a latitude of 45.42 45.42^{\circ} North of the Equator, then

θL=9045.42=44.58 \theta_L = 90^{\circ} - 45.42^{\circ} = 44.58^{\circ}

In addition,

θ=23.44 \theta = 23.44^{\circ}

Substituting these values in the above equation, and performing the numeric calculations, results in

DayLength=(T/π)cos1(0.435486)=8.53447Hours Day Length = (T / \pi ) \cos^{-1} (0.435486) = 8.53447 Hours

That is, 8 Hours, and 32 Minutes.

The actual Sunrise in Ottawa was at 7:34 am and Sunset is at 4:20 pm, making the day length = 16:20 - 7:34 = 15:80 - 7:34 = 8:46 , i.e. 8 Hours and 46 minutes.

The difference (about 14 minutes, i.e. 2.7% 2.7 \% error) is due to factors we've ignored like refractions of the sun rays in the atmosphere, and also that our calculation assumes a fixed angle ϕ \phi .

Note by Hosam Hajjir
6 years, 7 months ago

No vote yet
1 vote

  Easy Math Editor

This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.

When posting on Brilliant:

  • Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused .
  • Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone.
  • Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge.
  • Stay on topic — we're all here to learn more about math and science, not to hear about your favorite get-rich-quick scheme or current world events.

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold

- bulleted
- list

  • bulleted
  • list

1. numbered
2. list

  1. numbered
  2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1

paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
    # 4 spaces, and now they show
    # up as a code block.

    print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in \( ... \) or \[ ... \] to ensure proper formatting.
2 \times 3 2×3 2 \times 3
2^{34} 234 2^{34}
a_{i-1} ai1 a_{i-1}
\frac{2}{3} 23 \frac{2}{3}
\sqrt{2} 2 \sqrt{2}
\sum_{i=1}^3 i=13 \sum_{i=1}^3
\sin \theta sinθ \sin \theta
\boxed{123} 123 \boxed{123}


There are no comments in this discussion.


Problem Loading...

Note Loading...

Set Loading...