gl/ripetizioni

Physics 2: electric field and Gauss's law in the exam

Electric field, flux and Gauss's law for the first Physics 2 midterm: how to choose the Gaussian surface, with three worked examples.

by Gaetano Livornese

Read the original in Italian

End of September 2026, second year of engineering or physics: the first semester of Physics 2 has just started and the syllabus follows almost everywhere the same order, electrostatics before everything else. The electric field and flux arrive in the first weeks, and Gauss’s law is explained between October and the beginning of November. Every university has its own teaching calendar — check the exact dates on your course’s website — but the first midterm (prova in itinere) typically falls between the beginning and the middle of November, so six to seven weeks from now, and almost always covers pure electrostatics: field, potential, Gauss’s law, capacitors. The rest — magnetism, induction, Maxwell’s equations — comes later, in the second midterm or in the final written exam.

If you have done Physics 1 you already know how to move around with vectors and integrals; here the same method is applied to a new object, the electric field, and to a tool that high school does not give: Gauss’s law. If kinematics and dynamics are not yet solid, you will find the dedicated treatment in Physics 1: kinematics and dynamics for the midterm.

Electric field: the reminder you need before Gauss

The electric field generated by a point charge at distance is

directed along the line joining the charge to the point, outward if , inward if . For several point charges the superposition principle applies: the individual fields are added vectorially.

For a continuous distribution of charge (a wire, a surface, a volume) the sum becomes an integral over the charge element :

This integral is almost always difficult to calculate directly, because changes direction point by point. It is exactly the problem that Gauss’s law solves, but only when the distribution has a usable symmetry: spherical, cylindrical or planar. Without symmetry, the direct integral (or numerical calculation) remains the only way.

Flux of the electric field

The flux of a vector field through a surface measures how much field “crosses” that surface, taking into account the angle between the field and the normal to the surface:

The symbol indicates that the integral is over a closed surface — this is the case needed for Gauss’s law. The normal always points outward from the surface, by convention: a positive flux means net outgoing field, negative means net incoming field. If the field is perpendicular to the surface at every point and has constant magnitude on it, the integral reduces to a simple product, : it is exactly the situation that the choice of the Gaussian surface must construct.

Gauss’s law

The flux of the electric field through any closed surface depends only on the charge enclosed inside, , and not on the shape of the surface or on external charges (which contribute to the field at every point, but whose net flux through the closed surface is always zero).

The point that causes most confusion is this: Gauss’s law always holds, for any charge distribution and any closed surface — it is not an approximation valid only in special cases. What holds only in special cases is its practical usefulness for calculating : the law gives a single scalar equation, and to get back to the vector field you need symmetries that allow to be taken out of the integral. The three symmetries that work are spherical, cylindrical and planar (infinite, or treated as such close to the plane). Outside these three cases, Gauss’s law remains true but does not help to find : you go back to the direct integral or to numerical methods.

How to choose the Gaussian surface: a 5-step procedure

  1. Identify the symmetry of the charge distribution. Spherical (depends only on from the centre), cylindrical (depends only on the distance from the axis), or planar (depends only on the distance from the plane).
  2. Choose a Gaussian surface with the same symmetry: a concentric sphere for spherical symmetry, a coaxial cylinder for cylindrical, a “box” (or a cylinder) that crosses the plane for planar. The surface is imaginary: it serves only for the calculation, it does not exist physically.
  3. Check that on every portion of the surface is parallel or perpendicular to , with constant magnitude where it is parallel. If this does not happen, the chosen surface is not suitable, or the symmetry cannot be exploited.
  4. Calculate , the charge enclosed by the Gaussian surface — often a fraction of the total charge, if the chosen point is inside the distribution.
  5. Solve for , where is the area of the portion of surface where is parallel to (the portions where is perpendicular to contribute zero flux and are left out of the calculation).

Three worked examples

1. Uniformly charged insulating sphere

An insulating sphere of radius has total charge distributed uniformly in its volume, with density . Find inside and outside the sphere.

Outside the sphere (). Gaussian surface: a concentric sphere of radius . By symmetry, is radial and has constant magnitude over the whole surface, so . The enclosed charge is all the charge of the sphere, :

Identical to the field of a point charge placed at the centre: from outside, a spherical distribution behaves as if it were all concentrated at the centre.

Inside the sphere (). Same Gaussian surface, radius this time. The enclosed charge is no longer all of : it is only the fraction contained in the volume of radius , proportional to the volume (the density is uniform):

Inside the sphere the field grows linearly with , not as : at it is zero (no enclosed charge), and it grows up to the surface value , where the two expressions coincide: from both sides — the field is continuous, as it must be for a distribution with no concentrated surface charges. The graph of is therefore a rising straight line from 0 to , followed by a curve that decreases as for : the maximum of the field is exactly at the surface of the sphere.

Try the method also on the Physics 2 simulation: the correct answer to every question is free, the guided solution unlocks with the first lesson.

2. Infinite charged wire

