
Patrick B. answered 10/18/19
Math and computer tutor/teacher
starting temp:
2 C at the poles
24 C at the equator
0-200 m is level 1
200 - 1000 is level 2
below 1000 is level 3
[0,90] is the latitude where 45 is the equator
starting temp range = 22 while latitute ranges 45.
slope is 22/45
(45,24) is the max point
point slope form is:
(y - 24) = (22/45)(x-45)
y = (22/45)(x-45) + 24
(22/45)(x)- (22/45)(45) +24
(22/45)x + 2
is the slope intercept form...
next [0,90] needs to be mapped to [0,45]
with (0,0) , (45,45) and (90,0)
it is {
x if 0<=x<=45
90-x if 45<=x<=90
}
So the function is:
temp(x, L) =
{
(22/45)x +2 - (L-1)*m if 0<=x<=45
(22/45)(90-x) + 2 - (L-1)*m if 45 <=x <= 90
}
where x=[0,90] is the latitude and L is the level={1,2,3}
Note that m is the parameter that specifies how much
the temperature drops for each level.