# What does it mean for $f:\mathbb{R}^2 \to \mathbb{R}$ to be twice differentiable [duplicate]

Given some function $$g:\mathbb{R} \to \mathbb{R}$$, it is twice differentiable if $$g'(x)$$ and $$g''(x)$$ both exist. But what about something like $$f:\mathbb{R}^2 \to \mathbb{R}$$. Now I have partials to worry about. What is the definition of being twice differentiable in this case?

It is similar, only now with partial derivatives. To be $$f:{\bf R}^2\to {\bf R}$$ twice $$\color{red}{\text{[edit: continuously]}}$$ differentiable, $$\color{red}{\text{[edit: it is necessary and sufficient]}}$$ that all second-order partial derivatives exist $$\color{red}{\text{[edit: and to be continuous]}}$$. That is, $$f_{xx},f_{yy},f_{xy}$$ and $$f_{yx}$$ they have to exist $$\color{red}{\text{[edit: and to be continuous]}}$$.
NB: Notice that more generally $$f$$ is twice differentiable iff $$f$$ is differentiable and each partial derivatives $$f_{x_j}$$ is differentiable. Then, the proposition given above it a result from here.
• This requires proof though. You need to be more careful. If $f:\mathbb R^n\to \mathbb R^m$ and assuming differentiability, then $f'$ is a linear operator $f':\mathbb{R}^n\to L(\mathbb{R}^n,\mathbb{R}^m)$ so $f''$ becomes a map $f'':\mathbb{R}^n\to L(\mathbb{R}^n, L(\mathbb{R}^n,\mathbb{R}^m)).$ Relating these ideas to the corresponding partial derivatives is not hard, but it is not trivial, either. Feb 12, 2023 at 17:18
• I believe the edited version is now too restrictive – it is now equivalent to $f$ beeing twice continuously differentiable. But the OP only asked about differentiability. Feb 12, 2023 at 18:50
• First line: “To be $f:\Bbb{R}^2\to\Bbb{R}$ twice continuously differentiable it is necessary and sufficient that all second-order partial derivatives exist and are continuous. The first instance of ‘continuous’ is still missing in your answer, and rather than “need”, the more precise statement is ‘necessary and sufficient’. The subsequent edit is fine. Feb 12, 2023 at 19:12