Applying the chain rule: differentiating $f(x+s)$

59 Views Asked by At

This might sound trivial, but I'm confused about using the chain rule on univariate real-valued functions. On Wikipedia, I see that

$${\frac {dz}{dx}}={\frac {dz}{dy}}\cdot {\frac {dy}{dx}}$$

My question: suppose I have a real-valued function $f(x+s)$ and I would like to find $\frac{\partial f}{\partial s}$. Is it

$$\frac{\partial f(x+s)}{\partial s} = \frac{\partial f(x+s)}{\partial (x+s)} \frac{\partial (x+s)}{\partial (s)} = \frac{\partial f(x+s)}{\partial (x+s)} $$

or

$$\frac{\partial f(x+s)}{\partial s} = \frac{\partial f(x+s)}{\partial x} $$

I think it's the former, but I have seen sources where the latter is used. Are they both equivalent? If so I can't see the reason.

2

There are 2 best solutions below

0
On BEST ANSWER

You should write, since $f$ is a function of a single variable $$\frac{\partial f(x+s)}{\partial s}=\frac{\mathrm df}{\mathrm d x}(x+s)\cdot\frac{\partial (x+s)}{\partial s}=\frac{\mathrm df}{\mathrm d x}(x+s).$$ Note the two positions of $(x+s)$: on the left side, $f(x+s)$ implicitly defines a function of two variables $g(x,s)$, whereas in the first factor of the right-hand side, $\frac{\mathrm df}{\mathrm d x}(x+s)$ denotes the derivative of the single variable function $f$, evaluated at the point $x+s$.

0
On

If you want to refer to Wikipedia, you have to identify the proper variables.

Here, you have $z(y)=f(y)$ and $y(x,s)=x+s$.

Hence $\frac{dz}{dy}= \frac{df}{dy}$ and $\frac{\partial y}{\partial s}= 1$.

Which leads to $$\frac{\partial f(x+s)}{\partial s}= \frac{df}{dy}(x+s)= f^\prime(x+s).$$