Equation of a basic velocity-time graph

1. Nov 29, 2015

Bill_Nye_Fan

Okay, so say we had the following situation: An object accelerates from rest to 3 m/s in 1 second. It then maintains this velocity for 2 seconds before decelerating to a velocity of -3 m/s over the span of 2s. It maintains this velocity for a further 2 seconds. The object then accelerates back up to a velocity of 3m/s in 2 seconds, which it then travels constantly at for a final second.

I want to know if it would be possible to come up with an equation which would sketch a graph which would look like this. I would prefer the equation to be this exact graph, but an equation which sketches the same general shape of this graph would also be fine. Also, if it is possible to do, does the graph which follows this general shape have a specific name?

Thank you all for your time.

2. Nov 29, 2015

BvU

Hi,

This looks so much like homework that I invite you to fill in more of the template: (reason: see guidelines)

1. The problem statement, all variables and given/known data
See above. this part is OK.​
2. Relevant equations
See e.g. in your textbook, or else here
3. The attempt at a solution
You don't want to leave this empty: it enables us to assist at an effective level.​

Last edited: Nov 30, 2015
3. Nov 29, 2015

Bill_Nye_Fan

It wasn't a homework question. I am just wondering if it would be possible to determine the equation of this graph or not.

4. Nov 29, 2015

BvU

Yes it is. A straightforward application of the equations in the link under 2.
I do make the assumption that the various accelerations are constants during the time they act.

5. Nov 29, 2015

Bill_Nye_Fan

I'm sorry, I don't think I made myself clear. I didn't mean I wanted to use the physics formulas to solve for unknowns in the equation; I meant I wanted to know if you could represent the entire graph using one equation (like a base parabola can be expressed as y=x^2, or variants of a cubic can be represented as y=x^3, y=x^3 + x^2 - 3x, etc)

6. Nov 29, 2015

Staff: Mentor

No. You can't do it with a single function like this, because the velocity vs time is "piecewise" continuous, and you need a separate equation for each time interval.

7. Nov 30, 2015

BvU

I see. That would end up as some infinitely long series: If you change from e.g. y = x2 to y = 8 - (x-4)2 at x =2 there is a discontinuity in the second derivative that makes things dificult.
You could try a power series or a fourier series or some other series and break off at some point, but may end up with the equivalent of the Gibbs phenomenon (which google) at the points where the acceleration changes.

Contrary to what Chet concludes, I would venture that the velocity is continuous, but the acceleration is not (that is piecewise continuous).

8. Nov 30, 2015

PeroK

Here's a function for the acceleration at time t:

$a(t) = 3cos(\lfloor{\frac{t+1}{2}} \rfloor \frac{\pi}{2})$

9. Nov 30, 2015

PeroK

And, for velocity:

$v(t) = 3[cos(\lfloor{\frac{t+1}{2}} \rfloor \frac{\pi}{2})(t - 2\lfloor{\frac{t+1}{2}} \rfloor) + sin(\lfloor{\frac{t+1}{2}} \rfloor \frac{\pi}{2})]$

10. Nov 30, 2015

nasu

It does not matter what you want to do with the equations. The will be the same either way.
Assuming that the acceleration is constant for the portions with changing speed, there is only one general equation for the velocity:
v(t)=vo+a*t.
The values of vo and a will be different for different portions of the motion described.

Or you can use perok's trick with the integer part function.

11. Nov 30, 2015

BvU

Coming back to this series approximation: your function looks like a cosine, so a Fourier expansion should be appropriate. Depending on how accurately you want to reproduce the function, you need a good number of terms. I played with excel Fourier analysis and found that coefficients for $\cos(nx)$ with n = 0,1,3,5,7,9,11 namely

4.5 -4.37861 -0.16217 0.035028 0.012765 -0.00601 -0.00329
give a maximum error of 0.02 (function range 0-9)

The Gibbs phenomenon isn't distinguishable, probably thanks to the first derivative being continuous

12. Nov 30, 2015

nasu

What do you mean by "actual"?
His velocity function does not look like this.
It has flat portions at both maximum and minimum velocity.

13. Nov 30, 2015

BvU

I agree, I assumed the poster was asking for the position function.

14. Nov 30, 2015

SteamKing

Staff Emeritus
Even though Bill's v-t graph is full of discontinuities, it could be written using special functions which are discontinuous by nature. Such functions are often used to write equations for shear and bending moment functions for loaded beams, using the singularity function method or the very similar Macaulay's method.

https://en.wikipedia.org/wiki/Macaulay's_method

https://en.wikipedia.org/wiki/Singularity_function

The method could be extended to any situation where piecewise functions would normally be used.

15. Nov 30, 2015

BvU

I only see discontinuities in the a(t) graph - must admit the excel picture doesn't do them justice (took steps of 1/16 sec to get 128 steps from 0 to 8. The 128 is inspired by a queer restriction in excel fourier analysis: it wants powers of 2).

16. Dec 1, 2015

BvU

Curious to hear from Bill if such an approach satisfies his needs ...

17. Dec 1, 2015

Shehbaj singh

No i dont think that the locus you are telling would have single figure which has specific equation, but it would be mixture of two locus which we already know, parabola and straight line. a single equation is not possible. I can explain the reason that generally in a locus which as by you in an equation, we apply certain condition on the motion of moving point, generally(x,y) like we apply in circle thet it has to always have a fixed distance from a fixed point. but the graph you are telling we cannot apply a single condition.

Hope you understand !

18. Dec 1, 2015

nasu

In the OP there is no mention of a graph of position versus time. It's all about velocity.
All these mentions of parabolas may be confusing. The graph he is talking about has just straight lines.

19. Dec 1, 2015

Shehbaj singh

sorry i thought it was position-time graph. Still I think what I said about the locus, I was right.

20. Dec 1, 2015

nasu

I did not refer specifically to your post. There are several post with parabolas. :)
But it is not very clear what the OP actually expects. He did not come back for a while.