[![Diagram](https://i.stack.imgur.com/8Ij8u.jpg)](https://i.stack.imgur.com/8Ij8u.jpg)

Suppose you have two equal point charges of magnitude $q$ and mass $m$ suspended by strings of length $L$ on opposite sides of a pendulum, both making an angle of theta with the $y$-axis. The question asks to demonstrate that the charge of the particles are given by $$q=2L\sin{\theta}\sqrt{\frac{mg\tan{\theta}}{k\_e}}$$

But what I got was

(1) $F\_g=F\_e$

(2) $mg\sin{\theta}=\frac{q^2k\_e}{r^2}$

(3) $mg\sin{\theta}=\frac{q^2k\_e}{(2L\sin{\theta})^2}$

(4) $q=2L\sin{\theta}\sqrt{\frac{mg\sin{\theta}}{k\_e}}$

Which obviously has the incorrect trig function inside the radical, but I'm not sure where it would come from. Anyone know what I'm doing wrong?