# What is the difference between $f(x,y)$ and $f(x,y(x))$? [duplicate]

This question already has an answer here:

What is the difference between $f(x,y)$ and $f(x,y(x))$?

Are both functions of two variables, $f:\mathbb R^2 \rightarrow \mathbb R$?

Update: The possible duplicate question is regarding an ODE.

## marked as duplicate by Alex Ortiz, Arnaldo, TheGeekGreek, Lord Shark the Unknown, dantopaJul 13 '17 at 19:42

• The first is a surface; the second is a curve of a surface. – Mark Viola Jul 13 '17 at 17:07
• You asked this same question yesterday? – Alex Ortiz Jul 13 '17 at 17:10
• @AOrtiz That was for an ODE. Here I asking more in general. – JDoeDoe Jul 13 '17 at 17:20

They're different. Some clarifying notation may help.

$$f(x,y) : \mathbb{R}\times \mathbb{R} \rightarrow \mathbb{R}$$

Instead of calling the function $y(x)$, which could be confusing, let's call it $g(x) : \mathbb{R}\rightarrow \mathbb{R}$.

And let's name $h(x) \equiv f(x, g(x))$.

Then $h : \mathbb{R}\xrightarrow{}(\mathbb{R}\times \mathbb{R})\rightarrow\mathbb{R}$, by sending $x \mapsto \langle x, g(x)\rangle \rightarrow f(x, g(x))$.

Hence $f: \mathbb{R}\times\mathbb{R}\rightarrow \mathbb{R}$ and $h:\mathbb{R}\rightarrow \mathbb{R}$ are related, but different functions.

As a follow-up, the traditional notation for derivatives in calculus is notoriously ambiguous, occasionally making it difficult to see how many (and which) arguments a function has. See the second footnote on this page: https://mitpress.mit.edu/sites/default/files/titles/content/sicm/book-Z-H-5.html

• Thanks! You clarified the notation alot! I have a similar question (I think?) here, regarding vector functions. Could you shed some light there? – JDoeDoe Jul 14 '17 at 8:16

Well, let $f:\mathbb{R}^2\to\mathbb{R}$ be a function (of two variables). For instance, $$f(x,y)=x^2-y^2$$ Now, let $y:\mathbb{R}\to\mathbb{R}$ be a function (of one variable). For instance, $$y(x)=x+1$$

You can imagine - and actually plot - $f$ as a surface in the Euclidean Space and $y$ as a straight line on the Euclidean Plane. More precisely:

Now, $f(x,y(x))$ is still a function of two variables, but it's second variable is restricted to be $x+1$. So, you can for sure write $$f(x,y(x))=x^2-(x+1)^2=1+2x$$ which is a straight line on the Plane.