I recently learned about buck and boost converters. Both are switched-mode power supplies. Until recently, I had the impression that the duty cycle and input voltage determine the output voltage for both types of converters. For example, wikipedia states that Vout / Vin = 1 / (1 - D), where D is the duty cycle. This formula assumes that all components are ideal (in particular, the resistance of the inductor is neglected). I assume that this is an oversimplification that causes a discrepancy with reality. Likewise, in a buck converter I would expect the output voltage to equal the duty cycle times the input voltage.
In practice, most converters use a voltage divider and feedback mechanism to ensure that the voltage stays constant when the load changes. Why is this necessary? What mechanism causes the voltage to change when the load changes?