Answer: The mean value of a function on an interval is
\(\text{mean} = \frac{1}{b-a}\int_a^b f(x)\,dx\).
For \(y=e^x\) on \(0\le x\le 2\),
\(\text{mean value of }y\text{ wrt }x = \frac{1}{2-0}\int_0^2 e^x\,dx = \frac{1}{2}[e^x]_0^2 = \frac{e^2-1}{2}.\)
So the mean value is \(\frac{e^2-1}{2}\).
Now write \(x\) in terms of \(y\): \(x=\ln y\). Over \(1\le y\le e^2\), the mean value of \(x\) with respect to \(y\) is
\(\text{mean} = \frac{1}{e^2-1}\int_1^{e^2} \ln y\,dy.\)
Integrating by parts,
\(\int \ln y\,dy = y\ln y-y + C\).
Hence
\(\int_1^{e^2} \ln y\,dy = [y\ln y-y]_1^{e^2} = (e^2\cdot 2-e^2)-(0-1)=e^2+1.\)
Therefore the mean value of \(x\) with respect to \(y\) is
\(\frac{e^2+1}{e^2-1}.\)
For a continuous function, the mean value on an interval \([a,b]\) is \(\frac{1}{b-a}\int_a^b f(t)\,dt\).
Mean value of \(y\) with respect to \(x\)
Here \(y=e^x\) and \(0\le x\le 2\), so
\(\text{mean} = \frac{1}{2}\int_0^2 e^x\,dx.\)
Now \(\int e^x\,dx=e^x\), so
\(\frac{1}{2}\int_0^2 e^x\,dx = \frac{1}{2}[e^x]_0^2 = \frac{1}{2}(e^2-1).\)
So the mean value of \(y\) with respect to \(x\) is \(\frac{e^2-1}{2}\).
Mean value of \(x\) with respect to \(y\)
Since \(y=e^x\), we have \(x=\ln y\). The interval \(0\le x\le 2\) corresponds to \(1\le y\le e^2\).
Hence
\(\text{mean} = \frac{1}{e^2-1}\int_1^{e^2} \ln y\,dy.\)
To evaluate the integral, integrate by parts:
Let \(u=\ln y\), \(dv=dy\). Then \(du=\frac{1}{y}dy\) and \(v=y\).
So
\(\int \ln y\,dy = y\ln y-\int 1\,dy = y\ln y-y + C.\)
Therefore
\(\int_1^{e^2} \ln y\,dy = [y\ln y-y]_1^{e^2}.\)
At \(y=e^2\),
\(y\ln y-y = e^2\cdot 2-e^2=e^2.\)
At \(y=1\),
\(y\ln y-y = 1\cdot 0-1=-1.\)
So
\(\int_1^{e^2} \ln y\,dy = e^2-(-1)=e^2+1.\)
Thus the required mean value is
\(\frac{e^2+1}{e^2-1}.\)