Find and classify the critical points of this function: $f(x,y)= (x^y)-(xy)$ in the domain $x>0, y>0$.
I am having trouble treating x and y as constants when taking partial derivatives.
Find and classify the critical points of this function: $f(x,y)= (x^y)-(xy)$ in the domain $x>0, y>0$.
I am having trouble treating x and y as constants when taking partial derivatives.
On
Claude Leibovici approach is correct and elegant. However in the general case, you can avoid treating variables as constants, by using derivatives rather than differentials.
A derivative is an operator d such that $d(f+g) = d(f) + d(g) = df + dg$, and $d(fg) = f d(g) + g d(f) = f dg+g df$. For the derivative, you further have $df(u) = f'(u) du$.
For example: $de^u = e^u du$, $d\log(u) = \frac{du}{u}$, and $$\begin{align*} d(x^y) &= d(e^{y \log x}) = e^{y \log x} d(y \log x) = x^y [\log x dy+y d(\log x)] = x^y [\log x dy+y \frac {dx} x]\\ &= (y x^{y-1}) dx + (x^y \log x)dy. \end{align*}$$
This is coherent with $\frac {\partial x^y} {\partial x} = y x^{y-1}$ and $\frac {\partial x^y} {\partial y} = x^y \log x$.
In your case (and slowly by slowly): $$\begin{align*} df &= d(x^y-xy) = d(x^y) - d(xy) \\ &= (y x^{y-1}) dx + (x^y \log x)dy - xdy - ydx \\ & = (y x^{y-1} -y)dx + (x^y\log x -x)dy. \end{align*}$$
which is coherent with Claude's results.
On the critical points, the derivative vanishes: $$\begin{cases} y \cdot x^{y-1} - y &= 0\\ x^y\log x -x &= 0 \end{cases}$$
The first line becomes $y=0$ or $x^{y-1}=1$, that is $y=0$, $x=0$ or $y-1=0$. Only $y=1$ is in the domain $x>0, y>0$.
Putting $y=1$ in the second line, gives $x\log x = x$, which is true for $x=0$ or $x=e$.
Hence, there is one critical points $(x,y)=(e,1)$. Compute $f(e,1)$ to see if it is a maximum or a minimum.
Hint
If the names make trouble to you because they are names of variables, consider first $f_1(x)=x^k-kx$ and compute its derivative with respect to $x$ as usual; this will give you $$\frac {df_1(x)}{dx}=k x^{k-1}-k$$ so, replacing $k$ by $y$, $$f'_x(x,y)=y x^{y-1}-y$$ Do a similar thing using $f_2(y)=k^y-ky$; this will give you $$\frac {df_2(y)}{dy}=k^y \log(k)-k$$ so, replacing now $k$ by $x$ $$f'_y(x,y)=x^y \log (x)-x$$
Is this making things clearer ? When you take the partial derivative with respect to one variable the other variables are considered as constants.