<p>The first order condition of the maximization problem is
\begin{equation}
f'(x)-s=0\iff f'(x)=s
\end{equation}</p>

<p>We can then replace $x$ by $x(s)$ because this is the optimal value given $s$. Since this is true for every $s$, we can differentiate with respect to $s$ which yields 
\begin{equation}
f''(x(s))x'(s)=1
\end{equation}</p>

<p>Which can be rewrite as 
\begin{equation}
f''(x(s))=\frac{1}{x'(s)}
\end{equation}</p>

<p>Then $x'(s)$ can be estimated by finite differences which would give $f''(x)$.</p>

CC BY-SA 3.0
2015-10-31T00:25:24.873Z
Thanks! One question, does the constraint set $x\in [0,b]$ interfere with the above relationship at all?
jonem
CC BY-SA 3.0
2015-10-31T00:42:31.813Z
Not really, this is quite general. Of course, $X=[0,b]$ has to be closed and bounded (which it is), $f(x)-sx$ has to be twice-differentiable over the set $X$, and $x(s)$ has to be differentiable over $X$. That being said, you would have trouble in the numerical estimation of finite differences, if the set constraint often binds ($x(s)=b$ or $x(s)=0$) for a lot of $s$. But the relation should hold.
Louis. B
CC BY-SA 3.0
2015-10-30T06:26:29.190Z
2015-10-30T06:26:29.190Z
Louis. B
<p>Consider the following optimization
$$x^*(s) = \max_{x\in X} \big(\,f(x)-sx\,\big)$$
where $f$ is assumed to be a strictly concave function and $X$ is an interval constraint, e.g $X = [0,b]$. We do not know the exact function $f$.</p>

<p>Assume that we can provide a parameter $s$ and obtain the corresponding (unique) optimizer $x^*(s)$.</p>

<p>My goal is to estimate $f''(x)$ from a collection of parameters $(s_1,s_2,\ldots)$ and associated optimizers $(x^*(s_1),x^*(s_2),\ldots)$.</p>

<p>How would one go about doing this? I was thinking of applying the envelope theorem or using finite differences in some way but I'm not quite sure how to proceed.</p>

CC BY-SA 3.0
2015-10-30T05:40:56.627Z
Differentiating the first-order condition would yield : $f''(x(s))=1/x'(s)$. I guess that $x'(s)$ could be estimated with finite differences. Does that help?
Louis. B
CC BY-SA 3.0
2015-10-30T05:49:44.610Z
Hi. Welcome to Economics.SE. I see that you have cross posted your [question](http://math.stackexchange.com/questions/1504354/estimating-the-second-derivative-of-function-from-optimizers) on Mathematics.SE. Cross-posting is [discouraged](http://meta.stackexchange.com/questions/64068/is-cross-posting-a-question-on-multiple-stack-exchange-sites-permitted-if-the-qu) in the StackExchange community. Please consider deleting one of your questions; if it doesn't get enough attention in the community you first posted it then you can migrate it to others. Voting to close.
cc7768
CC BY-SA 3.0
2015-10-30T06:03:04.097Z
@cc7768 Thanks, I tried to figure out a way to transfer it over but I couldn't find it. I've deleted the other one.
jonem
CC BY-SA 3.0
2015-10-30T06:04:27.450Z
@Louis.B Hi Louis, thanks! Can you elaborate a bit more on how you got $1/x'(s)$? If you post it as an answer, I'll mark it as the answer.
jonem
CC BY-SA 3.0
2015-10-30T06:05:35.743Z
@rogerG You should be able to do this by flagging your original post on Mathematics.SE to get the moderators to migrate it (or by deleting the post on the other site) -- I will assume you're going to do this and retract my close vote so you don't show up on the question review list.
cc7768
CC BY-SA 3.0
2015-10-30T06:27:16.207Z
@rogerG just did ;) Do hesitate if something is not clear. Cheers
Louis. B
<microeconomics><optimization>
Estimating the second derivative of function from optimizers
jonem
# Estimating the second derivative of function from optimizers

(Asked by: username_0 on 2015-10-30)

Consider the following optimization
$$x^\*(s) = \max\_{x\in X} \big(\,f(x)-sx\,\big)$$
where $f$ is assumed to be a strictly concave function and $X$ is an interval constraint, e.g $X = [0,b]$. We do not know the exact function $f$.

Assume that we can provide a parameter $s$ and obtain the corresponding (unique) optimizer $x^\*(s)$.

My goal is to estimate $f''(x)$ from a collection of parameters $(s\_1,s\_2,\ldots)$ and associated optimizers $(x^\*(s\_1),x^\*(s\_2),\ldots)$.

How would one go about doing this? I was thinking of applying the envelope theorem or using finite differences in some way but I'm not quite sure how to proceed.

**Tags:** microeconomics, optimization

> **Comments:**
> **username_1**: Differentiating the first-order condition would yield : $f''(x(s))=1/x'(s)$. I guess that $x'(s)$ could be estimated with finite differences. Does that help?  
> **username_2**: Hi. Welcome to Economics.SE. I see that you have cross posted your [question](http://math.stackexchange.com/questions/1504354/estimating-the-second-derivative-of-function-from-optimizers) on Mathematics.SE. Cross-posting is [discouraged](http://meta.stackexchange.com/questions/64068/is-cross-posting-a-question-on-multiple-stack-exchange-sites-permitted-if-the-qu) in the StackExchange community. Please consider deleting one of your questions; if it doesn't get enough attention in the community you first posted it then you can migrate it to others. Voting to close.  
> **username_0**: @username_2 Thanks, I tried to figure out a way to transfer it over but I couldn't find it. I've deleted the other one.  
> **username_0**: @username_1B Hi Louis, thanks! Can you elaborate a bit more on how you got $1/x'(s)$? If you post it as an answer, I'll mark it as the answer.  
> **username_2**: @rogerG You should be able to do this by flagging your original post on Mathematics.SE to get the moderators to migrate it (or by deleting the post on the other site) -- I will assume you're going to do this and retract my close vote so you don't show up on the question review list.  
> **username_1**: @rogerG just did ;) Do hesitate if something is not clear. Cheers  

---

## 1 answers

### Answer by username_1 on 2015-10-30. Score: 5 | Accepted answer

The first order condition of the maximization problem is
\begin{equation}
f'(x)-s=0\iff f'(x)=s
\end{equation}

We can then replace $x$ by $x(s)$ because this is the optimal value given $s$. Since this is true for every $s$, we can differentiate with respect to $s$ which yields
\begin{equation}
f''(x(s))x'(s)=1
\end{equation}

Which can be rewrite as
\begin{equation}
f''(x(s))=\frac{1}{x'(s)}
\end{equation}

Then $x'(s)$ can be estimated by finite differences which would give $f''(x)$.

> **Comments:**
> **username_0**: Thanks! One question, does the constraint set $x\in [0,b]$ interfere with the above relationship at all?  
> **username_1**: Not really, this is quite general. Of course, $X=[0,b]$ has to be closed and bounded (which it is), $f(x)-sx$ has to be twice-differentiable over the set $X$, and $x(s)$ has to be differentiable over $X$. That being said, you would have trouble in the numerical estimation of finite differences, if the set constraint often binds ($x(s)=b$ or $x(s)=0$) for a lot of $s$. But the relation should hold.  

---

