# Logarithmic Differentiation Problem

Gold Member

## Homework Statement

Find the derivative of ##f(x)=\frac{e^x-e^{-x}}{e^x+e^{-x}}##

2. Homework Equations

## The Attempt at a Solution

Please see attached image. The given solution has a 4 in the numerator, and I don't see how I can come across that with the way that I'm going. I think I'm making it 100x more difficult than it should be done. Any tips on what I can do to go at this more efficiently?

## Answers and Replies

Gold Member
Work:

#### Attachments

• 8EFBD8F3-97EC-40F2-9EA3-6780E2A261F8.jpeg
38.1 KB · Views: 257
Orodruin
Staff Emeritus
Science Advisor
Homework Helper
Gold Member
Any tips on what I can do to go at this more efficiently?
Rewrite in terms of sinh and cosh.

• opus
epenguin
Homework Helper
Gold Member
I don't think logarithmic differentiation is giving you any advantage. I would multiply the original expression top and bottom by ex.

• opus
Gold Member
Rewrite in terms of sinh and cosh.
Hmm. I'm not seeing the role that sin and cos play in here. Could you explain please?

Gold Member
I don't think logarithmic differentiation is giving you any advantage. I would multiply the original expression top and bottom by ex.
Ill give it a go!

Mark44
Mentor
Hmm. I'm not seeing the role that sin and cos play in here. Could you explain please?
@Orodruin is talking about ##\sinh## and ##\cosh##, two hyperbolic trig functions, not the circular trig funnctions.
##\cosh(x) = \frac{e^x + e^{-x}}{2}##
See https://en.wikipedia.org/wiki/Hyperbolic_function

• opus
Gold Member
Ohh ok. I never went over those in my Algebra class, but I've started to go over them on my own. Let me poke into them a little further and see what I can do with it.

Orodruin
Staff Emeritus
Science Advisor
Homework Helper
Gold Member
Ohh ok. I never went over those in my Algebra class, but I've started to go over them on my own. Let me poke into them a little further and see what I can do with it.
The main properties you need are that
##\cosh^2 x - \sinh^2 x =1##
##d\sinh x/ dx= \cosh x##
##d\cosh x/dx = \sinh x##

• opus
I believe you can just use the chain rule: df/dx = (df/dz)(dz/dx) = (df/dz)(1) = df/dz = 4/(e^z+e^(-z))^2.

• opus
Mark44
Mentor
I believe you can just use the chain rule: df/dx = (df/dz)(dz/dx) = (df/dz)(1) = df/dz = 4/(e^z+e^(-z))^2.
That's the correct answer, but I don't see how you can get it using the chain rule. The original function is given by ##f(x) = \frac{e^x - e^{-x}}{e^x + e^{-x}}##. The most obvious technique would be the quotient rule. Logarithmic differentiation could also be used, but I don't see much advantage to using it in this problem.

• opus
epenguin
Homework Helper
Gold Member
Yes you can use the knowledge of hyperbolic functions, but the student does not have this yet, and to get it it will be easier when solving problems like the present does not seem very difficult any more IMHO.

