The general mathematical definition of work is:
$$W = \int_a^b \vec{F}(r) \cdot d\vec{r}$$
This is known as a
line integral of a vector field. From
Wikipedia:
Applications
The line integral has many uses in physics. For example, the work done on a particle traveling on a curve C inside a force field represented as a vector field F is the line integral of F on C.
So it does represent the work done.
where · is the dot product and r: [a, b] → C is a bijective parametrization of the curve C such that r(a) and r(b) give the endpoints of C.
What is parametrization? Again, from
Wikipedia:
Parametric equations are commonly used to express the coordinates of the points that make up a geometric object such as a curve or surface, in which case the equations are collectively called a parametric representation or parameterization (alternatively spelled as parametrization) of the object. For example, the equations
form a parametric representation of the unit circle, where
t is the parameter.
So it should be clear that ##\vec{r}## is an expression of the coordinates of the path.
If ##\vec{F}(r)## is always parallel to ##d\vec{r}## then you can simplify to:
$$W = \int_a^b F(r)dr$$
If ##F(r)## is constant, you can further simplify to:
$$W = \int_a^b Fdr$$
And if the path from ##a## to ##b## is along a single dimension (say ##x##), then you simplify to:
$$W = F(x_b - x_a) = F\Delta x$$
Which is the simplest form found in physics textbooks.
Mr real said:
now if dx is displacement then it's integral would also be displacement, it cannot be any other quantity.
Here is a representation of ##x## and ##dx## (shown as ##r## and ##dr##):
##dr## is the displacement
along the path, which is what we care about. It is a distance. This is the same vector no matter where is the origin of the reference frame.
##r## is the vector between the origin and the vector ##dr##. It is also a distance. This vector depends on where is the origin.
If ##dr## begins at the origin, then ##r = 0##.
So when we say ##\Delta x = x_2 - x_1##, we actually simplify the vector equation ##\vec{\Delta x} = \vec{x_2} - \vec{x_1}## which looks like ##\vec{dr} = \vec{(r+dr)} - \vec{r}## in the previous figure.