I have a path which is a straight line with some distance d.
I have a particle which is at position 0 in the line, with a resting velocity of 0 m/s. The particle has a fixed rate of acceleration at 2 m/s^2 (this rate is set to 0 once a desired velocity has been reached). The particle has a deceleration rate of -2 ms/s^2 as well.
The time taken for the particle to straight moving, maintain some velocity, and come back to a velocity of 0 after d meters have been traversed is fixed.
I am trying to solve for the velocity that the particle must accelerate to, along with the points in time where the particle needs to stop accelerating, and the point where the particle needs to begin decelerating.
When approaching this problem I can divide distance by time, and get the velocity that would be maintained if the point could instantaneously accelerate to a given velocity, and instantaneously stop at the end.
I then am trying to adjust this by accounting for the time needed to reach the desired velocity, and the time needed to return to 0 from that desired velocity. Am I on the right track here in solving this problem?
The time taken to cover a distance $s$ while accelerating at a fixed rate of acceleration $a$ starting from rest is given by:
$t=\sqrt{\frac{2s}{a}}$
In your case, $a=2$ and the maximum distance available for accelerating is $s=\frac{d}{2}$ (since the particle must spend the same distance decelerating to rest). So the maximum time that the particle can spend accelerating is:
$t_{max}=\sqrt{\frac{d}{2}}$
and the maximum speed that the particle achieves is
$v_{max} = 2t_{max} = \sqrt{2d}$
For example, if $d$ is 18 meters, the particle can accelerate for 3 seconds, covering a distance of 9 meters and reaching a maximum speed of 6 meters per second. It can then decelerate back to rest in the remaining 9 meters.
It can, of course, stop accelerating at any time before $t_{max}$. If it stops accelerating at time $t$ when it has reached a speed of $2t$ then it has covered a distance of $t^2$. It can then cruise at constant speed for a distance of $d-2t^2$ before decelerating. The time spent cruising is $\frac{d}{2t}-t$ and the total time is $\frac{d}{2t}+t$.