Do you need absolute value around argument for log and ln?

In summary, when taking the derivative, the absolute value sign is affected. The derivative of \begin{align*} \ln{|x|} \end{align*} is \displaystyle \begin{align*} \frac{1}{x} \end{align*}. The derivative of \begin{align*} \ln{(-x)} \end{align*} is also \displaystyle \begin{align*} \frac{1}{x} \end{align*}.
  • #1
find_the_fun
148
0
When I learned about derivatives I was taught to put the absolute value sign around the argument for ln and log. For example \(\displaystyle \log{|x|}\) and \(\displaystyle \ln{|x|}\) instead of \(\displaystyle log(x)ln(x)\). Does this make a difference? Should both brackets and the straight lines be used?

When taking the derivative what is the effect on the absolute sign? For example if I write \(\displaystyle \ln{|x|}\) would it be incorrect if I didn't write \(\displaystyle \frac{1}{|x|}\)
 
Physics news on Phys.org
  • #2
find_the_fun said:
When I learned about derivatives I was taught to put the absolute value sign around the argument for ln and log. For example \(\displaystyle \log{|x|}\) and \(\displaystyle \ln{|x|}\) instead of \(\displaystyle log(x)ln(x)\). Does this make a difference? Should both brackets and the straight lines be used?

It is merely more general.
I don't usually use absolute value signs myself.
That is, until I may want to generalize my result to negative x, but usually there is no reason to.

When taking the derivative what is the effect on the absolute sign? For example if I write \(\displaystyle \ln{|x|}\) would it be incorrect if I didn't write \(\displaystyle \frac{1}{|x|}\)

Yes. Assuming that you mean by $\ln|x|$ a function that is defined both for positive x and for negative x, that means that the derivative must be $\frac {1}{|x|}$, which is also defined both for positive and negative x.
You can only leave out the absolute value signs if you limit your domain to positive x.


EDIT: My mistake. See Prove It's comment below. The absolute signs should not be there.Btw, there is a catch.
The indefinite integral of $\frac {1}{x}$ is often denoted as $\ln|x| + C$.
But this is not quite correct.
That is because the integration constant can be different for positive x and for negative x.
 
  • #3
I like Serena said:
It is merely more general.
I don't usually use absolute value signs myself.
That is, until I may want to generalize my result to negative x, but usually there is no reason to.
Yes. Assuming that you mean by $\ln|x|$ a function that is defined both for positive x and for negative x, that means that the derivative must be $\frac {1}{|x|}$, which is also defined both for positive and negative x.

Ah, no, this should be stricken from the record.

The derivative of [tex]\displaystyle \begin{align*} \ln{(x)} \end{align*}[/tex] is [tex]\displaystyle \begin{align*} \frac{1}{x} \end{align*}[/tex]. Notice how here we have that [tex]\displaystyle \begin{align*} x > 0 \end{align*}[/tex] in order for the logarithm to be defined.

Notice too that the derivative of [tex]\displaystyle \begin{align*} \ln{(-x)} \end{align*}[/tex] is also [tex]\displaystyle \begin{align*} \frac{1}{x} \end{align*}[/tex]. Don't believe me, use the Chain Rule. Notice that here we have [tex]\displaystyle \begin{align*} x < 0 \end{align*}[/tex] for the logarithm to be defined.

Thus, if we go in reverse, we have [tex]\displaystyle \begin{align*} \int{\frac{1}{x}\,dx} = \ln{(x)} \end{align*}[/tex] IF [tex]\displaystyle \begin{align*} x > 0 \end{align*}[/tex] and [tex]\displaystyle \begin{align*} \ln{(-x)} \end{align*}[/tex] IF [tex]\displaystyle \begin{align*} x < 0 \end{align*}[/tex].

That sounds an awful lot like the definition of an absolute value to me...

So to summarise [tex]\displaystyle \begin{align*} \int{\frac{1}{x}\,dx} = \ln{|x|} + C \end{align*}[/tex]There is NO reason (and in fact it is completely incorrect) to put [tex]\displaystyle \begin{align*} \frac{1}{|x|} \end{align*}[/tex].
 
  • #4
Prove It said:
Ah, no, this should be stricken from the record.

My mistake.
I'll put an EDIT note in my previous post.
As I said, I don't usually use those absolute signs.
 
  • #5
On the other hand, y = ln |x| has two branches, one on the +x axis and one on the -x axis. y = ln(x) only has the branch on the +x side. I think that makes it rather different.

\(\displaystyle \int \frac{1}{x}~dx = ln |x| + C\)
is defined on all values of x (except for x = 0, of course) not just the +xs.

-Dan

Sorry ProveIt. I missed your post somehow.
 
Last edited by a moderator:

FAQ: Do you need absolute value around argument for log and ln?

What is the purpose of using absolute value around the argument for log and ln?

The purpose of using absolute value around the argument for log and ln is to ensure that the input is always positive. This is because logarithmic functions are only defined for positive numbers, and taking the absolute value of the argument ensures that the input will always be positive.

Can I use log or ln without using absolute value around the argument?

No, using absolute value around the argument for log and ln is necessary in order to avoid undefined results. If the argument is negative, the logarithmic function will return an error or undefined value.

What happens if the argument for log or ln is zero?

If the argument for log or ln is zero, the result will be negative infinity. This is because the logarithmic function is the inverse of the exponential function, and when the input is zero, the result of the exponential function will be 1, resulting in a logarithmic value of -∞.

Are there any exceptions to using absolute value around the argument for log and ln?

Yes, there are certain cases where using absolute value around the argument for log and ln is not necessary. For example, if the input is known to always be positive, such as in a population growth model, then absolute value is not needed.

Can I use absolute value around the argument for log and ln for any base?

Yes, absolute value can be used for any base when using log and ln. The base of the logarithm only affects the result, not the argument, so using absolute value will still ensure a positive input for any base.

Similar threads

Back
Top