Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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?

share|improve this question
1  
The given function is not a composition (other than the trivial ones). You don't use the chain rule... –  David Mitra Nov 19 '11 at 17:25
1  
The chain rule is for compositions of functions. If you can't write your original function as a composition, then you can't apply the chain rule. Which functions can you compose to give your original function? –  J. M. Nov 19 '11 at 17:27
    
I do not 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. –  queueoverflow Nov 19 '11 at 22:12
add comment

2 Answers

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.

share|improve this answer
    
Thanks for your detailed answer. It answers the question to the point "No chain rule needed". –  queueoverflow Nov 19 '11 at 22:06
add comment
up vote 0 down vote accepted

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.

share|improve this answer
    
You could have made things slightly easier for yourself by noting that $\sin\,2x=2\sin\,x\cos\,x$... –  J. M. Nov 20 '11 at 0:11
    
That sounds good. I really need to brush up on trig … –  queueoverflow Nov 20 '11 at 13:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.