To calculate the change in kinetic energy, you must know the force as a function of position. The work done by the force causes the kinetic energy change
Step-by-step explanation:
The work-energy theorem states that the change in kinetic enegy of an object is equal to the work done on the object:

where the work done is the integral of the force over the position of the object:

As we see from the formula, the magnitude of the force F(x) can be dependent from the position of the object, therefore in order to solve correctly the integral and find the work done on the object, it is required to know the behaviour of the force as a function of the position, x.