<p>I have been reading an Economics working paper and trying to derive the first-order conditions of a seemingly complicated optimization problem.</p>
<p>The optimization problem with choice variables <span class="math-container">$P_{t}^{R}$</span>, <span class="math-container">$P_{t+i}^{S}$</span>, <span class="math-container">$H_{t+i}$</span> is as follows.</p>
<p><span class="math-container">$$\max E_{t} \sum_{i=0}^{\infty}(1-\delta)^{i}Q_{t,t+i}\pi_{t+i} = \pi_{t} + E_{t} \sum_{i=1}^{\infty}(1-\delta)^{i}Q_{t,t+i}\pi_{t+i} = \pi_{t} + V_{t}$$</span></p>
<p><span class="math-container">$$\pi_{t+i} = \int_{H_{t+i}}^{1}\sigma^{F}(q_{t+i}^{R})\frac{P_{t+i}^{R}-W_{t+i}}{P_{t+i}}dt + \int_{0}^{H_{t+i}}\sigma^{F}(q_{t+i}^{S})\frac{P_{t+i}^{S}-W_{t+i}}{P_{t+i}}dt - \frac{\Psi }{2} \left ( \frac{P_{t+i}^{R}}{P_{t+i-1}^{R}} - 1\right )^{2}$$</span></p>
<p>s.t. <span class="math-container">$$\sigma^{H}(q_{t+i}^{R})\left ( U-\lambda_{t+i} P_{t+i}^{R}\right ) \geq 0,$$</span>
<span class="math-container">$$\sigma^{H}(q_{t+i}^{S})\left ( U-\lambda_{t+i} P_{t+i}^{S}\right ) \geq J_{t+i},$$</span>
where <span class="math-container">$Q_{t,t+i}$</span> is the stochastic discount factor defined <span class="math-container">$Q_{t,t+i}\pi_{t+i} = \frac{\beta^{i}\lambda_{t}}{\lambda_{t+i}}$</span>, <span class="math-container">$\sigma$</span>'s are the probabilities.</p>
<p>The first-order conditions are:</p>
<p><span class="math-container">$$P_{t+i}^{S} = \frac{U}{\lambda_{t+i}} + \frac{q_{t+i}^{S}e^{-q_{t+i}^{S}}}{1-e^{-q_{t+i}^{S}}} \left ( \frac{U}{\lambda_{t+i}} - W_{t+i}\right ),$$</span></p>
<p><span class="math-container">$$\sigma^{F}(q_{t+i}^{S})\left ( P_{t+i}^{S}-W_{t+i} \right ) = \sigma^{F}(q_{t+i}^{R})\left ( P_{t+i}^{R}-W_{t+i} \right ),$$</span></p>
<p><span class="math-container">$$\mu_{t+i}\sigma^{H}(q_{t+i}^{R})\lambda_{t+i} = Q_{t,t+i}\left [ (1-H_{t+i})\frac{\sigma^{F}(q_{t+i}^{R})}{P_{t+i}} - \frac{\Psi }{P_{t+i}^{R}-1}\left ( \frac{P_{t+i}^{R}}{P_{t+i-1}^{R}} - 1\right ) \right ] + Q_{t,t+i+1} \Psi\left ( \frac{P_{t+i+1}^{R}}{P_{t+i}^{R}} - 1\right ) \frac{P_{t+i+1}^{R}}{(P_{t+i}^{R})^{2}} = \Phi (P_{t+i}^{R}),$$</span>
where <span class="math-container">$\mu_{t+i}$</span> is the Lagrange multiplier w.r.t the constraint of <span class="math-container">$P_{t+i}^{R}$</span>.</p>
<p>I am not sure how the first-order conditions were derived in the paper. I think the authors used the method of Lagrange multipliers, but I am not sure how to go about it. Can anyone help me with the process of getting the above first-order conditions?</p>
<p><strong>EDIT:</strong> For more information, <span class="math-container">$P_{t+i}$</span> is aggregate price level, <span class="math-container">$\pi_{t+i}$</span> is firm's real profit in period <span class="math-container">$t+i$</span>, <span class="math-container">$V_{t}$</span> represents the real net present value of an existing firm at the end of the period <span class="math-container">$t$</span>, <span class="math-container">$\sigma^{F}$</span> is the firm's probability of getting at least one customer facing different queue length attracted by a posted price, <span class="math-container">$W_{t+i}$</span> is nominal wage, <span class="math-container">$\Psi$</span> is price adjustment cost in real term,  <span class="math-container">$\sigma^{H}$</span> is the customer's probability of purchasing the good at the firm visited different queue length, <span class="math-container">$\lambda_{t+i}$</span> is the Lagrangian multiplier in the household's problem, and <span class="math-container">$J_{t+i}$</span> is the sale hunter's expected utility from visiting any other firm. <span class="math-container">$q^{r}$</span> and <span class="math-container">$q^{s}$</span> are queue lengths at the regular and sale prices.</p>

