<p>Consider the problem:
<span class="math-container">$$
\begin{align*}
\max_{u} \int_0^T f(x(t), u(t)) dt&amp; \\
\text{ s.t. } &amp;\dot x = g(x(t), u(t)),\\
&amp;\text{ + boundary conditions}
\end{align*}
$$</span></p>
<p>Assume that <span class="math-container">$g(x,u)$</span> and <span class="math-container">$f(x,u)$</span> are independent of <span class="math-container">$t$</span> (given <span class="math-container">$x$</span> and <span class="math-container">$u$</span>). The Hamiltonian is given by:
<span class="math-container">$$
H(x(t), u(t)) = f(x(t), u(t)) + \lambda(t)  g(x(t), u(t))
$$</span>
The first order conditions give:
<span class="math-container">$$
\begin{align*}
&amp;f_u + \lambda g_u = 0,\\
&amp;\dot \lambda = - f_x - \lambda g_x\\
&amp;\text{and some transversality conditions}
\end{align*}
$$</span>
Now consider the Hamiltonian
<span class="math-container">$$
H(x(t), u(t)) = f(x(t), u(t) + \lambda(t) g(x(t), u(t)).
$$</span>
Then:
<span class="math-container">$$
\begin{align*}
\frac{d}{dt} H(x(t), u(t)) &amp;= (f_x + \lambda g_x)\dot x + \underbrace{(f_u + \lambda g_u)}_{=0} \dot u + g(x(t), u(t)) \dot \lambda,\\
&amp;= \dot x(f_x + \lambda g_x)  + g(x(t), u(t)) \underbrace{(-f_x - \lambda g_x)}_{=\dot \lambda_t},\\
&amp;= \underbrace{(\dot x - g(x(t), u(t))}_{=0} (f_x + \lambda g_x),\\
&amp;= 0
\end{align*}
$$</span>
This shows that <span class="math-container">$H$</span> does not change with <span class="math-container">$t$</span>, so it remains constant over time. The exact value is usually determined by the transversality conditions.</p>

CC BY-SA 4.0
2023-10-02T09:55:35.083Z
Hi tdm, I put $e^{-t}$ before the $f$ in the title but I forgot to include in the main text. However, I believe your solution still works. I tried it with your method above. Is my understanding correct?
dodo
CC BY-SA 4.0
2023-10-02T05:25:31.257Z
2023-10-02T05:25:31.257Z
tdm
<p><span class="math-container">$\max_{x(t),u(t)}\int _0^Te^{-t}f(x(t),u(t))dt$</span>,</p>
<p>st derivative <span class="math-container">$x_t=g(t,x(t),u(t))$</span>. Prove that <span class="math-container">$H$</span> is constant.</p>
<p>My try2:</p>
<p>consider the Hamiltonian
<span class="math-container">$$
H(x(t), u(t)) = e^{-t}f(x(t), u(t)) + \lambda(t) g(x(t), u(t)).
$$</span>
Then:
<span class="math-container">$$
\begin{align*}
\frac{d}{dt} H(x(t), u(t)) &amp;= (e^{-t}f_x + \lambda g_x)\dot x + \underbrace{(H_u)}_{=0} \dot u + g(x(t), u(t)) \dot \lambda,\\
&amp;= \dot x(e^{-t}f_x + \lambda g_x)  + g(x(t), u(t)) \underbrace{(-e^{-t}f_x - \lambda g_x)}_{=\dot \lambda_t},\\
&amp;= \underbrace{(\dot x - g(x(t), u(t))}_{=0} (e^{-t}f_x + \lambda g_x),\\
&amp;= 0
\end{align*}
$$</span></p>
<p>References: Chiang (1992), <a href="https://people.stfx.ca/tleo/advmacrolec3.pdf" rel="nofollow noreferrer">https://people.stfx.ca/tleo/advmacrolec3.pdf</a></p>

CC BY-SA 4.0
2023-10-01T11:45:47.630Z
What is the exact text of the problem?  I suppose that '$g$ is independent of $t$' doesn't mean that $g$ is constant with respect to $t$ (otherwise, why put $t$ amoing the independent variables?), but that the function $g$ is always the same, irrespective of $t$
BakerStreet
CC BY-SA 4.0
2023-10-01T15:32:46.180Z
@BakerStreet The context is the current value Hamiltonian and shadow price in macroeconomics.
dodo
CC BY-SA 4.0
2023-10-01T15:41:35.600Z
Yes, I know, I said the **text** of the problem, if it is an exercise. I think that the text of the problem doesnt't say you that $g$ is constant, but that we have always the same function $g$ as time $t$ varies.
BakerStreet
CC BY-SA 4.0
2023-10-01T15:48:42.747Z
@BakerStreet The exact expression is "g is independent of $t$". I will try to find its precise/rigorous meaning.
dodo
CC BY-SA 4.0
2023-10-01T19:33:53.547Z
Ok, moreover, even if the value of $g$ is indipendent of $t$, this means that it doesn't depend 'separately' on $t$, but can depend on $t$ through $x(t)$ and $u(t)$, it doesn't mean that it is independent of $x(t)$ and $u(t)$. This is the case when a differential equation is said *autonomous*, that is, it does't depend on $t$ separately. I don't know what is $x_t$ in the question, I suppose the derivative of $x(t)$ with respect to time, as you wrote 'derivative' before it.
BakerStreet
CC BY-SA 4.0
2023-10-01T19:41:59.113Z
@BakerStreet Yes, $H_t$ means the derivative $\partial H/\partial t$. I am trying to hard to differentiate between "independence“ and "autonomous". Bear with me for a few hours.
dodo
CC BY-SA 4.0
2023-10-01T20:04:48.360Z
Of course, I'm triyng only to make clearer the question.  I referred to the language of differential equations, but I don't want confuse you.
BakerStreet
<macroeconomics><consumer-theory><theory><optimal-control>
$H$ is a constant? Maximizing: $\int _0^Te^{-t}f(x,u)dt$ st $x_t=g(t,x,u)$ and $g$ is independent of $t$
dodo
# $H$ is a constant? Maximizing: $\int _0^Te^{-t}f(x,u)dt$ st $x_t=g(t,x,u)$ and $g$ is independent of $t$

(Asked by: username_0 on 2023-09-30)

$\max\_{x(t),u(t)}\int \_0^Te^{-t}f(x(t),u(t))dt$,

st derivative $x\_t=g(t,x(t),u(t))$. Prove that $H$ is constant.

My try2:

consider the Hamiltonian
$$
H(x(t), u(t)) = e^{-t}f(x(t), u(t)) + \lambda(t) g(x(t), u(t)).
$$
Then:
$$
\begin{align\*}
\frac{d}{dt} H(x(t), u(t)) &= (e^{-t}f\_x + \lambda g\_x)\dot x + \underbrace{(H\_u)}\_{=0} \dot u + g(x(t), u(t)) \dot \lambda,\\
&= \dot x(e^{-t}f\_x + \lambda g\_x) + g(x(t), u(t)) \underbrace{(-e^{-t}f\_x - \lambda g\_x)}\_{=\dot \lambda\_t},\\
&= \underbrace{(\dot x - g(x(t), u(t))}\_{=0} (e^{-t}f\_x + \lambda g\_x),\\
&= 0
\end{align\*}
$$

References: Chiang (1992), <https://people.stfx.ca/tleo/advmacrolec3.pdf>

**Tags:** macroeconomics, consumer-theory, theory, optimal-control

> **Comments:**
> **username_1**: What is the exact text of the problem?  I suppose that '$g$ is independent of $t$' doesn't mean that $g$ is constant with respect to $t$ (otherwise, why put $t$ amoing the independent variables?), but that the function $g$ is always the same, irrespective of $t$  
> **username_0**: @username_1 The context is the current value Hamiltonian and shadow price in macroeconomics.  
> **username_1**: Yes, I know, I said the **text** of the problem, if it is an exercise. I think that the text of the problem doesnt't say you that $g$ is constant, but that we have always the same function $g$ as time $t$ varies.  
> **username_0**: @username_1 The exact expression is "g is independent of $t$". I will try to find its precise/rigorous meaning.  
> **username_1**: Ok, moreover, even if the value of $g$ is indipendent of $t$, this means that it doesn't depend 'separately' on $t$, but can depend on $t$ through $x(t)$ and $u(t)$, it doesn't mean that it is independent of $x(t)$ and $u(t)$. This is the case when a differential equation is said *autonomous*, that is, it does't depend on $t$ separately. I don't know what is $x_t$ in the question, I suppose the derivative of $x(t)$ with respect to time, as you wrote 'derivative' before it.  
> **username_0**: @username_1 Yes, $H_t$ means the derivative $\partial H/\partial t$. I am trying to hard to differentiate between "independence“ and "autonomous". Bear with me for a few hours.  
> **username_1**: Of course, I'm triyng only to make clearer the question.  I referred to the language of differential equations, but I don't want confuse you.  

---

## 1 answers

### Answer by username_2 on 2023-10-02. Score: 2 | Accepted answer

Consider the problem:
$$
\begin{align\*}
\max\_{u} \int\_0^T f(x(t), u(t)) dt& \\
\text{ s.t. } &\dot x = g(x(t), u(t)),\\
&\text{ + boundary conditions}
\end{align\*}
$$

Assume that $g(x,u)$ and $f(x,u)$ are independent of $t$ (given $x$ and $u$). The Hamiltonian is given by:
$$
H(x(t), u(t)) = f(x(t), u(t)) + \lambda(t) g(x(t), u(t))
$$
The first order conditions give:
$$
\begin{align\*}
&f\_u + \lambda g\_u = 0,\\
&\dot \lambda = - f\_x - \lambda g\_x\\
&\text{and some transversality conditions}
\end{align\*}
$$
Now consider the Hamiltonian
$$
H(x(t), u(t)) = f(x(t), u(t) + \lambda(t) g(x(t), u(t)).
$$
Then:
$$
\begin{align\*}
\frac{d}{dt} H(x(t), u(t)) &= (f\_x + \lambda g\_x)\dot x + \underbrace{(f\_u + \lambda g\_u)}\_{=0} \dot u + g(x(t), u(t)) \dot \lambda,\\
&= \dot x(f\_x + \lambda g\_x) + g(x(t), u(t)) \underbrace{(-f\_x - \lambda g\_x)}\_{=\dot \lambda\_t},\\
&= \underbrace{(\dot x - g(x(t), u(t))}\_{=0} (f\_x + \lambda g\_x),\\
&= 0
\end{align\*}
$$
This shows that $H$ does not change with $t$, so it remains constant over time. The exact value is usually determined by the transversality conditions.

> **Comments:**
> **username_0**: Hi tdm, I put $e^{-t}$ before the $f$ in the title but I forgot to include in the main text. However, I believe your solution still works. I tried it with your method above. Is my understanding correct?  

---

