# Homework Help: Logarithmic derivative question

Tags:
1. Oct 30, 2014

### Diana Dobleve

1. The problem statement, all variables and given/known data
1) I am having trouble with the questions, "Use the logarithmic derivative to find y' when y=((e^-x)cos^2x)/((x^2)+x+1)

2. Relevant equations
(dy/dx)(e^x) = e^x
(dy/dx)ln(e^-x) = -x ?

3. The attempt at a solution
First I believe I put ln on each set of terms (Though I don't know why, so if someone could explain that to me that would be great). So I have lny=ln((e^-x)cosx^2) - ln((x^2)+x+1). And I know for the quotient rule for derivatives I subtract the denominator in the numerator and then square the denominator, so why do I not square the denominator in this case? Now I don't know if I'm suppose to take the natural logs of those or just take their derivatives or one and then the other. Taking the derivative I believe I get something like (1/y)(dy/dx)=(-x * 2cosx * -sinx^2 * 1/cosx^2) - (1/x^2 + 1/x) ... (I used the chain rule for ln(cosx^2) three times). And I suppose I could simplify that a bit, but I'm betting it's wrong so far.

As you probably can tell I'm very very confused so thanks for any help.

2. Oct 30, 2014

### RUber

The problem you wrote down was $y=((e^{-x})cos^2x)/((x^2)+x+1)$, where did you get a $ln(cosx^2)$?
First remember that products inside of logs can be broken into sums of logs. This will eliminate the need for most fo the product/quotient rule business and is the primary motivator for this technique.

3. Oct 30, 2014

### Zondrina

Hi there Diana.

Logarithmic differentiation can prove useful when you want to find the derivatives of complex looking quotients. You did not quite apply your log rules appropriately if I'm reading those brackets correctly. You should get:

$$\ln(y) = \ln(\frac{e^{-x}cos^2(x)}{x^2 + x + 1}) = ln(e^{-x}cos^2(x)) - ln(x^2 + x + 1) = ln(e^{-x}) + 2ln(cos(x)) - ln(x^2 + x + 1)$$

Now taking the derivative of both sides, you obtain $\frac{y'}{y} = ?$

4. Oct 30, 2014

### Diana Dobleve

Okay, thanks, but I would still have a ln(cosx^2) by doing that right? It would become lne^-x + ln(cosx^2). (cos^2x means the same thing as cosx^2 right? Or do I need to specifically write ((cos^2)x)?

5. Oct 30, 2014

### RUber

In response to your question about the quotient rule and not seeing the denominator squared on the right hand side, you will see it in your final answer when you multiply back in your original y to solve for y'.
A simple example is $y= \frac{x^2}{x-1}$, then $ln y = 2ln (x) - ln (x-1)$ and $\frac{y'}{y} = 2\frac{1}{x}-\frac{1}{x-1}$ so
$y'= y(2\frac{1}{x}-\frac{1}{x-1})=\frac{x^2}{x-1}(2\frac{1}{x}-\frac{1}{x-1})$
$=\frac{2x}{x-1}-\frac{x^2}{(x-1)^2}=\frac{2x(x-1)-x^2}{(x-1)^2}$ which is the familiar quotient rule.

6. Oct 30, 2014

### RUber

$cos(x^2) \neq (cos x)^2$
$cos^2x = (cos x)^2$

7. Oct 30, 2014

### Diana Dobleve

I understand all of that except how you got 2ln(cos(x)). What rule is that? Or do you have a source I can look at to see why that is?

8. Oct 30, 2014

### RUber

You need to handle to $cos^2 x$ term as the square of $cos x$. Then it follows the product rule.
$ln a^2 = 2 ln a$
This is clear by the product rule for logs.
$ln a^2 = ln( a*a) = ln a + ln a = 2ln a$

9. Oct 30, 2014

### Diana Dobleve

Ooh duh. Okay, now I just have two small questions. So when I differentiate both sides I'm getting: (d/dx)(1/y) = -1 - 2(sinx/cosx) - (2x+1)/((x^2)+x+1). I don't know how to differentiate the 2 in front of the ln, or am I not suppose to differentiate it? And I don't know how to handle (d/dx)(1/y), am I suppose to plug in for y??

10. Oct 30, 2014

### RUber

1) 2 is a coefficient, so it multiplies the derivative too. Just like the derivative of 2x is 2dx/dx=2.
You don't have 1/y d/dx, look back to your original post, you have 1/y dy/dx.

You are trying to solve for dy/dx and you know y already.