As well as my suggested simplification whose point is just to reduce the number of terms you will be differentiating, I would then further simplifiy by expressing the result as (##1 +## something) and then you see something fairly simple and of standard type already somewhat familiar. (Using this may give a result not in the exact form of your textbook answer and you may have to convert it back.)

This should take minutes not days, However if you do it please don't just tell us you have done it, tell us what you have done.

• opus
Gold Member
Yes you can use the knowledge of hyperbolic functions, but the student does not have this yet, and to get it it will be easier when solving problems like the present does not seem very difficult any more IMHO.

As well as my suggested simplification whose point is just to reduce the number of terms you will be differentiating, I would then further simplifiy by expressing the result as (##1 +## something) and then you see something fairly simple and of standard type already somewhat familiar. (Using this may give a result not in the exact form of your textbook answer and you may have to convert it back.)

This should take minutes not days, However if you do it please don't just tell us you have done it, tell us what you have done.

Thanks for the responses all. I would agree that this problem should not take days, but this is for a practice exam and there are over 40 problems, and this does take days (at least for me). So when I get stuck on a problem, I ask for help and put it to the side to come back to it later so I can keep making progress. Apologies if it has come of as forgetting about the thread.

Please see below for my work. I felt the most confidence in just using the quotient rule, but I'm not sure how we can end up with a 4 in the numerator. I think this has something to do with what you were referring to in your post @epenguin about converting it back?

Orodruin
Staff Emeritus
Science Advisor
Homework Helper
Gold Member
Expand the squares in the numerator instead of rewriting the first term as a one.

• opus
Gold Member
Ohhh ok. Got it then. So in expanding and then simplifying, we get
##\frac{4e^xe^{-x}}{(e^x+e^{-x})^2}##
and since ##e^xe^{-x}=1##,
we have ##\frac{4}{(e^x+e^{-x})^2}##

So let me ask this:
Is there a proper way to know what form it should be in, or when we should stop simplifying? For example, is this form a more proper way to express the solution vs the way I had it written in my attached images?

Orodruin
Staff Emeritus
Science Advisor
Homework Helper
Gold Member
There is no such thing as a ”proper” form. A form is correct or not and can be easily expressed or not, but in the end both forms are equivalent. What is ”easier” is a matter of taste to some extent.

Of course, I still think the easiest way is with cosh and sinh along with the derivative of a quotient:
$$\frac{d}{dx}\frac{\sinh(x)}{\cosh(x)} = \frac{\cosh^2(x) - \sinh^2(x)}{\cosh^2(x)} = \frac{1}{\cosh^2(x)} = \frac{4}{(e^x + e^{-x})^2}.$$
This is exactly the same way that you would derive the derivative of ##\tan(x)##, just using the hyperbolic one instead of the trigonometric one.

• opus
Gold Member
Ok thank you! Once I get more familiar with cosh an sinh I will come back to this so I can see what you mean. I'm not familiar enough with them to use them as I thought you were writing typos in sinh instead of sin when I first saw your post Orodruin
Staff Emeritus
Science Advisor
Homework Helper
Gold Member
I never make typus!
Oh wiat! • opus
Gold Member
Hah! Thanks for the help everyone! And apologies for the lengthy time in between responses.

Orodruin
Staff Emeritus
Science Advisor
Homework Helper
Gold Member
At least you reply, which is more than many others ...

• epenguin and opus
Gold Member
Well that would be just plain rude! Usually I respond as soon as I see there's a post but I've got my exam tomorrow and I've been plowing through as many problems as I can so I haven't had much computer time this weekend. But I really do appreciate all of the help.

Ray Vickson
Science Advisor
Homework Helper
Dearly Missed
Ok thank you! Once I get more familiar with cosh an sinh I will come back to this so I can see what you mean. I'm not familiar enough with them to use them as I thought you were writing typos in sinh instead of sin when I first saw your post You don't need to have ever heard of ##\sinh## or ##\cosh## to do the question from start to finish. All you need is the differentiation formula for a ratio: $$\left( \frac{f}{g}\right)' = \frac{f'}{g} - \frac{f g'}{g^2}.$$ Apply that to ##f = e^x - e^{-x}## and ##g = e^x + e^{-x}.##

• opus
Mark44
Mentor
There is no such thing as a ”proper” form. A form is correct or not and can be easily expressed or not, but in the end both forms are equivalent. What is ”easier” is a matter of taste to some extent.

Of course, I still think the easiest way is with cosh and sinh along with the derivative of a quotient:
$$\frac{d}{dx}\frac{\sinh(x)}{\cosh(x)} = \frac{\cosh^2(x) - \sinh^2(x)}{\cosh^2(x)} = \frac{1}{\cosh^2(x)} = \frac{4}{(e^x + e^{-x})^2}.$$
This is exactly the same way that you would derive the derivative of ##\tan(x)##, just using the hyperbolic one instead of the trigonometric one.
To expand just a bit on the work above,
##\frac d {dx} \tanh(x) = \frac{d}{dx}\frac{\sinh(x)}{\cosh(x)} = \frac{\cosh^2(x) - \sinh^2(x)}{\cosh^2(x)} = \frac{1}{\cosh^2(x)} = \frac{4}{(e^x + e^{-x})^2} = sech^2(x)##
Compare to the formula for ##\frac d {dx} \tan(x)##

Also, the derivatives of the hyperbolic sine and cosine are very nice:
##\frac d {dx} \sinh(x) = \cosh(x)##
##\frac d {dx} \cosh(x) = \sinh(x)##
No messy changes of sign to have to remember...

• opus
Gold Member
Thanks guys. I'll have to remember those. It seems there are a lot of good identity and property gems that are good to memorize to take derivatives.