# Derivatives of logarithmic functions and the chain rule.

So I think I might be going about the chain rule in the wrong way.

Currently this is how I do the chain rule:

$\frac {d}{dx} (x^2 + 4)^2$ I would carry down the two like normal using the power rule but since this is a composition of function I have to use the chain rule so I use that factor times the inner function and then times the derivative of the inner function. I get $2(x^2 + 4)2x$.

But now I am a little confused with logarithmic functions, I know how to do them but I am just not sure why and the book is no help.

For something like the derivative of $\log_{10} (x^3 + 1)$ I know using the library I have $\frac {d}{dx} (\log_a x) = \frac {1}{x\ln a}$ so for this problem I am left with the derivative of the function times the derivative of the inner function.

I get $\frac {3x^2}{(x^3 + 1)\ln10}$

I know this is the correct answer, but my logic is not correct. Why does it seem like I do partial derivatives for things like the first example but then I do full derivatives for logarithms. What am I missing?

• What do you mean by partial derivatives versus full derivatives in these two examples? You did the same exact thing in both cases to my eye. – anon Feb 23 '12 at 0:15
• It looks as if you're doing it all correctly but there's something odd in the way you're perceiving what you're doing. – Michael Hardy Feb 23 '12 at 0:21

It's fine.

For the function $h(x)=(x^2+4)^2$, the "outer" function is $f(x)=x^2$ and the "inner" function is $g(x)=x^2+4$. So, $h(x)=f\bigl(g(x)\bigr)$. The chain rule says $h'(x)=f'\bigl(g(x)\bigr)g'(x)$. To apply the chain rule, first take the derivative of the outer function: $2x$. Then evaluate this at the inner function to get $2(x^2+4)$. And, finally multiply by the derivative of the inner function to obtain $h'(x)=2(x^2+4)\cdot2x$.

For the function $h(x)=\log_{10}(x^3+1)$, the "outer" function is $f(x)=\log_{10}(x)$ and the "inner" function is $g(x)=x^3+1$. The chain rule says $h'(x)=f'\bigl(g(x)\bigr)g'(x)$. The derivative of the outer function is ${1\over x\ln 10}$, then evaluate this at the inner function to get ${1\over (x^3+1)\ln 10}$, and finally multiply by the derivative of the inner function to obtain $h'(x)={1\over (x^3+1)\ln 10}\cdot 3x^2= {3x^2\over (x^3+1)\ln 10}$.

I'm not sure what you mean by "partial derivatives". But applying the chain rule can always be done in a step by step manner as above:

To find ${d\over dx}f\bigl(g(x)\bigr)$:

$\ \ \$1) Compute $f'(x)$.

$\ \ \$2) Evaluate $f'\bigl(g(x)\bigr)$.

$\ \ \$3) Multiply by $g'(x)$ to obtain the derivative ${d\over dx}f\bigl(g(x)\bigr) =f'\bigl(g(x)\bigr) g'(x)$.

Of course, once you're accustomed to it, you can "just do it":

$${d\over dx} (\,\,\underbrace{x^2+4}_{g(x)}\,\,)^2 = \underbrace{2(x^2+4)}_{f' (g(x) )}\cdot \underbrace{2x\vphantom{(}}_{g'(x)}.$$

$${d\over dx} \ln(\,\,\underbrace{ x^2+4\vphantom{1\over2^2}}_{g(x)}\,\,) = \underbrace{{1\over x^2+4}}_{f' (g(x) )}\cdot \underbrace{2x\vphantom{1\over2^2}}_{g'(x)}.$$

You have used the same logic in both questions. You have used the chain rule that the derivative of $f(g(x))$ is $f'(g(x)) \times g'(x)$.

So in the first case $f(y)=y^2$ and $y=g(x)=x^2+4$ so the derivative is $2y \times 2x = 2(x^2+4)\times 2x$, as you have it, though you could tidy it slightly.

Similarly in the second case $f(y)=\log_{10}(y)$ and $y=g(x)=x^3+1$ so the derivative is $\frac{1}{y\log_e(10)} \times 3x^2 = \frac{3x^2}{(x^3+1)\log_e(10)}$ as you have it.

I don't see any major problems with your logic.

There is nothing wrong in what you are doing. The reason you find it different because the first one is like $$\frac{d}{dx} f(x)^2$$ where $$f(x) = (x^2+4)$$ and the second one is $$\frac{d}{dx} log_{10}g(x)$$ where $$g(x) = (x^3 + 1)$$

When you do $$\frac{d}{dx} f(x)^2 = 2f(x) \frac{d}{dx}f(x)$$ and $$\frac{d}{dx} log_{10} g(x) = \frac {1}{g(x)\ln 10} \frac{d}{dx}g(x)$$