The paper offers a complete mathematically rigorous analysis of the welfare-maximizing capital investment and resource depletion policies in the Dasgupta—Heal—Solow—Stiglitz model with capital depreciation and any returns to scale. We establish a general existence result and show that an optimal admissible policy may not exist if the output elasticity of the resource equals one. We characterize the optimal policies by applying an appropriate version of the Pontryagin maximum principle for infinite-horizon optimal control problems. We also discuss general methodological pitfalls arising in infinite-horizon optimal control problems for economic growth models, which are not paid due attention in the economic literature so that the results presented there often seem not to be rigorously justified. We finish the paper with an economic interpretation and a discussion of the welfare-maximizing policies.