Sorry I'm not sure where to post this it is really more of a Maths questions.

I have a ball. It likes to accelerate and decelerate in a non-constant way :)
I have friction (which makes my life hell)!!!
My client moves the ball and the server also predicts the position of the ball every 500ms. At the moment this is working beautifully WITHOUT friction.
Both the client and server code are working with time, but the server usually has a longer time period between working out positions than the client.

This is working perfectly on client + server:
Java Code:
x += 0.5 * vx * time;
vx += accel * time;
x += 0.5 * vx * time;
Great, but I need friction to slow stuff down! I tried using something like this in various places but I can't get it to sync the client + server correctly:
Java Code:
vx *= Math.pow(fric, time);
I know I'm close but just need to get this in somewhere. I also have a feeling it is not position to work out exactly correctly and that some form of integration/polynomials is needed.. but guessing this problem MUST have been solved before I'm posting here.

Thanks for reading and your help,