I am trying to solve the following system of differential equations using NDSolve:
$$ \begin{align*} f'(s) &= \frac{f(s)}{g(s)-s}\\ g'(s) &= \frac{g(s)}{f(s)-s}\\ f(0) &= 0\\ g(0) &= 0\\ f(\overline{s}) &= 1\\ g(\overline{s}) &= 2 \end{align*} $$
The solution is a Bayes-Nash equilibrium bidding strategy in a first-price auction, as described in a paper by Hubbard and Paarsch.
The right boundary condition is not necessarily known a priori. And there's a singularity at the left boundary, and the system is overdetermined, but solutions do exist.
Actually, this represents a special case with an analytic solution. $\overline{s}=2/3$ and then $f(s) = \frac{2s}{1+\frac{3}{4}s^2}$, $g(s) = \frac{2s}{1-\frac{3}{4}s^2}$. But I want to try to solve it numerically.
One technique Hubbard and Parsch advocate is a shooting technique. Don't specify the left boundary; take a guess for $\overline{s}$ and specify the right boundary, and solve the reverse initial value problem. Then decrease $\overline{s}$ if the solutions diverge, and increase it if they are too far from $f[0]=0,g[0]=0$.
I can do this trial and error by hand and it works. It would be easy to wrap up NDSolve in a root-finding algorithm to do this.
maxBid = 2/3;
soln = NDSolve[{
{f'[s] == f[s]/(g[s] - s),
g'[s] == g[s]/(f[s] - s)},
{f[maxBid] == 1, g[maxBid] == 2}},
{f, g}, {s, 0, maxBid}] (* gives nearly correct solution *)
However, I'm wondering if there is a way to get NDSolve to handle all this automatically for me. Can the built-in "Shooting"
method be used for this? Do any differential equation wizards know of a better way to attack this problem?
maxBid
as well using all constraints? Then it is a typical optimization problem, not forNDSolve[]
, but raise forNMinimize[]
. $\endgroup$