I've been trying to get my head around this problem I've had for a while now as I'm just reviewing some things I've forgotten from my lecture notes from last year. Here is the sentance I'm not getting (it's in regards to the depletion region in a MOSFET beneath the gate):

"By simple application of Gauss's Law, we know that the electric field at any x is equal to the total charge per unit area between the edge of the depletion layer (x=0) and the point x, divided by εs, the permittivity of the silicon. We obtain the surface potential ψ by integrating this electric field from x=0 to the surface (x=x0):

ψ=-((ρx0^2)/2εs)"

Working backwards I found that the electric field is then:

-δψ/δx = E = ρx/εs

With ρ as the total charge per unit area between the edge of the depletion layer and also being equal to Q/A (total charge over area), then:

E = Qx/Aεs = Dx/εs

But D is the electric displacement field and is equal to D = εsE. I don't see how the analysis above has worked and the last equation seems to be imbalanced with an extra x on one side of the equation. If anyone can shed some light on this it would be much appreciated! It's probably something really trivial. Let me know if there's anything else you may need to help.