some typos

This commit is contained in:
Fang Liu
2025-04-22 15:19:44 +08:00
parent 36895faafe
commit ed1d92197a
8 changed files with 20 additions and 20 deletions

View File

@@ -280,7 +280,7 @@ plot!(h, label="h")
A model for the length of a day in New York City must take into account periodic seasonal effects. A simple model might be a sine curve. However, there would need to be many modifications: Obvious ones would be that the period would need to be about $365$ days, the oscillation around $12$ and the amplitude of the oscillations no more than $12$.
We can be more precise. According to [dateandtime.info](http://dateandtime.info/citysunrisesunset.php?id=5128581) in $2015$ the longest day will be June $21$st when there will be $15$h $5$m $46$s of sunlight, the shortest day will be December $21$st when there will be $9$h $15$m $19$s of sunlight. On January $1$, there will be $9$h $19$m $44$s of sunlight.
We can be more precise. According to [dateandtime.info](http://dateandtime.info/citysunrisesunset.php?id=5128581) in $2015$ the longest day will be June $21$st when there will be $15$h $8$m $55$s of sunlight, the shortest day will be December $21$st when there will be $9$h $18$m $23$s of sunlight. On March $21$st, there will be $12$h $13$m $42$s of sunlight.
A model for a transformed sine curve is
@@ -294,12 +294,12 @@ Where $b$ is related to the amplitude, $c$ the shift and the period is $T=2\pi/d
```{julia}
a = 12
b = ((15 + 5/60 + 46/60/60) - (9 + 19/60 + 44/60/60)) / 2
a = 12 + 13/60 + 42/60/60
b = ((15 + 8/60 + 55/60/60) - (9 + 18/60 + 23/60/60)) / 2
d = 2pi/365
```
If we let January $1$ be $x=0$ then the first day of spring, March $21$, is day $80$ (`Date(2017, 3, 21) - Date(2017, 1, 1) + 1`). This day aligns with the shift of the sine curve. This shift is $80$:
If we let January $1$st be $x=0$ then the first day of spring, March $21$st, is day $80$ (`Date(2015, 3, 21) - Date(2015, 1, 1) + Day(1)`). This day aligns with the shift of the sine curve. This shift is $80$:
```{julia}
@@ -314,15 +314,15 @@ newyork(t) = up(stretch(over(scale(sin, d), c), b), a)(t)
plot(newyork, -20, 385)
```
To test, if we match up with the model powering [dateandtime.info](http://dateandtime.info/citysunrisesunset.php?id=5128581) we note that it predicts "$15$h $0$m $4$s" on July $4$, $2015$. This is day $185$ (`Date(2015, 7, 4) - Date(2015, 1, 1) + 1`). Our model prediction has a difference of
To test, if we match up with the model powering [dateandtime.info](http://dateandtime.info/citysunrisesunset.php?id=5128581) we note that it predicts "$12$h $10$m $38$s" on September $23$th, $2015$. This is day $266$ (`Date(2015, 9, 23) - Date(2015, 1, 1) + Day(1)`). Our model prediction has a difference of
```{julia}
datetime = 15 + 0/60 + 4/60/60
delta = (newyork(185) - datetime) * 60
datetime = 12 + 10/60 + 38/60/60
delta = (newyork(266) - datetime) * 60
```
This is off by a fair amount - almost $12$ minutes. Clearly a trigonometric model, based on the assumption of circular motion of the earth around the sun, is not accurate enough for precise work, but it does help one understand how summer days are longer than winter days and how the length of a day changes fastest at the spring and fall equinoxes.
This is off by a fair amount - almost $8$ minutes. Clearly a trigonometric model, based on the assumption of circular motion of the earth around the sun, is not accurate enough for precise work, but it does help one understand how summer days are longer than winter days and how the length of a day changes fastest at the spring and fall equinoxes.
##### Example: the pipeline operator