# Estimating the second derivative of function from optimizers

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.

• 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 Oct 30 '15 at 5:40
• Hi. Welcome to Economics.SE. I see that you have cross posted your question on Mathematics.SE. Cross-posting is discouraged 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 Oct 30 '15 at 5:49
• @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 Oct 30 '15 at 6:03
• @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 Oct 30 '15 at 6:04
• @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 Oct 30 '15 at 6:05

The first order condition of the maximization problem is $$f'(x)-s=0\iff f'(x)=s$$
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 $$f''(x(s))x'(s)=1$$
Which can be rewrite as $$f''(x(s))=\frac{1}{x'(s)}$$
Then $x'(s)$ can be estimated by finite differences which would give $f''(x)$.
• Thanks! One question, does the constraint set $x\in [0,b]$ interfere with the above relationship at all? – jonem Oct 31 '15 at 0:25
• 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 Oct 31 '15 at 0:42