$f$ has continuous partial derivatives. Express partial derivatives of following functions, in terms of partial derivatives of f: $$g(x, y) = f(y, x)$$ $$g(x, y) = f(x+2y, 3x+4y)$$ $$g(x, y) = f(e^{2x+y}, sin(x+y))$$
I tried solving it using chain rule. We can write $f(x, y)$ where $ x = u(s, t); y = v(s, t)$. Now i got $$\frac{\partial f}{\partial s} = \frac{\partial f}{\partial x}\frac{\partial x}{\partial s} + \frac{\partial f}{\partial y}\frac{\partial y}{\partial s}$$
So in the first example we have $u(s, t) = t; v(s, t) = s$. I got the following answer which seems to be right$$\frac{\partial g}{\partial x} = \frac{\partial f}{\partial y}$$
After doing the same in second example i got $$\frac{\partial g}{\partial x} = \frac{\partial f}{\partial x}+3\frac{\partial f}{\partial y}$$
Which i checked by hand is wrong (so probably first one is correct only by accident). I am also confused because in the method I used, I introduced new variables $s$ and $t$, because when I used $ v =(x, y)$ i got completly lost in notation, but now my result could be dependent on these variables, which i think is wrong. What am I doing wrong, and how to get it right?
The method is correct, however the variables used are jumbled.
You want to express the partial derivatives of $g(x,y)$ in terms of those of $f(s,t)$, where $s=u(x,y)$, and $t=v(x,y)$.
Therefore chain rule you need to use is $$\begin{align}\dfrac{\partial g(x,y)}{\partial x}&=\dfrac{\partial f(s,t)}{\partial s}\dfrac{\partial u(x,y)}{\partial x}+\dfrac{\partial f(s,t)}{\partial t}\dfrac{\partial v(x,y)}{\partial x}\\[2ex]\dfrac{\partial g(x,y)}{\partial y}&=\dfrac{\partial f(s,t)}{\partial s}\dfrac{\partial u(x,y)}{\partial y}+\dfrac{\partial f(s,t)}{\partial t}\dfrac{\partial v(x,y)}{\partial y}\end{align}$$
So for $(1)~g(x,y)=f(y,x)$ we are using: $s=y, t=x$ and so: $$\begin{align}\dfrac{\partial g(x,y)}{\partial x}&=\dfrac{\partial f(s,t)}{\partial s}\dfrac{\partial y}{\partial x}+\dfrac{\partial f(s,t)}{\partial t}\dfrac{\partial x}{\partial x}\\[1ex]&=\dfrac{\partial f(s,t)}{\partial t}\\[3ex]\dfrac{\partial g(x,y)}{\partial y}&=\dfrac{\partial f(s,t)}{\partial s}\dfrac{\partial y}{\partial y}+\dfrac{\partial f(s,t)}{\partial t}\dfrac{\partial x}{\partial y}\\[1ex]&=\dfrac{\partial f(s,t)}{\partial s}\end{align}$$
And so on.
An alternative notation is that $\partial_1 g(x,y)$ is the partial derivative of $g$ with respect to its first argument.
$$\begin{align}\partial_1 g(x,y)&=\partial_1 u(x,y)\cdot\partial_1 f(u(x,y),v(x,y))+\partial_1 v(x,y)\cdot\partial_2 f(u(x,y),v(x,y))\\[2ex]\partial_2 g(x,y)&=\partial_2 u(x,y)\cdot\partial_1 f(u(x,y),v(x,y))+\partial_2 v(x,y)\cdot\partial_2 f(u(x,y),v(x,y))\end{align}$$
So when $u(x,y)=x+2y, v(x,y)=3x+4y$ , for $(2)$:
$$\begin{align}\partial_1 g(x,y)&=1\cdot\partial_1 f(x+2y,3x+4y)+3\cdot\partial_2 f(x+2y,3x+4y)\\[2ex]\partial_2 g(x,y)&=2\cdot\partial_1 f(x+2y,3x+4y)+4\cdot\partial_2 f(x+2y,3x+4y)\end{align}$$