But is that the entire story? If the price of beans increases, the workers who are supposed to can the product and distribute it to the supermarkets might need to pay more for their breakfast baked beans as well. Consequently, these workers might ask for higher salaries. This means the cost of workers might also depend on the price of beans.
Mathematically, for a function $f(x,y)$ we compute the partial derivative with respect to $x$ through $\frac{\partial f}{\partial x}$ by holding $y$ constant.
We find the total derivative $\frac{d f}{d x}$ by adding together the direct effect of $x$ and the indirect effect through $y$. Thus $\frac{d f}{d x} = \frac{\partial f}{\partial x} + \frac{\partial f}{\partial y}\frac{d y}{d x}$.
Hope this was useful. If you have any questions or comments, please leave them below.
cheers
Florian
cheers
Florian