A rectangle has a length of 2d and a height of d. Each of the following three charges is located at a corner of the rectangle: +q1 (upper left corner), +q2 (lower right corner), and -q (lower left corner). The net electric field at the (empty) upper right corner is zero. Find the magnitudes of q1 and q2. Express your answers in terms of q.

THere are a number of ways to do this, some more difficult than others.

If you note the E due to q2 is upward, and the E due to q1 is horizontal, then the E due to q3 must add to zero. That is, the E due to q3 in the horizontal direction must be equal and opposite to q1, and The E due to q3 in the vertical must be equal and opposite to Q2

So dealing with q3 first.
letting o be the distance of the horizontal (o^2=d^2+4d^2=5d^2; or o=dsqrt5)
Ehorizontal=k q/o^2*2d/o=2kqd/o^3
Evertical= kq/o^2*d/o=kqd/o^3

So now setting the vertical of q3 equal to the vertical of q2
k*q2/d^2=kqd/o^3

q2=q (d/o)^3=q(d/dsqrt5)^3=q/5sqrt5

now, setting the horizontal of q3 equal to the horizontal of q1
kq1/4d^2=2kqd/o^3
q1=8q (d/o)^3 and you can finish the algebra.

Check all this math, I did it in my head keying it in.

To find the magnitudes of q1 and q2 in terms of q, we can analyze the net electric field at the empty upper right corner.

First, let's consider the electric field contributed by q1 at the empty upper right corner. The electric field, E1, produced by point charge q1 can be calculated using Coulomb's law:

E1 = k * (q1) / r1^2,

where k is the electrostatic constant (approximately 9 x 10^9 N m²/C²) and r1 is the distance between q1 and the empty upper right corner.

Now, let's consider the electric field contributed by q2 at the empty upper right corner. The electric field, E2, produced by point charge q2 can be calculated similarly:

E2 = k * (q2) / r2^2,

where r2 is the distance between q2 and the empty upper right corner.

Since the empty upper right corner has a net electric field of zero, the magnitudes of E1 and E2 must be equal. So, we have:

E1 = E2.

Substituting the expressions for E1 and E2, we get:

(k * (q1) / r1^2) = (k * (q2) / r2^2).

Next, we can simplify this equation by rearranging it to solve for q1 in terms of q2:

q1 = (q2 * (r1^2)) / (r2^2).

But we know the dimensions of the rectangle: the length is 2d, and the height is d. Using these dimensions, we can calculate the distances r1 and r2.

r1 = √((2d)^2 + d^2) = √(4d^2 + d^2) = √(5d^2) = √5d.

r2 = √(d^2 + d^2) = √(2d^2) = √2d.

Substituting these values into the equation for q1, we get:

q1 = (q2 * (√5d)^2) / (√2d)^2.

Simplifying further:

q1 = (q2 * 5d) / (2d).

Finally, we can cancel out the d term on the numerator and denominator:

q1 = (q2 * 5).

So, the magnitude of q1 is 5 times the magnitude of q2.