The previous formula only works if the object moves with a constant velocity.
In many cases, objects' velocities change over time.
In such a case, velocity is a function that we integrate.
Displacement = Velocity dt
In complex motion, there isn't an analytical solution (i.e. a simple formula).