View Full Version : Math-ish Problem
Can anyone explain to me what the "natural (napierian) logarithm" is? I'm supposed to use it in a formula for one of my programs but want to know what the heck it DOES. There is built-in function for it in cmath but i'm just curious.
Heres the definition in the appendix: Returns e (base of the natural logarithm) to the power of its argument
As I understand Logarithmic Functions:
a^b (a to the power b), a=base, b=exponent.
where x=a^b,
b=logax (a is subscript) is the 'log of x to the base a'
So in the function you want b. Put in x=a^b, where x and b are known, the result will be a^b.
I think...
(got 92% in my maths exam :D)
A natural log is a specific kind of logarithm, though, but I can't remember what.
I think it might be the log of base n, where n is the parameter. Not sure, though, I'm rusty.
What are the parameters & types?
the natural log function (log(x)) accepts a double, and returns a double. The double returned is the natural log of x.
first of all..exponents
2^3 (read two to the eighth)=8
because 2 * 2 * 2 = 8
now then..how do you find x if
9^x = 531441
here's where naturals come in
531441= log(9)x
....i think....
oh dear god..now im not sure...hahhahaha
vandersl
02-25-02, 12:53 PM
As described earlier, the natural logarithm is the logarithm of a number using 'e' as the base rather than some other number (usually 10).
The definition of the logarithm L of a number X using base B is X = B^L (i.e. 1000 = 10^3, so log(1000) = 3).
The 'natural' log is the same, but uses e=2.71828... instead of 10. 'e' is a very special value, and it turns out it is useful for a large number of problems, including compund interest, growth rates, and radioactive decay.
I forget where the definition of 'e' comes from, but you can define it as e = limit(as n approaches infinity) of (1+1/n)^n.
In terms of use in a calculation, here's one used in computing settling times for a circuit (I won't go into details on the circuit):
A circuit has a time constant of 0.2 seconds. Compute the time required to for the output to settle to within 0.001V in response to a 2V step input. Assume the output is 0V in the initial condition.
The output of the circuit at any time t is V(t) = A * [1-e^(-t/T)], where A is the amplitude of the input step (2V), t is the time (seconds), and T is the circuit time constant. Thus V(t) = 2 * [1-e^(-t/0.2)].
From this, 1-V/2 = e^(-t/0.2), or ln(1-V/2) = -t/0.2 (take the natural log of both sides), and finally t = -0.2 * ln(1-V/2) [note the general equation is t = -T * ln(1-V/A)]. Now we know V needs to be 1.999V (2V - 0.001V), so t = -0.2 * ln(1-1.999/2) = 1.52 seconds.
Just to verify V(1.52s) = 2 * [1-e^(-1.52/0.2)] = 1.999V.
There's plenty of good information on this on the web.
Originally posted by vandersl
As described earlier, the natural logarithm is the logarithm of a number using 'e' as the base rather than some other number (usually 10).
The definition of the logarithm L of a number X using base B is X = B^L (i.e. 1000 = 10^3, so log(1000) = 3).
The 'natural' log is the same, but uses e=2.71828... instead of 10. 'e' is a very special value, and it turns out it is useful for a large number of problems, including compund interest, growth rates, and radioactive decay.
I forget where the definition of 'e' comes from, but you can define it as e = limit(as n approaches infinity) of (1+1/n)^n.
In terms of use in a calculation, here's one used in computing settling times for a circuit (I won't go into details on the circuit):
A circuit has a time constant of 0.2 seconds. Compute the time required to for the output to settle to within 0.001V in response to a 2V step input. Assume the output is 0V in the initial condition.
The output of the circuit at any time t is V(t) = A * [1-e^(-t/T)], where A is the amplitude of the input step (2V), t is the time (seconds), and T is the circuit time constant. Thus V(t) = 2 * [1-e^(-t/0.2)].
From this, 1-V/2 = e^(-t/0.2), or ln(1-V/2) = -t/0.2 (take the natural log of both sides), and finally t = -0.2 * ln(1-V/2) [note the general equation is t = -T * ln(1-V/A)]. Now we know V needs to be 1.999V (2V - 0.001V), so t = -0.2 * ln(1-1.999/2) = 1.52 seconds.
Just to verify V(1.52s) = 2 * [1-e^(-1.52/0.2)] = 1.999V.
There's plenty of good information on this on the web.
:eek:
And I though Addition formulae were complicated....
Cluster
03-10-02, 09:04 PM
Originally posted by vandersl
As described earlier, the natural logarithm is the logarithm of a number using 'e' as the base rather than some other number (usually 10).
The definition of the logarithm L of a number X using base B is X = B^L (i.e. 1000 = 10^3, so log(1000) = 3).
The 'natural' log is the same, but uses e=2.71828... instead of 10. 'e' is a very special value, and it turns out it is useful for a large number of problems, including compund interest, growth rates, and radioactive decay.
I forget where the definition of 'e' comes from, but you can define it as e = limit(as n approaches infinity) of (1+1/n)^n.
In terms of use in a calculation, here's one used in computing settling times for a circuit (I won't go into details on the circuit):
A circuit has a time constant of 0.2 seconds. Compute the time required to for the output to settle to within 0.001V in response to a 2V step input. Assume the output is 0V in the initial condition.
The output of the circuit at any time t is V(t) = A * [1-e^(-t/T)], where A is the amplitude of the input step (2V), t is the time (seconds), and T is the circuit time constant. Thus V(t) = 2 * [1-e^(-t/0.2)].
From this, 1-V/2 = e^(-t/0.2), or ln(1-V/2) = -t/0.2 (take the natural log of both sides), and finally t = -0.2 * ln(1-V/2) [note the general equation is t = -T * ln(1-V/A)]. Now we know V needs to be 1.999V (2V - 0.001V), so t = -0.2 * ln(1-1.999/2) = 1.52 seconds.
Just to verify V(1.52s) = 2 * [1-e^(-1.52/0.2)] = 1.999V.
There's plenty of good information on this on the web.
Wow. Someone else understands these things. Out of 3 classes takeing gr12 math the avg was 39% on the logs test. I got 91%. Why do people find thses so difficult. How can 100ppl only manage 39% in a school that is recognized for it "High Academic Standars".
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.