# When you punch in log on your calculator

1. Feb 22, 2005

### DB

$$b^x=y$$
$$log_b(y)=x$$

When you punch in log on your calculator, mathematically, how is it solving for x?

For example,
$$3^x=81$$
$$log_3(81)=4$$
How is this being solved?

Thanks

2. Feb 22, 2005

### Jameson

I don't have a calculator where you can define the base like that.

You rewrote the original question that skipped a lot of steps.

I would do the question like this:

$$3^x = 81$$
$$x log(3) = log(81)$$
$$x = \frac{log(81)}{log(3)}$$

I don't know exactly how the calculator evalulates the value, but those are the steps you can take to see a process.

3. Feb 22, 2005

### Crosson

I used to ask this question, the answer given to me was "the calculator memorizes the values", this seemed reasonable, but lame.

The truth is that logarithms, sines, cosines, anything, can be expanded as an infinite polynomial. For example:

ln(1+x) = x - (x^2)/2 + (x^3)/3 - (x^4)/4 + ...

sin (x) = x - (x^3)/3! + (x^5)/5! - ...

Where ln is log base e and 5! means 5*4*3*2*1. These series have an infinite number of terms, so the calculator has to cut them off at some point (approximate).

4. Feb 22, 2005

### Chrono

It has -1 < x < 1 after the expansion in a reference book of mine.

And, yeah, expansions is what caluculators use to find values of a given x.

5. Feb 22, 2005

### damoclark

ln(1+x) = x - (x^2)/2 + (x^3)/3 - (x^4)/4 + ...

Generally , this series converges too slowly to be of any use to calculate ln(1+x). Consider if x=100, you would need to calculate zillions of terms in the series for it to be of any use, I'm not even sure it would converge for x>1. Of course if 0<x<1, the series converges quite fast.

Consider the problem of calculating ln(1000), this is how I think your calculator does it.

ln( (1+x)/(1-x) ) = ln(1+x) - ln(1-x)

Set (1+x)/(1-x) = 1000 => x = 999/1001

therefor ln(1+999/1001) - ln(1-999/1001) = log(1000)

Now since you value of x is less than one, your calculator doen't have to use so many terms in the series to calculate an accurate answer, as convergence is acheived quite quickly.

6. Feb 22, 2005

### DB

Sorry, but wats ln?

7. Feb 22, 2005

ln = log to the base e

It's often just denoted log.

8. Feb 22, 2005

### Chrono

DB, I suggest you memorize this.

9. Feb 22, 2005

### DB

lol, kk thanks. I know e is approx = 2.17..... so Im gonna study the posts and see If I can understand, I'll probably have more questions.

10. Feb 22, 2005

### Chrono

The reason I said that is because in calculus you will see ln denoted as log and I think it's pretty safe to say that it's generally accepted like that (I still remember that thread where we had a lengthy discussion about this).

And we're always here whenever you want to ask more questions.

11. Feb 23, 2005

### dextercioby

I frankly doubt it.I think it should be "ln" everywhere...What about logarithm to the base of 10,how would you write that ...?

Daniel.

P.S.BTW:$\ln$ voilà...

12. Feb 23, 2005

### Oggy

$$e=2.7182$$, not $$2.17$$.

13. Feb 23, 2005

### dextercioby

Not really,it's an transcendental irrational #,therefore
$$e\approx 2.7183$$

Daniel.

14. Feb 23, 2005

### Oggy

Yeah of course, and now I know the Latex code for $$\approx$$ :)

15. Feb 23, 2005

### Chrono

Maybe like this:

$$\log_{10}$$

16. Feb 23, 2005

### dextercioby

Ha,ha,why that way,when $log$ would mean automatically base "e"...?;bugeye:

Daniel.

17. Feb 23, 2005

### Oggy

I thought $$\log_{e}{x}=\ln{x}$$, and $$\log_{10}{x}=log{x}$$.

18. Feb 23, 2005

### dextercioby

It would be a good option,however,we in Romania used the best:
$$\log$$ would mean any base,except "e" & 10.You would have to specify the base as a subscript.E.g. $\log_{8\sqrt{7\pi}}$
[tex] \ln [/itex] would mean base "e".
[tex] \lg [/itex] would mean base 10...

Daniel.

Last edited: Feb 23, 2005
19. Feb 23, 2005

### dextercioby

What do you know,LATEX recognizes all three notations,hopefully with the definitions that i specified...

Daniel.

20. Feb 23, 2005

### houserichichi

I'd actually learned it as log being base 10, ln being base e, and lg being base 2...for all those wacky computer scientists, no less.