Thursday, June 12, 2008

Sinusoid Temperature

Temperatures are very hard to predict. Even weathermen get them wrong most of the times. However, there are some paradises which have a constant temperature range, such as Brazzaville (which is in Congo). Here is the question with the amazing details:

The temperature in Brazzaville is given by the following function:
C = 17 - 6cos(πt/12 + 5)
0 <= t < 24


1. What are the highest and lowest temperatures on Brazzaville?

2. What is the biggest rate of change (biggest drop/rise) in temperature?

To show how people complicate questions, I'm going to answer it using calculus, and then using a much simpler method.

The highest and lowest temperatures are achieved when the derivative of the function is 0, so let's do it:
C' = 6π/12 * sin(πt/12 + 5)
0 = πsin(πt/12 + 5) / 2

Divide by π / 2:
0 = sin(πt/12 + 5)
πt/12 + 5 = π*k (where k is an integer)
πt + 60 = 12πk
πt = 12πk - 60
t = 12k - 60/π

Now all we need to do is find the k values which give t's that match our requirement. Since 60/π is about 19, we need k's that are bigger than 1, so:
t1 = 24 - 60/π = 4.901
t2 = 36 - 60/π = 16.901

To verify which number is a maximum and which is a minimum, we can use the second derivative:
C'' = 6π2/144 * cos(πt/12 + 5)

Plug the t's:
t1 makes it positive, so it's a minimum.
t2 makes it negative, so it's a maximum.

Plug the two t's in the original equation:

C = 17 - 6cos(πt1/12 + 5) = 17 - 6 = 11°C
C = 17 - 6cos(πt2/12 + 5) = 17 - 6(-1) = 23°C

The temperature in Brazzaville ranges between 11°C - 23°C for the entire year. We can only be jealous of them...

To get the biggest rates of change, we need to find the maximum of the derivative, so we'll set the second derivative to zero and find the two points. One will give out a negative change and the other one will give a positive change. They are opposites of each other, since the cosine function is symmetrical on a vertical line going through a maximum or minimum.
C'' = 6π2/144 * cos(πt/12 + 5)
0 = 6π2/144 * cos(πt/12 + 5)
cos(πt/12 + 5) = 0
πt/12 + 5 = ±π/2 + 2πk (again, k is an integer)
πt + 60 = ±6π + 24πk
πt = ±6π + 24πk - 60
t = ±6 + 24k - 60/π

The t values in bounds are:
t3 = 10.901
t4 = 22.901

Plug them in C':
C' = π/2 * sin(πt3/12 + 5) = π/2 = 1.57 °C/hour
C' = π/2 * sin(πt4/12 + 5) = -π/2 = -1.57 °C/hour

So the sharpest temperature changes are 1.57 °C per hour.

This question can be solved using a much easier way: common sense.

The t inside the function is multiplied by π and divided by 12, so plugging in t values from 0 to 24 will give values from 0 to 2π inside the cosine function. This means it goes through an entire cycle from t = 0 to t = 24. With that, we can figure out that the maximum value for the cosine function is 1 and the minimum value is -1. Plug these two numbers and you get:
C = 17 - 1*6 = 11°C
C = 17 - (-1)*6 = 23°C


Also, the cosine function is the "steepest" when it goes through the x-axis, or more accurately, when the argument makes the cosine zero. All we need to do is find when the argument is zero and plug it in the derivative:
πt/12 + 5 = ±π/2 + 2πk

I already solved that, so I'm not going to do it again.

As you can see, thinking outside the box can really help when it comes to such long and tiring functions.

Yours,
Nadav

nadavs

No comments: