# Logarithmic differentiation to find dy/dx

1. Oct 30, 2005

### BlackMamba

Hello,

I know how I need to do the problem, I have figured out an answer as best as I could but I have a feeling the answer is not correct. In fact I'm pretty sure it's not. Anyway, I'm supposed to use the logarithmic differentiation to find dy/dx for the equation: $$x^y = y^x$$

I know I need to take the ln of both sides first before finding dy/dx. My question is do I need to get y alone first then take the ln? As I've done the problem I just took the ln of each side isolating y that way. So after taking the log of both sides my answer at that point was: $$\frac{ylnx}{x}=lny$$

So if I've done that right, I went on to find the derivative dy/dx for the above equation. I used the quotient rule and the chain rule. However when I used the chain rule, I somehow got 0 / $$x^2$$. So I then used the product rule instead. However I'm still left with $$ylnx$$ in part of my answer but I didn't think that was possible since y is a function of x. I'm so confused, any help would be greatly appreciated.

Last edited: Oct 30, 2005
2. Oct 30, 2005

### Jameson

Start from here: $$y\ln(x)=x\ln(y)$$

Now use implicit differentiation to solve for $$\frac{dy}{dx}$$

3. Oct 30, 2005

### BlackMamba

Ok. I had that, and as usual I went too far. I'll try that and see what I get. Thanks

4. Oct 30, 2005

### BlackMamba

Alrighty then. Well I'm confused as to which would be the proper rule to use. I tried both and I'm getting stuck with both. I've used the product rule first, then started over and used the chain rule. In any case I'll have lny and again I didn't think that was possible since y is a function of x.

Perhaps I'm not applying the chain rule correctly.

If I have $$\frac{d}{dx} [xlny]$$ then using chain rule that would be written as: $$xlny \frac{d}{dx}[lny]$$

Looking at it more, I don't think I can use the Chain rule like that. The equation would read as the variable x (times) the ln of y so I am thinking that the product rule is needed here in which case I would work it out like such:

$$\frac{d}{dx} [xlny]$$

$$x \frac{d}{dx} [lny] + lny \frac{d}{dx} [x]$$

$$x (lny \frac{d}{dx}[y]) + lny$$

$$x (lny (\frac{dy}{dx})) + lny$$

Not too sure where to go from here.... (This would be the right side of the equation.)

The left side side would look something like this:

$$\frac{d}{dx}[ylnx]$$

$$y \frac{d}{dx}[lnx] + lnx \frac{d}{dx} [y]$$

$$y(\frac{1}{x}) + lnx (\frac{dy}{dx})$$

So those two sides set equal to one another would look something like this:

$$y(\frac{1}{x}) + lnx (\frac{dy}{dx}) = x (lny (\frac{dy}{dx})) + lny$$

$$y(\frac{1}{x}) + lnx (\frac{dy}{dx}) = xlny (\frac{dy}{dx}) + lny$$

$$lnx (\frac{dy}{dx}) - xlny (\frac{dy}{dx}) = lny - y(\frac{1}{x})$$

$$\frac{dy}{dx} (lnx - xlny) = lny - y(\frac{1}{x})$$

$$\frac{dy}{dx} = \frac{lny - y(\frac{1}{x})}{(lnx - xlny)}$$

Ok well I think I've isolated $$\frac{dy}{dx}$$ the right way, but normally we are supposed to substitute the original equation for y into the equation above. I don't have a $$y^x$$ above so do I just subsititue anyway. Like put $$x^y$$ where y is currently above? Or would it just be left as is?

Am I making this more complicated then it should be?

Last edited: Oct 30, 2005
5. Oct 30, 2005

### whozum

$$\frac{d}{dx} [xlny]$$

You need to use the product rule first to separate, the two, then the chain rule on $\ln y$

6. Oct 30, 2005

### BlackMamba

Yeah I figured that out and did that later in my post above.

7. Oct 30, 2005

### BlackMamba

OK I've just read somewhere that the constant $$\frac{d}{dx}[lny] = 0$$.

In which case that would change my answer above to something like this:

$$\frac{dy}{dx} = \frac{lny - y(\frac{1}{x})}{lnx}$$

Is that correct?

