# The derivative of something with respect to $3x+5$?

If you take $(3x+5)^2$ and differentiate it with respect to $3x+5$ it's just $2(3x+5)$. Can someone explain to me how this would actually work out? I understand normal derivatives with respect to say, $x$, where at some point $x$, $f '(x)$ is the slope at that $x$ value. But how would this work out in this situation?

It's very useful to understand that just because you have used a particular variable $x$ in a derivative or an integral does not mean you are stuck having to do all your derivatives or integrals with respect to the same variable.

You can, in fact, take a derivative of the same thing but with respect to a different variable. In both cases, you can interpret the derivative as the slope of a curve on a graph, but which curve you use depends on what you are differentiating over.

Here are two graphs of the quantity $(3x + 5)^2$:

In the graph on the left, $(3x+5)^2$ is plotted as a function of $x,$ much as you might expect. In the graph on the left, the same quantity is plotted as a function of a different variable, $u,$ which we choose to define by the equation $u = 3x + 5.$ Because $u$ is defined that way, the graph it makes is shifted $\frac53$ units to the right (as compared to the graph with respect to $x$) and the plot of the function is three times as wide. (Both graphs are to exactly the same scale.)

It is sometimes very helpful to use a different variable in this way. Here we can already see that the graph with respect to $u$ can be a little easier to work with than the graph with respect to $x,$ since the graph over $u$ is symmetric around the $y$-axis.

$\dfrac{df}{d(3x+5)}\cdot\dfrac{d(3x+5)}{dx}=\dfrac{df}{dx}$, by the chain rule. Dividing, we get:

$\dfrac{df}{d(3x+5)}=\dfrac{df}{dx}\div\dfrac{d(3x+5)}{dx}=f'(x)\div3=\dfrac{f'(x)}3$.

So, in summary, the derivative of $f$ with respect to $3x+5$ is just $\dfrac{f'(x)}3$.

Well, define $$f(x)=(3x+5)^2$$ and $$g(x)=3x+5.$$

In doing this, you are essentially calculating the value of $$\frac{f'(x)}{g'(x)}$$ since, you are trying to know how $f(x)$ changes with a change in $g(x)$; since they both relate to $x$, you can see that by changing the value of $g(x)$ at a rate of $r$, the value $x$ will be changing at a rate of $\frac{r}{g'(x)}$ and so the value of $f(x)$ must be changing at a rate of $\frac{r}{g'(x)}f'(x)=r\frac{f'(x)}{g'(x)}$. This is an intuitive way to see it.

Algebraically, you can always see that, if we set $$v = f(x)$$ and $$u = g(x)$$ then we get $$dv = f'(x) dx$$ $$du = g'(x) dx$$ and hence $$\frac{g'(x)}{du} = dx$$ meaning, by substitution $$dv = \frac{f'(x)}{g'(x)} du$$ $$\frac{dv}{du} = \frac{f'(x)}{g'(x)}$$ (the fact that such manipulations work on $du$, $dx$, and $dv$ is essentially equivalent to the chain rule)

This is the differentiate rule of composite functions.

Here we can view $3(x+5)$ as $f(x)=u^2=(3x+5)^2$ and $u=3x+5$. Accroding the differentiate rule of composite functions, we have $$f'(x)=2u\times u'(x)=2(3x+5)\times 3=6(3x+5).$$

However, respect to $u$, it will be $2u$.