This paper presents a model of resource extraction based on two of its key aspects: investment and taxation. A mining firm is considered which may be in an environment of perfect competition or have a monopoly. It plans to extract from a fixed stock of resources. Before extraction begins, the firm must invest in capital goods, the amount of which depends on the desired maximum quantity of extraction. The net present value of the resource extracted is then maximized, i.e. profits after taxes minus capital costs after taxes and depreciation. The necessary conditions for an optimal time path of extraction are derived from results well-known in control theory. Such a path starts with a phase of constant extraction at the capacity limit,, followed by a phase in which the amounts of resource extracted decrease. The reaction of such a path to changes in tax and depreciation rates is analyzed. Only an income tax with immediate write-off of capital costs keeps the extraction path the same for all tax rates. If no depreciation is allowed or straight-line depreciation applies, different tax rates result in different capacity limits and lengths of extraction periods. Continuous extraction paths satisfying the necessary conditions are optimal not only if the capital stock function is convex, but also if the function is concave and steep in relation to the profit function. In both cases, the company will react to a higher tax rate or lower present value of depreciation allowances by choosing a smaller capacity and a longer extraction phase. Finally, the existence of such optimal extraction paths is discussed with an example.