# Differentiation in several variables using projection

Could you tell me how to differentiate a function with several variables? Our teacher gave us an example:

$\pi_1 : (x,y) \rightarrow x, \ \ \ \pi_2: (x,y) \rightarrow y$ - these are differentiable, because they are linear,

Consider $f(x,y) = e^x \cos y$

Let $f_1: t \rightarrow e^t, \ \ \ f_2: t \rightarrow \cos t$.

Now $f(x,y) = F(f_1 \circ \pi_1, f_2 \circ \pi_2$), where $F(x,y)=xy$,

So $F'(x,y)(h,k) = F(x,k) + F(h,y) = xk+hy$, so $f'(x,y)(h,k)=he^x \cos y - k e^x \sin y$.

I understand this, because we had this theorem on the analysis lecture:

If $E_1, E_2, F$ - Banach spaces, $\phi \in \mathcal{L}(E_1, E_2; F)$ - linear and continuous, then $\phi$ is $C^1$ and $d_{(a_1, a_2)}\phi.(h_1, h_2) = \phi'(a_1,a_2)(h_1,h_2) = \phi(a_1, h_2) + \phi(h_1, a_2), \ \ (a_1, a_2), (h_1, h_2) \in E_1 \times E_2$.

My problem is - what should I do when I have three, four variables. Is there any other way to quickly and safely determine derivatives? When doing it by calculating partial derivatives I first need to check if they are continuous and then $d_af = (\frac{ \partial f }{\partial x_1 }, ..., \frac{ \partial f }{\partial x_1 })$ where $\frac{ \partial f }{\partial x_1 } = d_af.e_i$ or $d_af = \sum _{i=1} ^m \frac{\partial f}{\partial e_i}(a) \circ \pi _i$, where $e_i$ is the standard basis.

Is this the correct approach?

I'd really appreciate all your help here

Thank you a lot.

In a finite-dimensional setting, the derivative, if it exists, is always the linear map $$df(x^*)\colon (h_1,\ldots,h_n) \mapsto \sum_{j=1}^n \frac{\partial f}{\partial x_j}(x^*) h_j. \tag{1}$$ Hence it suffices to compute all the partial derivatives and then show that (1) satisfies the definition of the derivative (the best linear approximation etc.) So your approach is correct in $\mathbb{R}^n$.
In Banach spaces, the situation is more complicated, since you do not have an algebraic basis to express a linear map. The approach via projections is intrinsic and works also for functions $f \colon E_1 \times E_2 \to Y$, where $E_1$ and $E_2$ and Banach spaces. However, if $E_1$ and $E_2$ have finite dimension, you are simply computing standard partial derivatives, so you can proceed as you were used to.
• Hi, I don't know if you have time. I thought I understood this but I'm a bit muddlehaded at the moment. Could you explain to me how to differentiate for example this function (I hope this is differentiable) $f(x,y,z) = (x^y, z)$ using differentiation of composition, multiplication, etc. I must have seen how $F'(x,y)(h,k) = F(x,k) + F(h,y) = xk+hy$ implied $f'(x,y)(h,k)=he^x \cos y - k e^x \sin y$, but now I don't. – Hagrid Nov 15 '13 at 9:46
• You just construct the Jacobian matrix $$Jf(x,y,z) = \begin{pmatrix} \frac{\partial f_1}{\partial x} & \frac{\partial f_1}{\partial y} & \frac{\partial f_1}{\partial z} \\ \frac{\partial f_2}{\partial x} & \frac{\partial f_2}{\partial y} & \frac{\partial f_2}{\partial z} \end{pmatrix}$$ and recall that $f'(x,y,z)$ acts on $h=(h_1,h_2,h_3)$ as $Jf(x,y,z)h$. – Siminore Nov 15 '13 at 17:36
• Of course, you need to be sure that $f$ is differentiable. This can be accomplished by proving the continuity of the partial derivatives. However, remember that this is only a sufficient condition. – Siminore Nov 16 '13 at 9:28
• It seems to me that $h_2$ is missing. – Siminore Nov 17 '13 at 12:47