Logarithmic derivative question

Click For Summary
The discussion focuses on using logarithmic differentiation to find the derivative of the function y=((e^-x)cos^2x)/((x^2)+x+1). Participants clarify that the logarithmic derivative involves taking the natural logarithm of both sides, which simplifies the differentiation process by converting products into sums. The correct application of logarithmic rules, particularly for the cos^2(x) term, is emphasized, as it leads to the expression 2ln(cos(x)). Confusion arises regarding the differentiation of terms and the correct application of the quotient rule, with guidance provided on handling coefficients and the relationship between y and its derivative. Overall, the discussion aims to clarify the steps necessary for correctly applying logarithmic differentiation.
Diana Dobleve
Messages
4
Reaction score
0

Homework Statement


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)

Homework Equations


(dy/dx)(e^x) = e^x
(dy/dx)ln(e^-x) = -x ?

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.
 
Physics news on Phys.org
Diana Dobleve said:

Homework Statement


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)

Homework Equations


(dy/dx)(e^x) = e^x
(dy/dx)ln(e^-x) = -x ?

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.

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.
 
Diana Dobleve said:

Homework Statement


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)

Homework Equations


(dy/dx)(e^x) = e^x
(dy/dx)ln(e^-x) = -x ?

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.

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} = ?##
 
RUber said:
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.

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)?
 
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.
 
##cos(x^2) \neq (cos x)^2##
##cos^2x = (cos x)^2##
 
Zondrina said:
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} = ?##

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?
 
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##
 
RUber said:
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##
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
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.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 25 ·
Replies
25
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
Replies
7
Views
2K