# Electrostatics - Coulomb's Law

I'm doing example 2.1 in Griffith's Electrodynamics book. Can someone explain where the cos(theta) comes from in the formula for dE? The formula is on the first image: Here.

SOLVED:

I see what's going on. If you add the r_hat vectors you end up with 2(z/r)z_hat. z/r=cos(theta). So we end up with 2cos(theta)z_hat.

that looks so hard. are you supposed to figure out that formula all by yourself

that looks so hard. are you supposed to figure out that formula all by yourself

No, the formula is given to you in a general form.