By adding all the marginal products at each level of employment of the variable input,…