# Calculating the electric field in a parallel plate capacitor, being given the potential difference

I want to calculate the electric field (magnitude and direction) in a parallel plate capacitor. The capacitor has a plus side and a minus side.

What I have been given is that the potential at the plus side, V+, is 0 V and the potential at the minus side,V-, is -105 V. So the potential difference V+ - V- = 105 V.

I want to calculate the electric field between the parallel plates from this relation: $V_{B} - V_{A} = - \int_A^B \! \vec{E} \cdot \mathrm{d}\vec{l} = - \int_A^B E \cos{(\phi)} \, \mathrm{d}l$.

We only work in one dimension here, so the signs will determine the directions of the vectors. I placed an x-axis, with its origin at the plus plate and it is increasing towards the minus side. I also chose the distance between the plates to be 1m. So the x coördinate of the plus-side is 0 and the x coördinate of the minus side is 1. Here is a sketch of the situation:

I chose my $x$-axis in this way because I wanted my $\vec{E}$ to be positive. Now it points in the positive x-direction.

So now let's get into the calculation:

$V_{+} - V_{-} = 10^{5} \, \mathrm{V} = - \int_{x_{-}}^{x_{+}} \! \vec{E} \cdot \mathrm{d}\vec{l} = -\int_{x_{-}}^{x_{+}} \! E \cos{(\phi)} \, \mathrm{d}l$.

We know that E is constant between the two plates and that it points from the plus side to the minus side. We integrate from $x_{-}$ to $x_{+}$ so $\mathrm{d}\vec{l}$ goes from the minus side to the plus side. So $\mathrm{d}\vec{l}$ is in the opposite direction of $\vec{E}$. This means that the angle $\phi$ between them is $\pi$ and $\cos{(\pi)} = -1$. The equation becomes: $10^{5} \, \mathrm{V} = - E \, (-1) \int_{x_{-}}^{x_{+}} \! \mathrm{d}l = E \, (x_{+} - x_{-}) = E \, (0 \, \mathrm{m} - 1 \, \mathrm{m}) = -1 \, \mathrm{m} \, E \Longleftrightarrow E = \frac{10^{5} \, \mathrm{V}}{-1 \, \mathrm{m}} = -10^{5} \frac{\mathrm{V}}{\mathrm{m}} = -10^{5} \frac{\mathrm{N}}{\mathrm{C}}$.

My $E$ turned out to be negative. This confuses me, because I chose my x-axis in a way where E would point to the positive direction. What did I do wrong?

• Think about the fact that the electric field "flows" from high potential to low potential. Commented Jun 19, 2017 at 20:20
• $\vec E \cdot d\vec l$ is negative as the two vectors are in opposite directions or put another way $\phi$ is $180 ^\circ$. Commented Jun 19, 2017 at 20:26
• @Farcher, they accounted for that when they talk about the $\cos(\pi)$ term. The issue is (I think) they double count this effect when they substitute $\int_{x_-}^{x_+}dl = (x_+ - x_-)$. But I'm not sure how to explain that. Commented Jun 19, 2017 at 20:33
• You need to look at the problem not the Mathematics. The double counting of the negative sign is the most common error in this sort of derivation and the derivation of the electric field being minus the potential gradient. Going from the right plate to the left requires positive work to be done by an external force or negative work done by the electric field. Either way the potential increases. Commented Jun 19, 2017 at 20:53
• So what should my calculations look like @Farcher? Should I just do: E = U/d and then know that the direction of E is the direction of the decreasing potential? Commented Jun 19, 2017 at 21:44

Back to basics:

$$\vec E = -\nabla V$$

In one dimension, $x$, we have

$$E_x \mathrm{d}x = -\mathrm{d}V(x)$$

Now, a positive electric field is in the $+x$ direction, i.e., integrating $E_x$ from 0 to 1 will give a positive result if the electric field is positive definite.

$$\int_0^1E_x \mathrm{d}x = -V(1) + V(0) = -(-10^5) + 0 = 10^5 \mathrm{V}$$

