Derivatives, chain rule 4

1. Nov 9, 2013

physics604

1. The problem statement, all variables and given/known data

Find the derivative of $$y=cos(\frac{1-e^{2x}}{1+e^{2x}})$$

2. Relevant equations

Chain rule

3. The attempt at a solution

$$y=cosu$$ $$\frac{dy}{du}=-sinu$$

$$u=\frac{1-e^{2x}}{1+e^{2x}}$$ $$\frac{du}{dx}=(1-e^{2x})(-(1+e^{2x})^{-2})+(1+e^{2x})^{-1}(-2e^{2x})$$ $$= -\frac{1-e^{2x}}{(1+e^{2x})^2} + \frac{-2e^{2x}}{1+e^{2x}}$$ $$= \frac{-(1-e^{2x})}{(1+e^{2x})^2} + \frac{(-2e^{2x})(1+e^{2x})}{1+e^(1+e^{2x})^2}$$ $$= -\frac{-1+e^{2x}+(-2e^{2x})+(-2e^{4x})}{(1+e^{2x})^2}$$

$$\frac{dy}{dx}=-sin\frac{1-e^{2x}}{1+e^{2x}} (-\frac{-1+e^{2x}+(-2e^{2x})+(-2e^{4x})}{(1+e^{2x})^2})$$

The front part of my answer is right $$-sin\frac{1-e^{2x}}{1+e^{2x}}$$, but the second half is wrong.

According to my textbook it is supposed to be $$\frac{4e^{2x}}{(1+e^{2x})^2}$$. What did I do wrong?

Any help is much appreciated.

2. Nov 9, 2013

haruspex

$=(1-e^{2x})(-(1+e^{2x})^{-2})$<something missing here>$+(1+e^{2x})^{-1}(-2e^{2x})$
Sign error.

3. Nov 9, 2013

Student100

Why don't you just try using the quotient rule instead of the product rule? It's much cleaner, and using the product rule you made a mistake.

Edit:: Are you trying to wing yourself off using u sub for these yet? It helps, since I believe you forgot $(1+e^{2x})^{-1}$ is also a composition.

Last edited: Nov 9, 2013
4. Nov 10, 2013

HallsofIvy

Staff Emeritus
"wing yourself off"? Oh, you mean "wean". That stopped me for a moment.

5. Nov 10, 2013

lurflurf

There are several ways to approach these problems

I would be inclined to rewrite the function
$$\cos \left( \frac{1-e^{2x}}{1+e^{2x}} \right)=\cos \left(1- \frac{2}{1+e^{2x}} \right)=\cos(\tanh(x))$$

Otherwise use the chain rule multiple times with care. For example

$$\cos \left( \frac{1-e^{2x}}{1+e^{2x}} \right)=\mathrm{f}(\mathrm{g}(\mathrm{h}(x))) \\ \text{where} \\ \mathrm{f}(x)=\cos(x) \\ \mathrm{g}(x)=\frac{1-x}{1+x} \\ \mathrm{h}(x)=e^{2x}$$

6. Nov 10, 2013

physics604

Thanks everyone! I've got it!

7. Nov 10, 2013

Thanks?