An infinite straight wire has a constant linear charge density (charge per unit length). Find the field at distance from the wire.

Cylindrical symmetry: the field depends only on the distance from the axis, and is radial with respect to the wire (perpendicular to it at every point, for reasons of symmetry — there is no direction along the wire preferred over another). Gaussian surface: a cylinder coaxial with the wire, radius , height chosen arbitrarily (it cancels out in the calculation).

The flux crosses only the lateral surface of the cylinder: on the two bases, is parallel to the bases themselves (perpendicular to , which there points along the axis), so the flux through the bases is zero. On the lateral surface, is constant and parallel to :

The charge enclosed in the cylinder of height is :

The field of the infinite wire decreases as , not as : it is “slower” to die away than the point charge, precisely because the charge is distributed along an entire infinite line and not concentrated at a point. The exact same procedure, with the same cylindrical Gaussian surface, holds for a cylinder uniformly charged in volume: outside the cylinder the result is identical (all the enclosed charge counts), inside the same proportionality reasoning seen for the insulating sphere is repeated, but with the area of the circular cross-section in place of the volume of the sphere.

3. Two infinite charged planes (parallel-plate capacitor)

Two parallel infinite planes have surface charge densities and , with a distance between them that is small compared with the extent of the planes (infinite-plane approximation). Find the field in the three regions: to the left of the first plane, between the two planes, to the right of the second.

The field generated by a single uniformly charged infinite plane, with density , is found with a “box”-shaped (or cylinder-shaped) Gaussian surface that crosses the plane, with the two bases parallel to the plane itself and equidistant from it. By symmetry the field is perpendicular to the plane and has the same magnitude on the two bases, outgoing on both sides if . The flux crosses only the two bases (the lateral surface is parallel to the field):

a constant field, independent of the distance from the plane — unlike the sphere and the wire, here there is no decay, because the plane is infinite in every direction.

With two planes of opposite sign, the two fields are superposed (superposition principle, no new Gaussian surface is needed):

  • To the left of the positive plane: the two fields have opposite directions (that of the plane points left, that of the plane points right, attracting positive charges towards itself, so to the right) and cancel: .
  • Between the two planes: both fields point in the same direction, from the positive plane towards the negative one, and add: .
  • To the right of the negative plane: again opposite directions, .

This is exactly the model of the parallel-plate capacitor: a uniform field, non-zero only in the region between the plates, zero outside. It is why a parallel-plate capacitor “traps” the electric field between its plates instead of dispersing it into space.

From field to potential

The electric potential is obtained from the field by integration along a path, with the minus sign that makes it a decreasing function along the direction of the field:

For a point charge (or, from outside, for the uniformly charged sphere of exercise 1), integrating from a reference at infinite distance (where by convention ) to :

For the infinite wire, however, the reference at infinite distance cannot be used — the potential diverges logarithmically — and you integrate between two finite radii and :

The field, at every point, is (minus) the gradient of the potential: where is simpler to calculate with Gauss, it is always better to start from there rather than tackle the potential directly with a charge integral.

Typical mistakes

  • “Gauss always holds, so I always use it to calculate ”. The law is always true, but it gives explicitly only with a usable symmetry (spherical, cylindrical, planar). On an arbitrary distribution, Gauss’s law remains a correct equation but cannot be solved for .
  • Wrong enclosed charge. is the charge enclosed by the Gaussian surface, not the total charge of the system. With a non-uniform distribution or with several charged objects, it has to be calculated carefully — it is the most common mistake in the insulating sphere exercise, where it happens that is used for too.
  • Direction of the normal. always points outward from the Gaussian surface. A mistake of direction here inverts the sign of the flux and, in cascade, the sign of .
  • Confusing and . They are linked by : using in place of (or vice versa) by oversight produces a factor too many or too few — a mistake that the dimensional check alone does not catch, it has to be checked in your head.

Preparing for the midterm

The topics of this block — field, flux, Gauss, potential, capacitors — cover the pure electrostatics part of the first midterm. If your course follows a different order (some universities bring capacitors forward, others treat them later together with circuits), the logical structure stays the same: first the field, then the tool for calculating it in symmetric cases, then the potential as its consequence.

For the full picture of the course, beyond Gauss’s law, you will find the Physics 2 simulation on the whole syllabus: electrostatics, circuits, magnetism, induction. Here too the correct answer to every question is free, the guided solution unlocks with the first lesson. The picture of the subjects I teach at university is on university tutoring, and the reference page for physics in general is /materie/fisica/.

If you need electrostatics with more exercises on potential and capacitors, you will find them in electric potential and capacitors. On the mechanical side, the first exam is in Physics 1: kinematics and dynamics and the more advanced course is rational mechanics.

If you want a hand setting up the exercises or reviewing your notes before the midterm, start with a free introductory call: half an hour to work out where to concentrate your revision.

Keep reading

Want to put what you read into practice?

Let's talk for 30 minutes, free: we look together at where you are stuck and I tell you honestly how I can help.

Or message me on WhatsApp.