Describe a system in orbit

77 Views Asked by At

Suppose I have a function $f(x)$ (for drawing purposes, I will image it to be $2D$). Is there some sort of dynamics/set of differential equations etc that allows me to move around the orbit defined by the level set $$ f^{-1}(c) = \{x\,:\, f(x) = c\} $$ It would look something like this.

enter image description here

2

There are 2 best solutions below

3
On

Just to clarify, the function is $f:\mathbb{R^2}\to\mathbb{R}$. right? Suppose you already found a single point $x$ with $f(x)=c$. You now want to find a tangent to the level-set at $x$.

Such a tangent vector $t$ is orthogonal to the vector of derivatives $\begin{pmatrix} \partial_{x_1} f(x) \\ \partial_{x_2}f(x)\end{pmatrix}$. In $2D$ there is always a unique (up to scaling) orthogonal vector, for example $\begin{pmatrix} -\partial_{x_2} f(x) \\ \partial_{x_1}f(x)\end{pmatrix}$.

Now for a numerical algorithm, you should do this:

  1. find a first value of $x$ with $f(x)=c$ (possibly using newton method or something similar)
  2. find a tangent $t$ as explained before.
  3. go a little bit in that direction, i.e. set $x'=x+\epsilon t$ (for some small number $\epsilon$). This $x'$ will of course not exactly be in the level-set (but it should be very close)
  4. find a new value for $x$ in the level set, close to $x'$ (probably one or two iterations of newton method starting at $x'$ is enough)
  5. go back to step 2 and repeat as long as you want

Edit: as a differential equation, this essentially is: $$x'(t) = \begin{pmatrix} -\partial_{x_2} f(x) \\ \partial_{x_1}f(x)\end{pmatrix}$$ which you can solve with any numerical method you like (Runge-Kutta...). Though to improve accuracy, you should occasionaly do a newton-step to get exactly into the level-set again. The differential equation alone will drift away over time (though very slowly if the numerical integration scheme is good and $\epsilon$ is small enough)

0
On

If $P(t)$ is your moving point, what you want is that the velocity vector $\dot{P}(t)$ is orthogonal to the gradient $\nabla f$. So if $\nabla f = [a(x,y), b(x,y)]$ you might try $$\eqalign{\dot{x} &= b(x,y)\cr \dot{y} &= -a(x,y)\cr} $$ where $x$ and $y$ are the cartesian coordinates of $P(t)$.