0

Just to clarify, this is not a homework problem. I'm using this for some code I'm writing for a simulation: I'm trying to find a point at which I should switch from a positive acceleration of a certain magnitude to a negative acceleration of the same magnitude, given an initial velocity. Basically, the goal is to stop at a specified position, given an initial position and velocity.

Sounds pretty easy, right? The problem is that I can only accelerate either fully forward or fully backward.

Essentially, I'm trying to find $pos_\text{switch}$ in terms of $pos_i$, $v_i$, $a$, and $pos_\text{tar}$, given that $v_f$ is $0$. Two things I have figured out are that the maximum initial velocity for which it is possible to stop at the target without overshooting is $\sqrt{2ad}$, and the obvious that if the velocity is $0$, $pos_\text{switch}$ is simply the halfway point between the initial and final points.

I hope you can help.

David Z
  • 77,804

1 Answers1

1

Use the standard equation:

$$s=\frac{v^2-u^2}{2a}$$

break the problem into two halves: one accelerating and one decelerating.

Taking the sum of both equations you should get the total distance traveled as a sum of some terms, all of which you know except the speed in the middle which should cancel out (assuming magnitude of $a$ is equal in both cases).

This assumes the acceleration is in the same direction as the initial velocity. If not, it is a bit more complicated, as you also have to worry about the direction of travel.

bobie
  • 5,862
nivag
  • 1,850