How come $\sin(x^3)$ is treated like a composite function but $\sin(x)$ isn't?

379 Views Asked by At

Preface: I'm not talking about sin in particular; any arbitrary trig function can be used.

I just started learning the chain rule. I noticed for a certain example:

when applying chain rule to $\sin(x^3)$, it's treated as two nested functions, [1] $\sin(x^3)$, and [2] $x^3$.

But when simply given some function, $\sin(x)$, the derivative is just $\cos(x)$. How come it's not treated as two functions, [1] $\sin(x)$ and [2] $g(x) = x$?

1

There are 1 best solutions below

0
On BEST ANSWER

One thing that is very cool about differential calculus is that you don't have to use the “right” rule, because all the rules work all the time. For example, we have a rule that says that if $c$ is constant, then the derivative of $cf$ is $cf'$, where $f'$ means the derivative of the function $f$. But $cf$ is a product, so why can't we use the product rule? Well, we can use the product rule. It says that $$(fg)' = f'g + fg'$$ so we ought to have $$(cf)' = c'f + cf'.$$ Since $c$ is a constant $c'=0$, and the $c'f$ term vanishes, leaving only $cf'$. We got to the same place, but by a slightly longer route.

Similarly you probably know that the derivative of $x^n$ is $nx^{n-1}$, if $n$ is constant. But we could factor $x^n$ into two factors. Say $i+j=n$ so that $x^n = x^i\cdot x^j$. Now let's find the derivative of $x^i\cdot x^j$, using the product rule again:

$$\begin{align} (x^i\cdot x^j)' & = (x^i)'· x^j + x^i· (x^j)' \\\\ & = ix^{i-1} ·x^j + x^i · jx^{j-1} \\\\ & =i x^{i+j-1} + jx^{i+j-1} \\\\ & = (i+j)x^{i+j-1} \end{align} $$

$x^i\cdot x^j$ is written in a different form than $x^n$, but if $i+j=n$ they are the same function. And its derivative, $(i+j)x^{i+j-1}$, is written in a different form from the derivative of $x^n$,which is $nx^{n-1}$. But if $i+j=n$, the two derivatives are the same function.

Your question was whether can calculate the derivative of $\sin(x)$ using the chain rule. The answer is yes. The chain rule says that $(f(g(x)))' = f'(g(x))\cdot g'(x)$. Here $f = \sin$ and $g$ is the identity function $g(x)=x$. As you pointed out, $f' = \cos$. You know the derivative of $g$; it's just the constant function $1$. So, by the chain rule:

$$\begin{align} (\sin(g(x)))' & = \sin'(g(x)) \cdot g'(x) \\\\ & = \cos(g(x)) \cdot 1 \\\\ & = \cos(x) \end{align} $$

Like the $cf$ example earlier, we got to the same place by a slightly longer path.

Let's see one more example. Let's find the derivative of $\sin 2x$ by two methods. First by the chain rule:

$$\begin{align} (\sin(2x))' & = \sin'(2x) \cdot (2x)' \\\\ & = \cos(2x) \cdot 2 \\\\ & = 2\cos(2x) \end{align} $$

And now, let's expand $\sin 2x = 2\sin x \cos x$ and use the product rule:

$$\begin{align} (2\sin x \cos x)' & = \\\\ ((2\sin x)\cdot (\cos x))' & = (2\sin x)'\cdot(\cos x) + (2 \sin x)\cdot(\cos x)' \\\\ & = (2\cos x)\cdot(\cos x) + (2\sin x)\cdot (-\sin x) \\\\ & = 2\cos^2 x - 2\sin^2 x \end{align} $$

Uh oh, is that really the same answer?

It is! $\cos 2x = \cos^2 x - \sin^2 x$, so it is the same function, just written in a different way.

Fun exercise: Suppose $u$ and $v$ are functions of $x$. Calculate the derivative of $u^v$, by rewriting $$u^v = e^{v\log u}$$ and applying the chain rule and product rule. (If you don't know yet, the derivative of $e^x$ is $e^x$, and the derivative of $\log x$ is $\frac1x$.) Then check to make sure your formula for the derivative of $u^v$ gives the simpler result you expect when either $u$ or $v$ is a constant function.