Final answer:
The possible frequencies for the upper C string are either 517 Hz or 507 Hz, based on the observation of 5 beats per second with a second harmonic of 512 Hz from the middle C string.
Step-by-step explanation:
When a piano tuner observes 5 beats per second while tuning a piano, they hear the interference pattern created by two waves of slightly different frequencies. The fact that the tuner hears 5 beats per second means that the frequency of the upper C string must be either 5 Hz higher or 5 Hz lower than the second harmonic of the middle C, which is 512 Hz. Therefore, the possible frequencies for the upper C string are either 512 Hz + 5 Hz = 517 Hz or 512 Hz - 5 Hz = 507 Hz.