We know that (ignoring fringing fields), the electric field is constant between the plates and so

$$E_x = 10^5\mathrm{\frac{V}{m}}$$

But why doesn't it work the other way around?

I think your limits of integration are switched around. In the general case, one parameterizes the curve with say, $t$ and writes

$$\int_C \vec E \cdot \mathrm{d}\vec l = \int_a^b \vec E(\vec x(t))\cdot\frac{\mathrm{d}\vec x(t)}{\mathrm{dt}}\,\mathrm{dt}$$

For this case, we could write

$$\int_0^1 E(x(t))\frac{\mathrm{d}x(t)}{\mathrm{dt}}\,\mathrm{dt}$$

Since the path is from $x=1$ to $x=0$, it must be that

$$x(t) = 1 - t \rightarrow \frac{\mathrm{d}x(t)}{\mathrm{dt}} = - 1 \mathrm{m}$$

thus, for $E$ constant, we have

$$\int_0^1 E(x(t))\frac{\mathrm{d}x(t)}{\mathrm{dt}}\,\mathrm{dt} = -\int_0^1 E(1 - t)\,\mathrm{dt} = -E\int_0^1 \mathrm{dt} = -E \cdot 1\, \mathrm{m}$$

Then

$$\Delta V = 10^5\,\mathrm{V} = -\int_C \vec E \cdot \mathrm{d}\vec l = -(-E \cdot 1\, \mathrm{m}) \rightarrow E = 10^5 \mathrm{\frac{V}{m}}$$

• This makes so much sense, thanks for your answer. But why doesn't it work the other way around? $V(0) - V(1) = - \int_1^0 E_x \mathrm{d}x = - E_x (-1 \mathrm{m})$. So $E_x = 10^5\mathrm{\frac{V}{m}}$. But $E = \frac{E_x}{cos(\phi)} = \frac{E_x}{-1}\mathrm{\frac{V}{m}}$ (because we integrated from 1 to 0, $\mathrm{d}\vec{x}$ points from 1 to 0 and $\vec{E}$ points from 0 to 1, so $\phi = \pi$). And $E =\frac{E_x}{-1}\mathrm{\frac{V}{m}}=-10^5\mathrm{\frac{V}{m}}$. So it is negative, and yours is positive. I must be doing something wrong. Can you please tell me what I did wrong there? Commented Jun 20, 2017 at 5:35
• In your answer $\phi = 0$ because $\vec{E}$ points from 0 to 1, and so does $\mathrm{d}\vec{x}$ because you integrate from 0 to 1. But in my calculations, I integrate from 1 to 0 and $\mathrm{d}\vec{x}$ points from 1 to 0 then, but the electric field still points from 0 to 1. So in my calcs, $\vec{E}$ and $\mathrm{d}\vec{x}$ oppose eachother, so $\phi = \pi$. You and I started with the same formula but I ended up with a negative $\vec{E}$ and you with a positive. This confuses me so much, where did I go wrong? Is it a reasoning mistake or a mathematical one? Commented Jun 20, 2017 at 5:46
• @I.Wewib, I updated my answer Commented Jun 20, 2017 at 15:51

If the integration limits are in terms of $x$, you must change integration variables from $dl$ to $dx$. In your chosen coordinate system, $dx=-dl$, so making the correct variable substitution fixes the sign.

My $E$ turned out to be negative. This confuses me, because I chose my x-axis in a way where E would point to the positive direction. What did I do wrong?

It all depends which direction you define to be positive.

Is it $\hat x$ or is it $\hat l$?

From your diagram you have define a unit vector $\hat x$ and two position vectors $0 \,\hat x$ and $1 \,\hat x$ where the zero and the one are the components of the position vectors in the $\hat x$ direction.

Let $\vec E = E \,\hat x$ and $d\vec x = dx \,\hat x$.

As the unit vector direction has been defined you can take $E$ and $dx$ to be components of vectors $\vec E$ and $d\vec x$ in the $\hat x$ direction.

