I'm having trouble finding the partial derivative of $z$ with respect to $x$ of this function:
$$z(x,y) = f(x + y) + f(x - y)$$
I saw this exercise online, but I can't figure it out. How can I solve it? Because the functions $f(x + y)$ and $f(x - y)$ only depend on one variable, but I don't understand why their input is an expression involving $x$ and $y$. Thank you!
To address your second concern first, let's consider the function $f(x) = x^2$. Then, there is nothing strange about evaluating, say, $f(2 - 3) = f(-1) = 1$ or $f(15 - 10) = f(5) = 25$. In the same way, we could define a new function $h(x,y) = f(x-y)$, in which case we could write the above calculations as $h(2,3) = 1$ and $h(15,10) = 25$. So, we are using a single-variable function $f$ to carry out the final computation, but if we are always considering a calculation 'inside' the function it is easier to think of the function of two variable, $h$.
Now, to your original question. Given $$z(x,y) = f(x + y) + f(x - y),$$ if we want to compute the partial derivative of $z$ with respect to $x$, we will need to use the chain rule: $$\frac{\partial z}{\partial x}(x,y) = f'(x+y)\frac{\partial(x+y)}{\partial x} + f'(x-y)\frac{\partial(x-y)}{\partial x} = \boxed{f'(x+y) + f'(x-y)}.$$
Now, if you wanted to compute the partial derivative of $z$ with respect to $y$ then the chain rule would actually do something more obvious: $$\frac{\partial z}{\partial y}(x,y) = f'(x+y)\frac{\partial(x+y)}{\partial y} + f'(x-y)\frac{\partial(x-y)}{\partial y} = \boxed{f'(x+y) - f'(x-y)}.$$