Step 1: Recall the relation between charge density and electric field.
From Poisson’s equation,
\[
\frac{dE}{dx} = \frac{\rho(x)}{\varepsilon},
\]
where \( \rho(x) \) is the charge density and \( \varepsilon \) is the permittivity of the semiconductor.
Step 2: Analyze the given \( \rho(x) \) profile.
The charge density varies linearly with \( x \), being negative on the p-side and positive on the n-side. Therefore, the derivative of \( E \) with respect to \( x \) is linear, implying that \( E(x) \) must vary quadratically if \( \rho(x) \) were constant, but since \( \rho(x) \) is linear, \( E(x) \) will vary linearly.
Step 3: Determine the behavior of \( E(x) \).
- The slope of \( E(x) \) on the p-side is positive (since \( \rho(x) \) is negative).
- The slope of \( E(x) \) on the n-side is negative (since \( \rho(x) \) is positive).
At \( x = 0 \), the electric field passes through zero because the net electric field in equilibrium must balance across the junction.
Step 4: Graphical interpretation.
Thus, \( E(x) \) increases linearly from \( -W/2 \) to 0, and decreases linearly from 0 to \( W/2 \), forming an inverted V-shape centered at the origin.
Step 5: Final Answer.
Hence, the correct graph is the one shown in Option (B).