0
$\begingroup$

Given that I have this function that I want to differentiate.

$ f(x) = \frac{\cos(x) \sin(x)}{2x+1} $

I know that I can do this with quotient and product rule, but I would like to understand chain rule fully on this one.

So I say $ z(x) = \cos(x) \sin(x) $ and alter my original problem:

$ h(x) = \frac{z(x)}{2x+1} $

Now, would I still do $\frac{\mathrm d}{\mathrm dx}$ or $\frac{\mathrm d}{\mathrm dz(x)}$?

If I do the latter, I will get:

$ \frac{\mathrm d}{\mathrm dz(x)} h(x) = \frac{\mathrm d}{\mathrm dz(x)}\frac{z(x)}{2x+1} = \frac{1}{2x-1}$

If I replace $z(x)$ with what I had before, I will not get the right result at all, I will just get the $f(x)$ back.

Then I tried to apply chain rule, like this:

$ \frac{\mathrm d}{\mathrm dz(x)} h(x) = \frac{\mathrm d}{\mathrm dz(x)} \frac{z(x)}{2x+1} \frac{\mathrm d}{\mathrm dx} z(x) = \frac{\cos(x)^2- \sin(x)^2}{2x-1}$

Which is not correct either, since the $\cos(x) \sin(x)$ term is missing.

Differentiating against plain $x$:

\frac{\mathrm d}{\mathrm dx} h(x) = \frac{\mathrm d}{\mathrm dx} \frac{z(x)}{2x+1} = \frac{z'(x)(2x-1)-2z(x)}{2x-1}

Now I did not use the chain rule to get the right result. If I slap another z'(x) on there, as the inner derivative, I get too much.

So how would I use the chain rule the right way in this problem?

  • 0
    I do $n$ot really see any good function that I could compose the original out of. So I guess I just use no chain rule, since one has to use quotient and product rule anyway.2011-11-19

2 Answers 2

0

After doing some more digging, I finally came up with a way to do this with the chain rule. The point is, that my function $f$ does not solely depend on $z$ but also on $x$, yielding $f(x, z)$. If I use multivariable calculus on this one, I do get the right result.

\begin{equation} z(x) = \cos(x) \sin(x) \end{equation}

\begin{equation} \frac{\mathrm d}{\mathrm dx}f(x,z) = \frac{\partial}{\partial x} f(x, z) + \frac{\partial}{\partial z} f(x, z) \cdot \frac{\partial}{\partial x} z \end{equation}

Now here comes up the chain rule.

Plugging the concrete functions in:

\begin{equation} \frac{\mathrm d}{\mathrm dx} \frac{z}{2x+1} = \frac{\partial}{\partial x} \frac{z}{2x+1} + \frac{\partial}{\partial z} \frac{z}{2x+1} \cdot \frac{\partial}{\partial x} \cos(x) \sin(x) \end{equation}

Now doing the actual deriving:

\begin{equation} \frac{\mathrm d}{\mathrm dx} \frac{z}{2x+1} = \frac{-2z}{(2x+1)^2} + \frac{1}{2x+1} \cdot (\cos(x)^2 \sin(x)^2) \end{equation}

Bringing it onto one fraction:

\begin{equation} \frac{\mathrm d}{\mathrm dx} \frac{z}{2x+1} = \frac{-2z + (2x+1)(\cos(x)^2 \sin(x)^2)}{(2x+1)^2} \end{equation}

Simplify:

\begin{equation} \frac{\mathrm d}{\mathrm dx} \frac{z}{2x+1} = \frac{(2x+1)(\cos(x)^2 \sin(x)^2) - 2z}{(2x+1)^2} \end{equation}

Plugging in $z$:

\begin{equation} \frac{\mathrm d}{\mathrm dx} \frac{\cos(x) \sin(x)}{2x+1} = \frac{(2x+1)(\cos(x)^2 \sin(x)^2) - 2\cos(x) \sin(x)}{(2x+1)^2} \end{equation}

Now this yields the same result as the regular method. I do see that 12 grade math against second semester university math is not really efficient, but I think I now got the whole concept.

  • 0
    That sounds good. I really need to brush up on trig …2011-11-20
1

My apologies if this is somewhat off point:

Consider the two functions: $ f(x) = \sin\bigl((\cos x)\bigr),\qquad {\rm and}\qquad g(x)=\cos (x) \sin (x) $

Are they the same?

Well... How would you compute $f(\pi/4)$, say?

Let's do it: formally substituting: $ f(\pi/4) = \sin\bigl(\cos(\pi/4)\bigr). $ To simplify this, note that you have to compute $\cos(\pi/4)$ first (you take cosine of something). $\cos(\pi/4)=\sqrt2/2$, so going back to $f$: $ f(\pi/4) = \sin\bigl(\cos(\pi/4)\bigr)= \sin(\sqrt2/2)\approx 0.65\,. $

How would you compute $g(\pi/4)$? Let's do it: formally substituting: $ g(\pi/4) = \cos(\pi/4) \sin(\pi/4). $ Here, the first thing we have to do is compute the cosine of $\pi/4$ and the sine of $\pi/4$. We obtain $ g(\pi/4) = \cos(\pi/4) \sin(\pi/4) =(\sqrt2/2)\cdot(\sqrt2/2)=1/2. $

$f$ is a composition of functions; it's a "function of a function". That is, there is an "outer function" ($\sin$ in this case) that is evaluated at the inner function's ($\cos$ in this case) value. You use the chain rule to find the derivative of a composition: \Bigl[ f\bigr(g(x)\bigr)\Bigr]' = f'\bigr(g(x)\bigr)\cdot g'(x).

$g$ is a product of two functions. For this, you of course use the product rule: \bigl[ f(x)g(x)\bigr]' =f'(x)g(x)+f(x)g'(x).

When differentiating a complicated function, the first thing you should do is determine what type it is at the "outermost level" and use the appropriate rule.