(i) To find the \(x\)-coordinate of the maximum point \(M\), we need to find the derivative of \(y = x^2 e^{2-x}\) and set it to zero.
Using the product rule, the derivative is:
\(\frac{dy}{dx} = 2x e^{2-x} - x^2 e^{2-x}\).
Setting \(\frac{dy}{dx} = 0\), we have:
\(2x e^{2-x} - x^2 e^{2-x} = 0\).
Factor out \(e^{2-x}\):
\(e^{2-x} (2x - x^2) = 0\).
Since \(e^{2-x} \neq 0\), we solve \(2x - x^2 = 0\).
\(x(2 - x) = 0\).
Thus, \(x = 0\) or \(x = 2\). Since \(M\) is a maximum point, \(x = 2\).
(ii) To find \(\int_0^2 x^2 e^{2-x} \, dx\), use integration by parts twice.
First integration by parts:
Let \(u = x^2\), \(dv = e^{2-x} \, dx\).
Then \(du = 2x \, dx\), \(v = -e^{2-x}\).
\(\int x^2 e^{2-x} \, dx = -x^2 e^{2-x} + \int 2x e^{2-x} \, dx\).
Second integration by parts on \(\int 2x e^{2-x} \, dx\):
Let \(u = 2x\), \(dv = e^{2-x} \, dx\).
Then \(du = 2 \, dx\), \(v = -e^{2-x}\).
\(\int 2x e^{2-x} \, dx = -2x e^{2-x} + \int 2 e^{2-x} \, dx\).
\(\int 2 e^{2-x} \, dx = -2 e^{2-x}\).
Thus, \(\int x^2 e^{2-x} \, dx = -x^2 e^{2-x} - 2x e^{2-x} - 2 e^{2-x}\).
Evaluate from 0 to 2:
\(\left[ -x^2 e^{2-x} - 2x e^{2-x} - 2 e^{2-x} \right]_0^2\).
At \(x = 2\), the expression is \(-4e^0 - 4e^0 - 2e^0 = -10\).
At \(x = 0\), the expression is \(0\).
Therefore, the integral is \(2e^2 - 10\).