2

I have a system of equations that cannot be solved for in closed form:

$F_1(x_1,x_2,\beta)=0 ~\&~ F_2(x_1,x_2,\beta)=0 $

I want to solve for functions $x_1=x_1(\beta) ~\&~ x_2=x_2(\beta)$

My approach so far:

  1. Fix $\beta=\beta_1$
  2. Solve system numerically for $x^1_1,x^1_2$.
  3. Repeat for a different $\beta$ on some pre-defined finite support
  4. Generate a vector of $\mathbf{x_1}=(x^1_1...x^n_1)$ with corresponding $\mathbf{b}=(\beta_1...\beta_n)$
  5. Approximate the relationship between $x_1$ and $\beta$ using Sieve to get $\hat{x}_1(\beta)$ [repeat for $x_2$]

The problem with this method is that it gets computationally out of hand once I have many equations and parameters due to step 3.

I do know that the system has a solution for any $\beta$, which motivated this method. I also can easily get the Jacobian of $F$ analytically.

Is there a preferable method that is not as computationally burdensome?

VCG
  • 121
  • 2
  • 1
    Are you plotting bifurcation diagrams? Bifurcation diagrams are a very very difficult problem to get correct in the most general case. You can look at arclength continuation algorithms, but you should probably use a dedicated software for this because every bifurcation needs special handling. MATLAB = matcont, Python = PyDSTool, Julia = DifferentialEquations.jl, anything else you can use AUTO/XPPAUT – Chris Rackauckas May 22 '17 at 21:29
  • @ChrisRackauckas I am not. The context is a system of first order conditions that solve for optimal policy functions. – VCG May 22 '17 at 21:31
  • Well you can probably re-phrase this as a bifurcation problem. You're just finding the steady states of F given each beta. – Chris Rackauckas May 22 '17 at 21:33
  • Or better, if there are no bifurcations at all, you can just implement path following (continuation) methods that should make solving the problem for one $\beta_k$ much cheaper if you already have a solution for a nearby $\beta_{k-1}$. – Wolfgang Bangerth May 22 '17 at 22:59
  • @WolfgangBangerth You mean something like a Newton's Method approach? The problem with that is I don't know how to generate the $x(\beta)$ function with such an approach. – VCG May 22 '17 at 23:03
  • Let's say you have $x(\beta_{k-1})$ and that you want to find $x(\beta_k)$ for a slightly larger $\beta$. For simplicity, also assume for a moment that you only have one $x$. Then $x(\beta)$ draws a line in $x-\beta$ space where $F(x,\beta)=0$, and you know that at ${x(\beta_{k-1}),\beta_{k-1}}$ that line is perpendicular to $\nabla_{x,\beta}F(x(\beta_{k-1},\beta_{k-1})$ because it is the zero line of $F$ and the gradient of $F$ points in the direction of steepest ascent. – Wolfgang Bangerth May 23 '17 at 16:40
  • So you have a good starting guess already if you look for $\tilde x_{k}=x_{k-1}+\Delta x$ where $\nabla_{x,\beta}F(x_{k-1},\beta_{k-1})^T [\Delta x,\Delta\beta]=0$ with $\Delta \beta = \beta_k-\beta_{k-1}$. You're likely only going to need one or two more Newton iterations to find $x(\beta_k)$ using $\tilde x_{k}$ as your starting guess. – Wolfgang Bangerth May 23 '17 at 16:41
  • @WolfgangBangerth So which step in my approach above would I replace with your suggestion? The bottleneck is doing steps 1-3 a bunch of times. – VCG May 23 '17 at 17:31
  • You'd still do all 3 of these steps, but step 3 will be vastly faster if you do path following methods because you get an excellent starting point. – Wolfgang Bangerth May 24 '17 at 14:24
  • @WolfgangBangerth So the number of times I solve the system is the same but each iteration takes less time because of a new starting point for x? – VCG May 24 '17 at 16:42
  • Correct. If you used higher order path following methods, you might even get away with not actually solving for some $\beta$ but just accepting the predictor. – Wolfgang Bangerth May 25 '17 at 15:24

0 Answers0