When force changes, Newton's law becomes a differential equation. Write a=dvdta=\frac{dv}{dt}a=dtdv if you want time, or a=vdvdxa=v\frac{dv}{dx}a=vdxdv if you want distance, separate the variables and integrate with the initial conditions.