1
$\begingroup$

Lets say I have a vector field that looks like this:

vector field

Where the x-component of each vector is x=x and the y-component is y=y.

Each of these vectors represents acceleration.

Now I "drop" a fresh particle (p) into the field at a certain position (p) which already has a velocity (v).

How can I calculate the new position (p2) and velocity (v2) of the particle after a specific time (t)?

From my basic understanding it has something to do with Line Integrals? However this doesn't help me much since it was years since I even solved simple integrals.

I'm doing this for a program I'm writing and I'm not well versed in the world of mathematics so I would really appreciate if you would keep the mathematic notation simple!

Hopefully I didn't miss any important piece of information.

Thanks, Andreas.

  • 1
    @bobobobo: please don't remove `.stack` to fix broken imgur links. This will result in having the picture on a server that isn't guaranteed to be permanent. Instead upload the picture another time. See Jeff's answer [here](http://meta.math.stackexchange.com/q/2483/) for more on this.2011-12-30

1 Answers 1

8

An acceleration has units of length per time squared (or inverse length in natural units), and the vector field you describe has units of length, so there needs to be some factor of proportionality connecting the two. Let's say the acceleration is

$$\ddot{\vec{r}}=\lambda^2 \vec{r}\;,$$

where $\vec{r}$ is the position vector with components $x$ and $y$, a dot indicates differentiation with respect to time, and $\lambda^2$ is some positive proportionality constant which I've written as a square for later convenience. This is a second-order linear ordinary differential equation for $\vec{r}$, whose solution is

$$\vec{r}(t)=\vec{r}_1\mathrm e^{\lambda t}+\vec{r}_2\mathrm e^{-\lambda t}$$

with arbitrary vectors $\vec{r}_1$ and $\vec{r}_2$ which need to be determined using the initial conditions. Substituting your initial values $\vec{r}(0)=\vec{p}$ and $\dot{\vec{r}}(0)=\vec{v}$ yields

$$ \begin{eqnarray} \vec{r}_1+\vec{r}_2&=&\vec{p}\;,\\ \vec{r}_1-\vec{r}_2&=&\frac{\vec{v}}{\lambda}\;, \end{eqnarray} $$

with solution

$$ \begin{eqnarray} \vec{r}_1&=&\frac{1}{2}\left(\vec{p}+\frac{\vec{v}}{\lambda}\right)\;,\\ \vec{r}_2&=&\frac{1}{2}\left(\vec{p}-\frac{\vec{v}}{\lambda}\right)\;, \end{eqnarray} $$

so the overall solution is

$$\vec{r}(t)=\frac{1}{2}\left[ \left(\vec{p}+\frac{\vec{v}}{\lambda}\right)\mathrm e^{\lambda t} + \left(\vec{p}-\frac{\vec{v}}{\lambda}\right)\mathrm e^{-\lambda t} \right]\;. $$

This gives you the position at time $t$. To obtain the velocity at time $t$, you can differentiate with respect to time:

$$\dot{\vec{r}}(t)=\frac{1}{2}\left[ \left(\lambda\vec{p}+\vec{v}\right)\mathrm e^{\lambda t} - \left(\lambda\vec{p}-\vec{v}\right)\mathrm e^{-\lambda t} \right]\;. $$

To determine $\lambda$, take the square root of $\lambda^2$. Your units appear to be such that $\lambda^2=1$; in that case, you'd have $\lambda=1$.

[Edit:] I just realized that the vector field in your image doesn't look like the vector field you defined -- the vectors seem to all have the same length. If this is what you want the acceleration would be

$$\ddot{\vec{r}}=\lambda^2 \frac{\vec{r}}{|\vec{r}|}\;.$$

This can also be solved in closed form, but it's quite a bit more complicated, so I'll only work it out if that's what you need.

  • 1
    And more generally, if $\vec{F}$ is any vector field. The position is the solution to the differential equation $\frac{d^2 \vec{r}}{d t^2} = \vec{F}(\vec{r})$ with $\vec{r}(0) = \vec{r}_0$ (initial position), $\frac{d \vec{r}}{d t}(0) = 0$ (assuming you drop the particle without velocity). But this might be complicated to solve depending on $\vec{F}$.2011-05-14
  • 0
    Looks really good. I will investigate this later. Just one question, can I apply this solution to other equations, like x=sin(x),y=sin(y)?2011-05-14
  • 0
    @monoceres: I assume you mean that, like in the question, the $x$-component of acceleration is $\sin x$ and the $y$-component is $\sin y$. That would be $\ddot x=\sin x$, not $x=\sin x$, since it's the acceleration $\ddot x$ and not the $x$-component $x$ itself that you're specifying. To answer your question: You can apply this *method* of solution to any vector field, but not this solution. You have to solve a different differential equation for each vector field you specify for the acceleration. I don't think the one with the sines can be solved in closed form.2011-05-14
  • 1
    @joriki: The equation $d^2\phi/dt^2=\omega^2 \sin \phi$ can actually be solved in terms of elliptic functions. It's the equation for a pendulum (when the angle $\phi(t)$ is not assumed to be small), and the solution is known to be $$\phi(t)=2 \arcsin(k \operatorname{sn}(\omega t, k)),$$ where sn is Jacobi's *sinus amplitudinis*, and $k=\sin(\phi_{\mathrm{max}}/2)$.2011-05-15
  • 0
    @Hans: Thanks, I wasn't aware of that. This leads back to the point that "closed form" is not a precise term...2011-05-15
  • 1
    @joriki: This, by the way, leads to a funny argument for why the sn function is doubly periodic: If you replace $t$ by $it$, then the left-hand side of the ODE changes its sign. Moving that sign over to the right-hand side, we can think of this as changing the sign of $\omega^2=g/l$, that is, to swinging the pendulum with the gravity pointing upwards instead of downwards. This also gives a periodic motion, hence the sn function (with $02011-05-15
  • 0
    You're waaay ahead of me here guys.. Since I want to create a program where the user can put in the acceleration equations and then watch lots of particles following this pattern, my dream would be something that I can apply to any acceleration (how do you do those fancy symbols? When I copy and paste I only get boxes) and is in closed form, but that would be impossible I guess. Many thanks for the help btw!2011-05-15
  • 0
    @monoceres: This is $\TeX$; you can use any $\TeX$ code by enclosing it in dollar signs, and you can view and copy the $\TeX$ source for any "fancy symbols" you see on this site by right-clicking on it selecting "Show Source".2011-05-15
  • 0
    @monoceres: Concerning what you'd like to do: Yes, this is impossible, since there will be no closed form even for relatively simple equations the user might choose. But you can always do it numerically; you can start reading about numerical solutions of ordinary differential equations here: http://en.wikipedia.org/wiki/Numerical_ordinary_differential_equations.2011-05-15
  • 0
    Ah, I see. I'm accepting this answer as the correct one and moving to another question since this is becoming another question. I'd love if you took a look at the new question as well. http://goo.gl/6VIAE2011-05-16