In an intertemporal (2-period) consumption model, why is the investment rate independent of discount factor? In lecture, my professor defined the following 2-period consumption model:
$c_i = $ consumption in period $i$.
$y =$ endowed income in period 1.
$r = $ interest rate in perfect credit markets.
$h = $ money invested in period 1.
$w(h) = $ period 2 return on money invested in period 1.
$U(c_1, c_2) = u(c_1) + \beta u(c_2)$ an additively separable utility function with discount factor $\beta$.
Then the budget constraint is $$c_1 + \frac{c_2}{1+r} = y - h + \frac{w(h)}{1+r}$$ so the Lagrangian for utility maximization is $$L = u(c_1) + \beta u(c_2) + \lambda \left( y - h + \frac{w(h)}{1+r} - c_1 - \frac{c_2}{1+r} \right).$$ But then $h^*$ is determined entirely by one of the first order conditions, $$L_h = \frac{w'(h)}{1+r} - 1 = 0,$$ which is independent of $\beta$.
My professor said that this means &quot;patient and impatient people invest the same amount $h^*$, maximizing the net present value of income.&quot; Mathematically, I understand why this has to be true, but intuitively it doesn't make sense. If $\beta = 0$, for example, shouldn't we invest $h=0$ because all consumption in the future provides 0 utility? Why doesn't similar reasoning apply to very small $\beta$? And why would we be trying to maximize the NPV of income if income in the first period provides more utility than income in the second period?
This idea is known as the Fisher separation theorem.
Without the investment opportunity to transfer $h$ units of present day value into $w(h)$ units of future value, the perfect credit market gives us the intertemporal budget constraint of
$$
c_1 + \frac{c_2}{1+r} = y,
$$
which can be represented by a straight line.

Without knowledge of the consumer's preferences, it is not possible to say what the optimal $(c_1,c_2)$ is here. But we can say with certainty, that the higher the budget line is, the more options the consumer has, and assuming monotonic preferences she will be better off.
Now the yield curve $w$ of the investment opportunity allows us to shift the basic credit market budget line. Starting from the lower right point of $(y,0)$ (i.e. not putting money into the credit market at all) we can reach cash flows $(y-h, w(h))$.

But by also putting some money into the credit market (or borrowing), one can reach other cash flows as well. These always transfer $x$ units of present value into $x(1+r)$ units of future value (in case of borrowing $x$ is negative), so they are always paralel to the original budget line, but instead of starting from $(y,0)$, they start from the point $(y-h, w(h))$ where $h$ is the size of the investment.
The optimal investment size is the one that reaches the highest budget line:


The idea is that given perfect credit markets one can separate consumption behavior and investment behavior. The higher the net present value of my cash flow, the better of I will be once I adjust my cash flow via the credit market to my intertemporal preferences (this is where $\beta$ matters). Thus I need to make investment decisions that maximize the present value of my cash flow, and I do not have to take anything else into consideration, e.g., the timing of the payments.

A mathematical tidbit:
In the above example, given the optimal $h$ (assuming it is an interior point) the budget line is tangential to the orange curve depicting the possible investments, so we have
$$
w'(h) = 1 + r,
$$
the marginal yield from the investment and the credit market are equal. This is equivalent to the final equation in your question.