So $\vec E \cdot d\vec x = (E\,\hat x) \cdot (dx\,\hat x) = E \,dx$ where the $dx$ is determined by the path taken.

Work done by the electric field in taking unit positive charge from $x=0$ to $x=1$ is $\displaystyle \int^1_0 E\,dx = E$ if the electric field is constant.

Minus the work done by the electric field (the result of the integration) gives you the change in potential in going from $x=0$ to $x=1$ which gives

$-E = -100000-0 \Rightarrow E = 100\,000 \Rightarrow E = 100\,000 \,\hat x$.

So you have found the electric field to have a magnitude of $100\,000 \, \rm Vm^{-1}$ in the $\hat x$ direction.

Now look at the work done by the electric field in going from $x=1$ to $x=0$.
All that has to be done is to change the limits of the integration as the result of doing the dot product does not change.

$\displaystyle \int^0_1 E\,dx = -E$ and minus this quantity gives you the change in potential in going from $x=1$ to $x=0$ which gives

$-(-E) = 0-(-100000) \Rightarrow E = 100\,000 \Rightarrow E = 100\,000 \,\hat x$ as before.

You will note that integration determines the $dx$ steps and their sign along the path.

Now you introduced in your diagram a vector $d \vec l$ which we can assume to be equal to $dl\, \hat l$ where $\hat l = -1 \,\hat x$.

If you want the position vectors $0\, \hat x$ and $0\, \hat l$ to both be the origin then position $x=1\,(x \,\hat x = 1 \, \hat x)$ must also be position $l=-1\,(l\,\hat l = -1\, \hat l)$.

Having assigned the two positions we have $\vec E = E \,\hat l$ and $d\vec l = dl\,\hat l$ where $E$ is the component of the electric field in the $\hat l$ direction.

The direction of the electric field will become apparent after the integration has been done.

$\vec E \cdot d\vec l = (E\,\hat l) \cdot (dl\,\hat l) = E \, dl$

Work done by the electric field in going from $l=0$ to $l=-1$ is $\displaystyle \int^{-1}_0 E\,dl = -E$

Minus the work done by the electric field (minus the result of the integration) gives you the change in potential in going from $l=0$ to $l=-1$ which gives

$-(-E) = -100000-0 \Rightarrow E = -100\,000 \Rightarrow \vec E = -100\,000 \,\hat l$

or $\vec E = 100\,000 \,(-\hat l) = 100\,000\, \hat x$ as before.

When you write: $\vec{E}\cdot\vec{dl}=E\cos(\phi)dl$, that means that dl is the norm of the infinitesimal line-segment of your path. It is always positive ! Therefore, $\int_{x+}^{x_-} dl$ is the length of the segment between x+ and x-.

I guess you should write $\vec{E}\cdot\vec{dl}=\vert E \vert\cos(\phi) \vert{dl}\vert$ and then:

$\int_{x+}^{x_-} \vert{dl}\vert = \vert \int_{x+}^{x_i} dl \vert_{dl>0} \vert + \vert\int_{xi}^{x_{i+1}} dl \vert_{dl<0} +...+ \vert\int_{x_n}^{x_-} dl \vert_{dl>0}= \vert\int_{x+}^{x_{-}} dl \vert_{dl<0} =\vert x_- -x_+ \vert$ which is positive.

NB: What I do in the last step is to separate the integral in pieces with dl of the same sign, which was not necessary in your case as in your whole path (1D), dl was negative.

• Oh really? Is that how it works? I already knew that $\vec{E}\cdot\vec{dl}=\vert E \vert\cos(\phi) \vert{dl}\vert$. But I didn't know that $\int_{x+}^{x_-} \vert{dl}\vert = \vert \int_{x+}^{x_-} dl \vert$. I thought this: $\int_{x+}^{x_-} \vert{dl}\vert = \vert x_{-} \vert - \vert x_{+} \vert$. Are you sure that what you wrote is mathematically correct? Commented Jun 19, 2017 at 22:35
• I edited my answer, it might be more clear now.
– Pao
Commented Jun 20, 2017 at 7:29