Jump to content

Talk:Logarithm

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Featured articleLogarithm is a featured article; it (or a previous version of it) has been identified as one of the best articles produced by the Wikipedia community. Even so, if you can update or improve it, please do so.
Main Page trophyThis article appeared on Wikipedia's Main Page as Today's featured article on June 5, 2011.
Article milestones
DateProcessResult
December 27, 2010Good article nomineeNot listed
January 20, 2011Good article nomineeListed
February 22, 2011Peer reviewReviewed
June 1, 2011Featured article candidatePromoted
Current status: Featured article

Units and logarithms

[edit]

Really need a section on the units of a logarithm. For example, what is the unit of Log(10/seconds)? That is a common expression in first order rate equations, like nuclear decay.

From the integral definition of the natural log, "the area under the curve of a plot of 1/x versus x", it is clear that x can have any unit and that the logarithm is always unitless. The "area" under the curve has units of the x-axis times the units of the y-axis which, in all cases, is unity and unitless.

There are some discussion on the web suggestion things like "you can't take the logarithm of a number with units" (which is absurd, scientists and engineers do it all the time), to basically "there is a hidden and highly secret process in which the units disappear". Like "actually log(x*unit) is really log(x*unit/1*unit) so the units cancel", which is wrong.

The fact that the logarithm removes the units means that taking a logarithm is a lossy transform. There is no way, other than external knowledge, that allows the unit to be recovered by taking the exponent of the log. Therefore, e^(Ln(x)) <> x in all cases since the units have been lost. Jsluka (talk) 18:49, 26 October 2022 (UTC)[reply]

