The work function \( W \) is given by the equation:
\[
W = \frac{hc}{\lambda}
\]
where:
- \( W = 4 \, \text{eV} \) is the work function,
- \( h = 6.626 \times 10^{-34} \, \text{J·s} \) is Planck's constant,
- \( c = 3 \times 10^8 \, \text{m/s} \) is the speed of light,
- \( \lambda \) is the wavelength of light in meters.
Rearranging the formula to solve for \( \lambda \), we get:
\[
\lambda = \frac{hc}{W}
\]
Substitute the values:
\[
\lambda = \frac{6.626 \times 10^{-34} \times 3 \times 10^8}{4 \times 1.602 \times 10^{-19}} \approx 400 \, \text{nm}
\]
Thus, the longest wavelength of light that can cause photoelectron emission is 400 nm.