I have the following situtation:
An object is traveling a certain (known) distance in a straight line. The object starts at rest, accelerates to its preset maximum speed then spends some time cruising at that speed, and finally decelerates to a halt.
The object does not follow Newton's second law of motion, but rather obeys the following equations:
While cruising, it's moving normally, so
d = v*t and while accelerating:
d = e^(k*t) and
v = k * e^(k*t), where
e is the natural log base,
t is time,
k is a constant,
d is distance traveled, and
v is speed. When decelerating, the distance and speed equations are the same, but with a negative time component and are offset by the time and distance spent accelerating and cruising. The value of
k for deceleration is also different from the value for acceleration (it's the acceleration
k divided by 3, or just 2 if
k/3 is greater than 2, if that's important).
I am trying to calculate the total travel time given the distance to travel, the maximum speed, and the acceleration and deceleration constants. The calculation is simple in the case when the distance is great enough that the object reaches its maximum speed - I can calculate
t for how long it will take it to reach max speed and then back to 0 from the speed formula; then I get the distance traveled while accelerating and decelerating from the distance equation, with the remaining distance traveled at cruising speed.
I am having difficulties figuring out when the object will begin decelerating if the distance is smaller than the distance required to accelerate to max speed and decelerate back to zero.
So, how would one go about intersecting the speed graphs for acceleration and deceleration to figure out the highest speed it will achieve over such a run? (I think I can figure out the total time from there)