CC BY-SA 4.0
2021-03-16T11:53:08.593Z
Can you share the link of the paper? There are many notations unexplained in the question. And maybe you can try to simplify the question by removing all the model features that are not core. This helps you and others understand the question better.
Alalalalaki
CC BY-SA 4.0
2021-03-17T06:31:44.150Z
@Alalalalaki The working paper cannot be publicly shared right now, unfortunately. I don't think other notations are that relevant for the FOC derivations.
OGC
CC BY-SA 4.0
2021-05-12T08:23:10.373Z
@Alalalalaki I added more information about the notation if that helps.
OGC
<optimization><recursive-macroeconomics>
Optimization problem of the firm
OGC
# Optimization problem of the firm

(Asked by: username_0 on 2021-03-16)

I have been reading an Economics working paper and trying to derive the first-order conditions of a seemingly complicated optimization problem.

The optimization problem with choice variables $P\_{t}^{R}$, $P\_{t+i}^{S}$, $H\_{t+i}$ is as follows.

$$\max E\_{t} \sum\_{i=0}^{\infty}(1-\delta)^{i}Q\_{t,t+i}\pi\_{t+i} = \pi\_{t} + E\_{t} \sum\_{i=1}^{\infty}(1-\delta)^{i}Q\_{t,t+i}\pi\_{t+i} = \pi\_{t} + V\_{t}$$

$$\pi\_{t+i} = \int\_{H\_{t+i}}^{1}\sigma^{F}(q\_{t+i}^{R})\frac{P\_{t+i}^{R}-W\_{t+i}}{P\_{t+i}}dt + \int\_{0}^{H\_{t+i}}\sigma^{F}(q\_{t+i}^{S})\frac{P\_{t+i}^{S}-W\_{t+i}}{P\_{t+i}}dt - \frac{\Psi }{2} \left ( \frac{P\_{t+i}^{R}}{P\_{t+i-1}^{R}} - 1\right )^{2}$$

s.t. $$\sigma^{H}(q\_{t+i}^{R})\left ( U-\lambda\_{t+i} P\_{t+i}^{R}\right ) \geq 0,$$
$$\sigma^{H}(q\_{t+i}^{S})\left ( U-\lambda\_{t+i} P\_{t+i}^{S}\right ) \geq J\_{t+i},$$
where $Q\_{t,t+i}$ is the stochastic discount factor defined $Q\_{t,t+i}\pi\_{t+i} = \frac{\beta^{i}\lambda\_{t}}{\lambda\_{t+i}}$, $\sigma$'s are the probabilities.

The first-order conditions are:

$$P\_{t+i}^{S} = \frac{U}{\lambda\_{t+i}} + \frac{q\_{t+i}^{S}e^{-q\_{t+i}^{S}}}{1-e^{-q\_{t+i}^{S}}} \left ( \frac{U}{\lambda\_{t+i}} - W\_{t+i}\right ),$$

$$\sigma^{F}(q\_{t+i}^{S})\left ( P\_{t+i}^{S}-W\_{t+i} \right ) = \sigma^{F}(q\_{t+i}^{R})\left ( P\_{t+i}^{R}-W\_{t+i} \right ),$$

$$\mu\_{t+i}\sigma^{H}(q\_{t+i}^{R})\lambda\_{t+i} = Q\_{t,t+i}\left [ (1-H\_{t+i})\frac{\sigma^{F}(q\_{t+i}^{R})}{P\_{t+i}} - \frac{\Psi }{P\_{t+i}^{R}-1}\left ( \frac{P\_{t+i}^{R}}{P\_{t+i-1}^{R}} - 1\right ) \right ] + Q\_{t,t+i+1} \Psi\left ( \frac{P\_{t+i+1}^{R}}{P\_{t+i}^{R}} - 1\right ) \frac{P\_{t+i+1}^{R}}{(P\_{t+i}^{R})^{2}} = \Phi (P\_{t+i}^{R}),$$
where $\mu\_{t+i}$ is the Lagrange multiplier w.r.t the constraint of $P\_{t+i}^{R}$.

I am not sure how the first-order conditions were derived in the paper. I think the authors used the method of Lagrange multipliers, but I am not sure how to go about it. Can anyone help me with the process of getting the above first-order conditions?

**EDIT:** For more information, $P\_{t+i}$ is aggregate price level, $\pi\_{t+i}$ is firm's real profit in period $t+i$, $V\_{t}$ represents the real net present value of an existing firm at the end of the period $t$, $\sigma^{F}$ is the firm's probability of getting at least one customer facing different queue length attracted by a posted price, $W\_{t+i}$ is nominal wage, $\Psi$ is price adjustment cost in real term, $\sigma^{H}$ is the customer's probability of purchasing the good at the firm visited different queue length, $\lambda\_{t+i}$ is the Lagrangian multiplier in the household's problem, and $J\_{t+i}$ is the sale hunter's expected utility from visiting any other firm. $q^{r}$ and $q^{s}$ are queue lengths at the regular and sale prices.

**Tags:** optimization, recursive-macroeconomics

> **Comments:**
> **username_1**: Can you share the link of the paper? There are many notations unexplained in the question. And maybe you can try to simplify the question by removing all the model features that are not core. This helps you and others understand the question better.  
> **username_0**: @username_1 The working paper cannot be publicly shared right now, unfortunately. I don't think other notations are that relevant for the FOC derivations.  
> **username_0**: @username_1 I added more information about the notation if that helps.  

---

## 0 answers

