# Verifying $W = \int \vec{F} \cdot d\vec{x}$

Verifying formula for Work;

$$W = \int \vec{F} \cdot d\vec{x} \quad(i)$$

Let us consider a very simple scenario; I will solve first by simple Maths and then by calculus.

Scenario 1: (Force vector is always $$5\vec{i} N$$) [Solving by simple maths,]

A block of mass 2kg is initially at origin($$\vec{x}=0\vec{i}$$) is displaced to $$\vec{x}=8m\vec{i}$$

$$W_{1}=\vec{F} \cdot \vec{s} \quad$$ ; where $$\quad \vec{s}=displacement \ vector$$

$$W_{1}=5*8* \cos(0^{\circ})=40 J$$

$$-------------------------------------------------$$

Scenario 2: (Force vector is always $$5\vec{i} N$$) [Solving by simple maths,]

A block of mass 2kg is initially at $$x=8m\vec{i}$$ is displaced to origin ($$\vec{x}=0\vec{i}$$)

$$W_{2}=\vec{F} \cdot \vec{s}$$

$$W_{2}=5*8* \cos(180^{\circ})=-40 J$$

Work came negative as displacement and force are in opposite direction, here force is opposing in nature like frictional force.

$$------------------------------------------------$$

Now solving same above two scenarios using calculus $$W = \int \vec{F} \cdot d\vec{x} \quad(i)$$

Scenario 1C: (Force vector is always $$5\vec{i} N$$)

A block of mass 2kg is initially at origin($$\vec{x}=0\vec{i}$$) is displaced to $$\vec{x}=8m\vec{i}$$

$$W = \int \vec{F} \cdot d\vec{x}$$ $$W = \int^8_0 F dx\cos(0^{\circ})$$ $$W_{1c}=F(8-0)=40$$

$$-------------------------------------------------$$

Scenario 2C: (Force vector is always $$5\vec{i} N$$)

A block of mass 2kg is initially at $$\vec{x}=8m\vec{i}$$ is displaced to origin($$\vec{x}=0\vec{i}$$).

$$W = \int \vec{F} \cdot d\vec{x} \quad(i)$$ $$W = \int^0_8 F dx\cos(180^{\circ})$$ $$W_{2c}=-F(0-8)=40J$$

But, previously we obtained $$W_2=-40J$$ $$-------------------------------------------------$$

Why are answer for $$W_{2}$$ and $$W_{2C}$$ different though they represent same scenario?

This question is simplified form for confusion in Potential energies for Gravity and Electrostatics.

For Sign convention I read this also Potential energy sign conventions

$$\mathbf{F}\cdot d\mathbf{s}=|\mathbf{F}||d\mathbf{s}|\cos\theta$$ if $$ds<0$$, then $$|d\mathbf{s}|=-ds$$ ($$d\mathbf{s}$$ is a vector, notice the bolded $$s$$).
We suppose that $$x$$ will vary from $$8$$ to $$0$$, obviously $$dx<0$$ (because $$x$$ is decreasing). \begin{align*} \int_{\mathbf{s}_i}^{\mathbf{s}_f}\mathbf{F}\cdot d\mathbf{s}&=\int_{\mathbf{s}_i}^{\mathbf{s}_f}|\mathbf{F}||d\mathbf{s}|\cos(\pi)\\ &=\int_8^0-|\mathbf{F}|(-dx)\\ &=\int_8^0|\mathbf{F}|dx\\ &=-8|\mathbf{F}| \end{align*} You can also use $$(a,b,c)\cdot(d,e,f)=ad+be+cf$$.
Here, $$d\mathbf{s}=(dx,0,0)$$, and its direction depends on the sign of $$dx$$ (to the left, since $$dx<0$$).

• So relieved! and thank you very much Nov 5 '20 at 7:25
• you're welcome!
– Luyw
Nov 5 '20 at 7:47

Your error is because your limits of integration don't agree with the sign convention for $$\mathrm{d}x$$ in 2C. When you do the work line integral from point '8' to point '0', the direction of $$\mathrm{d}\mathbf{s}$$ is in the direction $$8\to0$$, and is in the $$-\mathbf{x}$$ direction, which is the opposite direction as $$\mathbf{F}$$; hence, your equation should read:

$$W=\int_8^0F\mathrm{d}x\cos(0)=-40\text{J}$$

• F has +x direction while displacement(ds) has -x direction in $2C$, assume force here is frictional force, which is trying to stop a sliding body. Nov 5 '20 at 6:19