Let the given integral be denoted by \( I \). \[ I = \int_{0}^{4042} \frac{\sqrt{x}}{\sqrt{x} + \sqrt{4042 - x}} \, dx \quad \quad (1) \]
We will use the property of definite integrals: \[ \int_{0}^{a} f(x) \, dx = \int_{0}^{a} f(a - x) \, dx \] Here, \( a = 4042 \) and \( f(x) = \frac{\sqrt{x}}{\sqrt{x} + \sqrt{4042 - x}} \). Applying the property, we replace \( x \) with \( a - x = 4042 - x \): \[ I = \int_{0}^{4042} \frac{\sqrt{4042 - x}}{\sqrt{4042 - x} + \sqrt{4042 - (4042 - x)}} \, dx \] \[ I = \int_{0}^{4042} \frac{\sqrt{4042 - x}}{\sqrt{4042 - x} + \sqrt{4042 - 4042 + x}} \, dx \] \[ I = \int_{0}^{4042} \frac{\sqrt{4042 - x}}{\sqrt{4042 - x} + \sqrt{x}} \, dx \quad \quad (2) \]
Now, add equation (1) and equation (2): \[ I + I = \int_{0}^{4042} \frac{\sqrt{x}}{\sqrt{x} + \sqrt{4042 - x}} \, dx + \int_{0}^{4042} \frac{\sqrt{4042 - x}}{\sqrt{x} + \sqrt{4042 - x}} \, dx \] \[ 2I = \int_{0}^{4042} \left( \frac{\sqrt{x}}{\sqrt{x} + \sqrt{4042 - x}} + \frac{\sqrt{4042 - x}}{\sqrt{x} + \sqrt{4042 - x}} \right) \, dx \] \[ 2I = \int_{0}^{4042} \frac{\sqrt{x} + \sqrt{4042 - x}}{\sqrt{x} + \sqrt{4042 - x}} \, dx \] \[ 2I = \int_{0}^{4042} 1 \, dx \]
Evaluate the integral: \[ 2I = [x]_{0}^{4042} \] \[ 2I = 4042 - 0 \] \[ 2I = 4042 \]
Solve for \( I \): \[ I = \frac{4042}{2} \] \[ I = 2021 \]
The value of the integral is 2021. This corresponds to option (B).