0

I've learnt a few rules for differentiating functions of one variable. For instance, let $f:\mathbb{R} \to \mathbb{R}$, $f(x) = x^2 + 1$. I know that the derivative of $f$ is $2 x$, using the usual rules.

Sometimes I get a bit confused, though: here my teacher might have said something like "the derivative of $x^2 + 1$ with respect to $x$ is $2 x$". This confuses me a bit since I thought that only functions can have derivatives, and $x^2 + 1$ is just... not even an equation, but an expression?

Are we just assuming that $x^2 + 1$ is a function, and we just haven't bothered writing it. But if so, how do we know there aren't any other variables involved?

Any help and pointers to somewhere I can read about this would be appreciated! I haven't managed to find any online notes which talk about this yet. Thanks.

Deeside
  • 299
  • 3
  • 6
  • Yes, $x^2+1$ is considered to be a function. Usually, we expect that it only depends on $x$ (so we have $f(x)=x^2+1$), then we differentiate with respect to $x$, but we could also have $f(y)=x^2+1$ , in which case $x$ is constant, so the derivate would be $0$. – Peter Jan 04 '20 at 15:09
  • 1
    I've answered your other question which has a similar "vibe". But I highly recommend reading Michael Spivak's textbook on Calculus (in particular read his chapters on functions and differentiation and integration. because at times he explains quite well how to interpret the notation, and how to "translate" between the more colloquial way and the more formal way of saying the same thing) – peek-a-boo Jan 06 '20 at 02:54
  • A little ironic that you worry about $x^2+1$ not being a function but an expression, while you state that the derivative function is the expression $2x$. –  Jan 07 '20 at 09:39
  • @Yves Daoust That's true, sorry. I am just learning, so I don't really have the clearest concept of stuff in my head yet. – Deeside Jan 07 '20 at 12:23
  • Did you understand my answer? – user21820 Jan 21 '20 at 15:15

3 Answers3

1

Let me make it clear that "$x^2+1$" is an expression, not a function. You can define $f : \mathbb{R}→\mathbb{R}$ by $f(x) = x^2+1$ for every $x∈\mathbb{R}$, but you can also define $f : \mathbb{R}→\mathbb{R}$ by $f(y) = y^2+1$ for every $y∈\mathbb{R}$, and the $f$ is identical whichever way you choose. As Azif00 said, the derivative of $f$ in your question is not $2x$. "$2x$" is meaningless because $x$ is undefined (it is not associated with your function $f’$ even if you used the dummy variable $x$ to define $f$). The derivative of $f$ is the function $f' : \mathbb{R}→\mathbb{R}$ defined by $f'(x) = 2x$ for every $x∈\mathbb{R}$.

Your teacher is completely correct in saying the derivative of $x^2+1$ with respect to $x$ is $2x$. Symbolically,$\def\lfrac#1#2{{\large\frac{#1}{#2}}}$ $\lfrac{d(x^2+1)}{dx} = 2x$. This can be interpreted in two ways. The first way, as explained in this post, is that this statement is made in the context where $x$ is a variable in the older sense of the word, namely a varying quantity, which is the usual context in applications of calculus to physical sciences.

The second way is a purely algebraic interpretation via "formal derivatives", where an algebraic expression can be formally differentiated with respect to any variable in it (here "variable" is in the modern sense of "symbol"). This notion of formal differentiation is useful in many branches of mathematics including field theory and combinatorics. It is also how we can differentiate any given expression with respect to a variable purely algorithmically, by repeatedly applying the sum rule, product rule and chain rule to reduce the differentiation to the base cases. For the example in your question: $\lfrac{d(x^2+1)}{dx} = \lfrac{d(x^2)}{dx} + \lfrac{d(1)}{dx}$ $= 2x + 0 = 2x$. Note that using formal differentiation will yield the correct algebraic form of the answer, but if you want to apply it to a concrete situation then you will need to check the conditions under which the rules apply.

For example, given a (moving) particle with coordinates $(x,y)$ such that $x^2+y^2=r^2$ where $r$ is a constant, we can formally differentiate with respect to $x$ to get:

$\lfrac{d(x^2+y^2)}{dx} = \lfrac{d(r^2)}{dx}$.

$\lfrac{d(x^2)}{dx} + \lfrac{d(y^2)}{dx} = 0$.

$2x + \lfrac{d(y^2)}{dy}·\lfrac{dy}{dx} = 0$.   [by chain rule]

$2x + 2y·\lfrac{dy}{dx} = 0$.

But the final equation does not hold when $y = 0$, and this is because the step using the chain rule is valid only when $\lfrac{dy}{dx}$ is defined, and it is in fact not defined when $y = 0$.

Joe
  • 19,636
user21820
  • 57,693
  • 9
  • 98
  • 256
0

The rule that to each real number $x$ sends to $x^2+1$ is, indeed, a function. Is usual write it by $$\begin{align} f: \Bbb R &\to \Bbb R \\ x &\mapsto y = x^2+1 \end{align}$$ or simply $f(x) = x^2+1$, regardless of the domain of it. Also, the derivative of $f$ is not $2x$, the derivative of $f$ is the function $$\begin{align} f': \Bbb R &\to \Bbb R \\ x &\mapsto y = 2x \end{align}$$

azif00
  • 20,792
0

$$x^2+1$$ is indeed a shortened form that bypasses some elements of a function definition, but this is well accepted when there is no ambiguity, and in informal speech.

Alternatively, you could use the common identifier $\text{id}$, called the identity function

$$\text{id}:\mathbb R\to\mathbb R:\text{id}(x)=x$$

and write statements such as

$$(\text{id}^2+1)'=2\text{ id}.$$

Note that these expressions are combinations of functions.