# Applying dynamic programming to constrained utility

I am trying to solve problem that looks like this; there is utility function that takes $$x$$ and $$y$$ as inputs, $$x$$ is produced by production function that depends on labor $$l+y=1$$. $$x, y$$ depend on $$t$$ but I dropped $$(t)$$ from $$x(t)$$ to make it more readable.

$$\max_{x,y} V(0) = \int_0^{\infty} e^{\rho t}AU(x,y)dt \quad where \quad U(x,y)= x^{\beta}y^{1-\beta} \quad \text{s.t.} \quad x=f(1-y)=z(1-y)^{\alpha} -c$$

I know that on conceptual level I can use Hamiltonian. Using generic functions that gives me:

$$H(x,y,t,\mu) = e^{\rho t}AU(x,y) + \mu f(1-y)$$

when I substitute functions I get:

$$H(x,y,t,\mu) = e^{\rho t}Ax^{\beta}y^{1-\beta} + \mu \left(z(1-y)^{\alpha} -c \right)$$

If I understand my textbook correctly I need to find values such that $$H'(x^*,y^*,t) = -\mu'$$, but I am not sure if I understood it correctly. There are also supposed to be transversality conditions in scenarios when $$\mu \geq 0$$ and $$\mu =0$$ but how can I check that in a problem without numbers?

Can someone please give me explanation how to solve the problem above?

• Your problem seems a bit ill defined. Where does $k$ come from? Is it the stock of capital. If so, then you should add a law of motion that determines how capital changes over time. If not, it should be part of the decision variables. But then, there should be some budget constraint to limit the possible values of $y$ and $k$. What is $c$?
– tdm
Commented Aug 18, 2023 at 8:51
• @tdm you are right I made mistake because I accidentally combined 2 problems in one... sorry posted this problem late in evening, I edited it. There shouldn't be $k$ in this problem, there should only be labor (1-y) because y is free time and x is some good produced by labor. $c$ is just a constant because it is assumed that at least some minimum amount of good x has to be produced so people don't starve... please let me know if more clarification is needed Commented Aug 18, 2023 at 19:14
• As I see it, you do not really have a dynamic optimization problem, as you have no intertemporal constraint (law of motion). You can easily solve it by looking at the optimal amount of $x$ and $y$ at every moment in time: $\max AU(x,y)$ subject to $x = f(1-y)$.
– tdm
Commented Aug 21, 2023 at 7:06
• @tdm so I do not need hamiltonian? but y and x are function of t I just simplified the notation it is actually x(t) and y(t) Commented Aug 22, 2023 at 17:46
• Indeed. If your objective function is additively separable and if your constraints have no cross-time restrictions, then the best thing you can do is simply optimize at every period in time.
– tdm
Commented Aug 23, 2023 at 7:15

You try to solve $$\max_{x,y} \int_0^\infty e^{-\rho t} A U(x,y) \textrm{d} t$$ where $$U(x,y) = x^\beta y^{1-\beta}$$ and $$x = z(1-y)^\alpha - c$$. (I think there should be a minus sign in front of $$\rho$$).
There is no intertemporal constraint, so one can solve this model by simply maximizing each period instantaneous utility function: $$\max_{x,y} A x^\beta y^{1-\beta} \text{ s.t. } x = z(1-y)^\alpha - c$$ Substituting the constraint into the objective gives: $$\max_y A (z(1-y)^\alpha - c)^\beta y^{1 - \beta}.$$ The first order condition gives: $$-A \beta (z(1-y)^\alpha - c)^{\beta - 1} \alpha(1-y)^{\alpha-1}y^{1 - \beta} + A(z(1-y)^{\alpha} - c)^\beta (1-\beta) y^{-\beta} = 0.$$ This can be simplified to: $$\frac{(1-y)^{\alpha - 1}y}{z(1-y)^\alpha - c} = \frac{1-\beta}{\beta}.$$ I don't think this has a closed form solution.
Anyway, the level of $$x$$ and $$y$$ in very time period will be constant.