Last edited: Oct 30, 2005
8. Oct 30, 2005

### Jameson

No.

$$\frac{d}{dx}[lny] = \frac{1}{y}*\frac{dy}{dx}$$

9. Oct 30, 2005

### BlackMamba

Alright well, I'm completely lost.

My first answer is obviously wrong then. This sucks.

10. Oct 30, 2005

### BlackMamba

So Jameson, couldn't I just use then the Chain rule here:

$$\frac{d}{dx}[ylnx] = \frac{d}{dx}[xlny]$$

Then that would give me the answer:

$$[\frac{ylnx}{x^2lny}]y = \frac{dy}{dx}$$

But I still am unsure how to substitute for $$y^x = x^y$$ Would I just simply put $$x^y$$ where y is?

Last edited: Oct 30, 2005
11. Oct 30, 2005

### BlackMamba

Uhmm ok no that wouldn't be the answer. LOL Now I'm just trying anything causing I'm getting desperate. But I know better than that. Disregard what I posted above ^.

This is getting highly frustrating.

12. Oct 30, 2005

### BlackMamba

$$[\frac{y(\frac{1}{x}) - lny}{xlnx}]y = \frac{dy}{dx}$$

Is this looking any closer to a plausible answer??

13. Oct 30, 2005

### BlackMamba

Ok, I see that the above answer isn't a possibility either. I'm through with it for tonight. It seems like I'm willing to just throw anything out there for an answer and that's not going to get me anywhere.

14. Oct 30, 2005

### whozum

$$y\ln(x)=x\ln(y)$$
Implicit differentiation, differentiate each term on both sides with respect to x given that y is a function of x:
Left hand side needs the product rule first then the chain rule. Right hand side needs the same thing.
Heres a big step if you want to cheat but I recommend doing it yourself:

$$\frac{dy}{dx}\ln x + \frac{y}{x} = \ln y + \frac{x}{y}\frac{dy}{dx}$$

After that solving for $\frac{dy}{dx}$ shouldn't be too tough.

15. Oct 31, 2005

### BlackMamba

Well that's just it whozum. I have that exact line in my work here on my paper but I must just be going in the wrong direction to solve.

I'll just show you the way I am solving it and you can tell me where I'm going wrong. I'll start off from your line above, but I have it written slightly different on my paper.

$$\frac{y}{x} + \frac{dy}{dx}lnx = \frac{x}{y}\frac{dy}{dx} + lny$$

$$\frac{y}{x} - lny = \frac{x}{y}\frac{dy}{dx} - \frac{dy}{dx}lnx$$

$$\frac{y}{x} - lny = (\frac{x}{y} - lnx)\frac{dy}{dx}$$

$$\frac{\frac{y}{x} - lny}{\frac{x}{y} - lnx} = \frac{dy}{dx}$$

Now I know fractions left in an answer such as this one is not favorable, but I'm not entirely sure how to get rid of it.

Anyway, where am I going wrong my work above?

Last edited: Oct 31, 2005
16. Oct 31, 2005

### dextercioby

There's another solution which doesn't require logarithmic differentiation: using the theorem on implicit functions.

Daniel.

17. Oct 31, 2005

### BlackMamba

Thanks dextercioby. Unfortunately, I'm required to use logarithmic differentiation for this problem.

18. Oct 31, 2005

### whozum

$$\frac{\frac{y}{x} - lny}{\frac{x}{y} - lnx} = \frac{dy}{dx}$$
Start by doing this step:
$$... = \frac{\frac{y-x\ln y}{x}}{\frac{x-y\ln x}{y}}$$, from there you can simplify the nested fraction a bit more.

19. Oct 31, 2005

### HallsofIvy

Staff Emeritus
$$\frac{\frac{y}{x} - lny}{\frac{x}{y} - lnx} = \frac{dy}{dx}$$
looks to me like a perfectly valid answer, but if the fractions are bothering you , multiply both numerator and denominator by xy:
$$\frac{dy}{dx}= \frac{y^2- xylny}{x^2- xylnx}$$.

20. Oct 31, 2005

### BlackMamba

Thank you whozum and HallsofIvy. I tend to make things more difficult then they really need to be. Thanks again. :)