# Differentiation.

• Jun 4th 2009, 11:31 PM
dwat
Differentiation.
Just wanted to check if I am differentiating these functions correctly.

$1. f(x) = tan 2x$
$f'(x) = sec^2x(2x)2$
$f'(x) = 2sec^2x$

$2. f(x) = (cosx-1)(sinx+1)$
$f'(x) = -sinx(sinx+1)+cosx(cosx-1)$
$f'(x) = -sin^2x-sinx+cos^2x-cosx$

$3. f(x) = (cosx-sinx)^2$
$f'(x) = 2(cosx-sinx)(-sinx-cosx)
$

$4. f(x) = ln(cosx)+e^{cosx}$
$f'(x) = \frac{1}{x}cosx(-sinx)+e^{cosx}(-sinx)$

If a function can be simplified even further, can you please show me.
• Jun 4th 2009, 11:44 PM
matheagle
the chain rule says that the derivative of f(g(x)) is f'(g(x)) times g'(x)
HERE are my corrections

Quote:

Originally Posted by dwat
Just wanted to check if I am differentiating these functions correctly.

$1. f(x) = tan (2x)$
$f'(x) = sec^2(2x)\cdot 2$
$f'(x) = 2sec^2(2x)$
The (2x) cannot change

I'd multiply this first
$2. f(x) = (\cos x-1)(\sin x+1)=\sin x \cos x+\cos x-\sin x -1$
$f'(x)=-\sin^2 x +\cos^2 x-\sin x -\cos x$
which is the same as yours, but less work
But your way was ok here

$f'(x) = -sinx(sinx+1)+cosx(cosx-1)$
$f'(x) = -sin^2x-sinx+cos^2x-cosx$

$3. f(x) = (cosx-sinx)^2$
$f'(x) = 2(cosx-sinx)(-sinx-cosx)$
This is correct but you should multiply out the terms to see if there is a simpler form, which I doubt.

$4. f(x) = ln(\cos x)+e^{\cos x}$
The first derivative is wrong, the second is correct
$f'(x) = {-\sin x\over \cos x}+e^{\cos x}(-\sin x)$

which can be reduced to $-\tan x-\sin x e^{\cos x}$.

If a function can be simplified even further, can you please show me.

• Jun 4th 2009, 11:45 PM
Random Variable
1) $f'(x) = sec^{2}(2x)*2 = 2sec^{2}(2x)$

2) correct

3) correct

4) $f'(x) = \frac {1}{cos(x)} \Big(-sin(x) \Big) + e^{cos(x)}\Big(-sin(x)\Big) = -tan(x) - sin(x)e^{cos(x)}$
• Jun 5th 2009, 12:05 AM
dwat
Quote:

Originally Posted by Random Variable
1) $f'(x) = sec^{2}(2x)*2 = 2sec^{2}(2x)$

2) correct

3) correct

4) $f'(x) = \frac {1}{cos(x)} \Big(-sin(x) \Big) + e^{cos(x)}\Big(-sin(x)\Big) = -tan(x) - sin(x)e^{cos(x)}$

OK, Thanks for the corrections. what I don't get is the last one still. I understand the second part but not the first.

$f(x) = ln(cosx)$ using the chain rule

wouldn't $ln$ be the outer function and ${cosx}$ be the inner function?

and if you differentiate $ln = \frac {1}{x}(cosx)*-sinx$

or is this the same as $f'(x) = \frac {1}{cos(x)} \Big(-sin(x) \Big)$
• Jun 5th 2009, 12:08 AM
matheagle
you're having trouble with the chain rule
as I wrote above you CANNOT change the inner function g(x)

In $f(x) = \ln(\cos x)$ the outer function is ln and the inner is cosine

The derivative of the log is 1 over the ENTIRE inner function giving us ${1\over \cos x}$

Next multiply that by the derivative of the inner function

the derivative of the cosine x is $-\sin x$.

Next multiply these two.
• Jun 5th 2009, 12:11 AM
dwat
Quote:

Originally Posted by matheagle
you're having trouble with the chain rule
as I wrote above you CANNOT change the inner function g(x)

Could you please explain the procedure step by step as to how you went about using the chain rule for the $ln(cosx)$ please?
• Jun 5th 2009, 12:15 AM
matheagle
It's f'(g(x))=1/cos x times g'(x) which is -sin x.

Better now?
• Jun 5th 2009, 12:26 AM
dwat
Quote:

Originally Posted by matheagle
you're having trouble with the chain rule
as I wrote above you CANNOT change the inner function g(x)

In $f(x) = \ln(\cos x)$ the outer function is ln and the inner is cosine

The derivative of the log is 1 over the ENTIRE inner function giving us ${1\over \cos x}$

Next mutiply that by the derivative of the inner function

the derivative of the cosine x is $-\sin x$.

Next multiply these two.

I didn't change the inner function, what I did was I only differentiated $ln$which is where I got $\frac{1}{x}$ then left the inner function as ${cosx}$ and then differentiate the inner function to $-sinx$. Hence where I came up with $\frac{1}{x}(cosx)(-sinx)$

But I see how you did it. 1 over the inner function left untouch. I'm struggling to understand why ${cosx}$ ends up within the differentiation of $ln$ unless you replace the $x$ in the $ln$ function with the inner function.

So basically, any $ln$ would produce a solution with $\frac{1}{x}$ where the inner function will always end up at the bottom replacing $x$ e.g. $ln(sinx)$

$f'(x) = \frac{1}{sinx}({cosx})$

is that correct?

BTW, thank you for your help
• Jun 5th 2009, 06:04 AM
matheagle
you did change the inner function, which is cosine x not just x.
The chain rule is just the product of two functions f' of g(x) which is one over g(x)=cos x here, then times the derivative of cos x.

Try setting f(x)=ln x and g(x) =cos x. Obtain the derivatives and plug into f'(g(x)) and g'(x).

and yes, the derivative of ln sin x is cot x.
More importantly you now know the integral of tan x and cot x.