To calculate the length of a string based on its fundamental and harmonic wavelengths, you can use the equation:
L = (n * λ) / 2
where: L is the length of the string, n is the harmonic number (1 for the fundamental frequency, 2 for the first harmonic, 3 for the second harmonic, and so on), and λ is the wavelength of the corresponding harmonic.
In this equation, it is assumed that the string is fixed at both ends and vibrating in a standing wave pattern. The fundamental frequency corresponds to the first harmonic, the first overtone corresponds to the second harmonic, the second overtone corresponds to the third harmonic, and so on.
Keep in mind that this equation assumes a few idealized conditions, such as uniform string density and tension, as well as neglecting any effects of string stiffness or damping. In real-world situations, these factors can influence the relationship between wavelength and string length.