Engineer here - Just because we often do things like take the logarithm of numbers with units does not mean we should. For example, expanding something like log(x*unit) into log(x) + log(unit) implies a solution x to base ^ x = unit (definition of a logarithm), which is really hard to find when the base is in R (like, say, Euler's constant) and you're confined to R or C for the solution x. I don't know how to raise a real number to another real (or even complex) exponent in a way that changes the units from 1 to something like seconds, square meters, or volts. I think we can take logarithms of units when we define them -- Otherwise, I would personally consider something like ln(x) -> R; where x = seconds (in somewhere like R or C) completely nonsense unless one or more of three things is the case:
  1. There is a sensible solution to the expression exp(x) = seconds, for x in your given space. Good luck.
  2. The argument in question winds up being dimensionless by cancellation.
  3. We can "pretend" the units are dimensionless because we plan to just call the units of the solution something like log-seconds anyways.
Taking this in a weird direction, it means that we can make equivalence relations between log units in some weird ways. Consider ln(acceleration) == ln(m/s^2) == ln(meters) - 2*ln(seconds), which suggests that ln(seconds) == (ln(meters) - ln(acceleration))/2 == ln( (m / (m/s^2)) ^ (1/2) ) == ln( (seconds^2) ^ (1/2)), which does make sense. I don't know what to do with a result like this, but it does serve your point that clearly one can take the logarithm of a number with units. In fact, one can use a logarithm of pure units not multiplied by anything at all and arrive at sensible answers, just like this. 66.218.139.214 (talk) 19:37, 24 April 2023 (UTC)[reply]
Reminds me that it seems to me that engineers often write expressions and equations with units factored out, while physicists keep units in. That is, one might say F(Newtons) = m (kg) * a (m/s/s). The expectation is that one converts to the given units, applies the formula, and then converts the result. Physics will just say F = m a, where the variables keep the units. The former might result in excess conversions, the latter unusual units. Since computer languages normally don't keep units in variables, the engineering way is convenient for programming. And, as with the question here, units go out before the logs. Gah4 (talk) 04:55, 25 April 2023 (UTC)[reply]

Redundant formula in section on Taylor series

[edit]

Jacobolus surprisingly reverted an edit that removed a verbatim copy of a line two lines above that line. I'm re-reverting it after [Discussion] with him. MüllerMarcus (talk) 20:21, 20 October 2023 (UTC)[reply]

No, please do not make excellently accessible featured articles less friendly to novice readers without consensus, and please don't engage in edit warring. The explanation is not "redundant", and the line you call "*identical*" is self evidently different. Please look again more carefully, and try to put yourself in the shoes of a non-technical reader. –jacobolus (t) 20:39, 20 October 2023 (UTC)[reply]
I made the text a bit more explicit. Does that help? (As always, anyone should feel free to keep working on this who thinks they can improve on it.) –jacobolus (t) 00:58, 21 October 2023 (UTC)[reply]
that really helps a lot! Thank you for spending time on this, and sorry for the confrontation. MüllerMarcus (talk) 12:21, 21 October 2023 (UTC)[reply]

Exponentiation's other inverse function?

[edit]

Isn't root extraction also an inverse function of exponentiation? - S L A Y T H E - (talk) 09:04, 25 July 2024 (UTC)[reply]

No, it is an inverse function of a power function with an integer exponent D.Lazard (talk) 10:24, 25 July 2024 (UTC)[reply]
Well, first, power function allows for non-integer exponents. But ok, power function redirects to exponentiation, and exponentiation includes both power function and exponential function. The important difference, and I don't know which one you are asking about, is between exponential function and exponentiation. Gah4 (talk) 20:01, 25 July 2024 (UTC)[reply]
To be clear, inverse functions are defined for univariate functions only, and exponentiation is a bivariate function. So, for having an inverse function, one must fix one variable (partial application). If one fixes the base, one has an exponential function with a logarithm as an inverse function. If one fixes the exponent, one has a power function. If the exponent is a natural number n, the inverse function is a nth root. D.Lazard (talk) 21:17, 25 July 2024 (UTC)[reply]
Following Lazard (25 July 2024) we can conclude that the first sentence of the lede is wrong - since 2015. The definition shouldn't speak of the inverse function of the bivariate operation 'exponentiation'
I suppose that was meant: a logarithm is a (written) expression with a symbol for a certain logarithmic function, followed by a symbolic expression for a domain element.  Combined with:
A function f on R+ is called logarithmic when it transforms multiplication into addition: f(uv) = f(u) + f(v) . Or - in an indirect way - when it is the inverse function of an exponential function of type x→bx (b>0, ≠1) .
Or anything equivalent.   Yes?   Hesselp (talk) 19:47, 21 August 2024 (UTC)[reply]
This seems excessively pedantic and confusing, but it's plausible we could make up a better first few paragraphs.
If you want to be precise, the logarithm function is the inverse of the exponential function (or a logarithm function is the inverse of an exponential function). The term logarithm, most precisely, is a synonym for exponent, but saying it that way can also be confusing to novices. The unadorned term logarithm is also routinely applied to the logarithm function, or to an expression such as or . –jacobolus (t) 20:13, 21 August 2024 (UTC)[reply]
A logarithmic function (or logarithm function) f (R+→R) transforms multiplications into additions, that is: f(uv) = f(u) + f(v) for all pairs u, v of positive numbers.
Is this simple and clear enough to start the lead with? Hesselp (talk) 19:05, 24 August 2024 (UTC)[reply]
That is a useful property of the logarithm function, but it does not describe what the function is. I don't see what's wrong with the current lead. Each exponential function has an inverse logarithm function . The log is the inverse of the exponential. The fact that there is a family of exponential functions, and a corresponding family of logarithm functions, is detailed later.
You could also define a different two-variable powering function rather than considering a family of single-variable exponential functions but that does not have a well-defined inverse as it is not even locally 1-1 from its inputs (the pair ) to its outputs (a single number). —David Eppstein (talk) 19:27, 24 August 2024 (UTC)[reply]
An alternative would be to say something like: "In the equation the quantity is called the base, the quantity is called the exponent, and the quantity is called the result. When this equation is rewritten to isolate the exponent , is instead called the logarithm base of , denoted ." But this is probably just as (if not more) confusing. [Edit: the § Definition section already discusses this.] –jacobolus (t) 19:44, 24 August 2024 (UTC)[reply]

"it does not describe what the function is" ??

[edit]

@David Eppstein: Please can you motivate why (an - improved? - variant of Aug 24):
"A function f (R+→R) is called logarithmic function (or logarithm function)   iff   f(uv) = f(u) + f(v) for all pairs u, v of positive numbers."
you don't see as a precise definition?
Is the definition only precise, using the inverse function?:
"A function f (R+→R) is called logarithmic function (or logarithm function)   iff   finv(u) + finv(v) = finv(uv). finv(u+v) = finv(u) · finv(v) for all pairs u, v of pos. numbers."
Or should it be?:
"A function f (R+→R) is called logarithmic function (or logarithm function)   iff   b ^ f(x) = x,  b>0 ≠1, x>0 ."
presuming knowledge of the not very elementary (IMHO) bivariate operation ^ for real variables,  instead of addition and multiplication.

@Jacobolus: Why "the quantity b, x, y" ?  This letters are used here as variables. They all three represent real numbers, not more general quantities.
The definition of "logarithm base b of y" really needs a mysterious rewriting of an equation? There really isn't a more direct way?
And after all I don't see a definition of logarithmic function / logarithm function. Hesselp (talk) 12:55, 25 August 2024 (UTC) Hesselp (talk) 14:40, 25 August 2024 (UTC)[reply]

I think all of your proposals are less clear or helpful for the lead section of this article than the existing text. Conflating "logarithm" and "logarithm function" is common and not really a serious problem. The distinction could be mentioned somewhere in a footnote or later down the article but I think belaboring it at the start is distracting. Anything involving symbols such as does not belong in the lead section of this article. –jacobolus (t) 15:07, 25 August 2024 (UTC)[reply]
I have edited the beginning of the lead for avoiding the ambiguous (here) "exponentiation", using a formulation proposed above by Jacobolus (I read Jacobolus' formulation only after having edited the lead). D.Lazard (talk) 15:16, 25 August 2024 (UTC)[reply]
I think a link to exponentiation is more helpful to provide context here for most readers than exponential function. –jacobolus (t) 15:27, 25 August 2024 (UTC)[reply]
I have restored this link, using the fact that in Exponentiation, the base is defined in the second sentence. D.Lazard (talk) 15:54, 25 August 2024 (UTC)[reply]

Definition of logarithm

[edit]

This is vaguely on the topic of the last discussion. I note that the article doesn't really properly define logarithms. The section on the definition is a standard one used in pre-calculus, but it is not suitable for analysis, which uses properties of the natural logarithm instead. Thus, really is defined as , where is defined as an integral (or in some other equivalent way). The problem with the definition "The real such that " is that the exponential is usually defined as , so it is circular, unless we except the natural logarithm and exponential function. Tito Omburo (talk) 16:32, 25 August 2024 (UTC)[reply]

Explaining this is fine, but it should be done below the first half of this article. –jacobolus (t) 17:30, 25 August 2024 (UTC)[reply]
Yes, I agree. Particularly since the definition given in the article already isn't "wrong" per se, it's just logically incomplete. Tito Omburo (talk) 20:17, 25 August 2024 (UTC)[reply]

Approximation for splitting the logarithm of a sum

[edit]

I think it could be interesting to add an approximation for splitting the logarithm of a sum which rises from approximating the Softplus function:

which leads to the following smooth approximation to the maximum function and LogSumExp function (not included in the smooth maximum page): with

with just a change of variables it will lead to how approximate splitting the sum of a logarithm as:


I believe is interesting since I have never seen before the approximation for splitting the logarith of a sum before finding it accidentally here {https://math.stackexchange.com/q/4838311/909869}. Maybe a superuser could incorporate it after checking it do works as intended. 45.181.122.234 (talk) 02:24, 25 September 2024 (UTC)[reply]