Solution (source code)

= Solution

An additional tonne changes eventual <temperature> by approximately $\delta T=\kappa$. Linearizing the damage function gives $\delta L(t')=\kappa\gamma D_0W(t')T(t')^{\gamma-1}$. Put $s=t'-t$, $W(t+s)=W(t)e^{gs}$, and hold $T$ approximately fixed across the effective discount horizon. The <discounted integral> is
$$
S(t)\simeq\kappa\gamma D_0W(t)T(t)^{\gamma-1}\int_0^\infty e^{-(r-g)s}ds,
$$
so
$$
\boxed{S(t)\simeq\frac{\kappa\gamma D_0W(t)T(t)^{\gamma-1}}{r-g},\qquad r>g.}
$$
If $r\le g$, this infinite-horizon approximation diverges; a finite result then needs different growth, damages or discounting assumptions. It also treats the marginal warming from the extra tonne as effectively persistent over the relevant horizon.