Step 1: Understand the setup
Three charges lie on a line of length \(d\). Charge \(q\) is at 0, charge \(Q\) is at \(\frac{d}{3}\) and charge \(+4q\) is at \(d\). We want the net force on \(q\) to be zero.
Step 2: Find the sign of Q
The charge \(+4q\) is positive, so it repels \(q\) away from itself. The push on \(q\) is therefore directed away from \(+4q\). To cancel it, \(Q\) must pull \(q\) the other way. Pulling means attraction, so \(Q\) must be negative.
Step 3: Write the distances
Distance of \(Q\) from \(q\): \(r_1=\frac{d}{3}\). Distance of \(+4q\) from \(q\): \(r_2=d\).
Step 4: Balance the two forces
\[ \frac{1}{4\pi\epsilon_0}\frac{q|Q|}{(d/3)^2}=\frac{1}{4\pi\epsilon_0}\frac{q(4q)}{d^2} \] Cancel the common factor and \(q\): \[ \frac{9|Q|}{d^2}=\frac{4q}{d^2}\ \Rightarrow\ |Q|=\frac{4q}{9} \] With the negative sign, \(Q=-\frac{4q}{9}\).
Step 5: Check the other options
\(-\frac{q}{2}\), \(-\frac{3q}{2}\) and \(-\frac{4q}{3}\) have the right sign but the wrong size. For example \(-\frac{4q}{3}\) would give a pull on \(q\) three times too strong, so \(q\) would not stay at rest.
Final Answer:
The charge needed is \(-\frac{4q}{9}\), option (D).
\[ \boxed{Q=-\dfrac{4q}{9}} \]