0
$\begingroup$

I'm wrestling with a problem involving motion of a particle. The direction of the particle's motion is defined everywhere by a function $\mathbf G(\mathbf X)$. I keep coming down to a recursive algorithm for my solution, though, and I want to make it into an integral so I can do an analytic approach.

  • $\mathbf P$ is the starting position of the particle.
  • $\hat{\mathbf D}(\mathbf P)$ is a function that returns the (unit vector) direction to move at a given location.
  • $S$ is the distance we want to travel.
  • $\delta$ is the simulation step distance.

Pseudocode below.

$$\mathrm{nextPosition}\left(\mathbf P, \hat{\mathbf D}, S, \delta\right) = \begin{cases} \mathbf P &\mbox{if }S\leq 0 \\ \mathrm{nextPosition}\left(\left[\mathbf P + \delta\,\hat{\mathbf D}(\mathbf P)\right], \hat{\mathbf D}, (S-\delta), \delta \right) &\mbox{if }S\gt 0 \end{cases}$$

I recognize that I want to take $\lim_{\delta\to\infty}$ of my answer. After picking my brain (and various math sites) I haven't found a good way to convert my recursive approach to an integral, and I know I'm looking at this the wrong way.

I started looking at differential equations, but they were all in terms of velocity and acceleration. I'm just worried about the kinematics of the situation, moving a particle around without any regard to why.

How would I convert my recursive approach above to an integral or differential equation?

| cite | improve this question | | | | |
$\endgroup$
1
$\begingroup$

You need more than the direction of motion at a point, you need the velocity, too. $\mathbf G(\mathbf X)$ need to be a vector with length, not a unit vector. The length should be the velocity at $\mathbf X$. Similarly $\hat{\mathbf D}(\mathbf P)$ should not be a unit vector, in fact it is the same as $\mathbf G(\mathbf P)$ Then $\delta$ is the timestep of your simulation. If you do it by stepping, the step will be $\mathbf G(\mathbf P)\delta$, so in the limit that $\delta \to 0$you get $$\mathbf P(t)=\int_0^t\mathbf{G(P}(\tau)\mathbf)\; d\tau$$ Whether you can solve this analytically depends on the function $\mathbf G$

| cite | improve this answer | | | | |
$\endgroup$
  • $\begingroup$ Rephrasing it in terms of velocity really helped. I still want it to be in terms of arc length instead of time, but your answer gave me the shift in perspective I was looking for. $\endgroup$ – Ryan Kennedy Feb 20 '15 at 19:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.