(a) To find the coordinates of \(M\), we first find the derivative of \(y = (2-x)e^{-\frac{1}{2}x}\) using the product rule:
\(\frac{dy}{dx} = \left(-\frac{1}{2}(2-x)e^{-\frac{1}{2}x} - e^{-\frac{1}{2}x}\right)\).
Set \(\frac{dy}{dx} = 0\) to find the critical points:
\(-\frac{1}{2}(2-x)e^{-\frac{1}{2}x} - e^{-\frac{1}{2}x} = 0\).
Simplifying gives \(x = 4\).
Substitute \(x = 4\) back into the original equation to find \(y\):
\(y = (2-4)e^{-\frac{1}{2} \times 4} = -2e^{-2}\).
Thus, the coordinates of \(M\) are \((4, -2e^{-2})\).
(b) To find the area of the shaded region, integrate the function from \(x = 0\) to \(x = 2\):
\(\int_{0}^{2} (2-x)e^{-\frac{1}{2}x} \, dx\).
Using integration by parts, we find:
\(\int (2-x)e^{-\frac{1}{2}x} \, dx = -2(2-x)e^{-\frac{1}{2}x} - 2xe^{-\frac{1}{2}x}\).
Evaluate from \(x = 0\) to \(x = 2\):
\(\left[-2(2-x)e^{-\frac{1}{2}x} - 2xe^{-\frac{1}{2}x}\right]_{0}^{2} = 4e^{-1}\).
Thus, the area of the shaded region is \(4e^{-1}\).