PDA

View Full Version : Mathematics (Factoring and Logarithms)

xddxogm3
11-25-2004, 05:35 PM
I have a question. My book does not cover this, and I have been unable to locate anything on this online. Can you Factor inputs out of a logarithm?
Is the following valid? Please forgive the elementary question, but I feel it is important to get a good grasp on math to fine tune my code.

ln(2x)=ln(3x)
ln(2) + ln(x) = ln(3) + ln(x)
ln(x) - ln(x) = ln(3) - ln(2)
x ( ln() - ln() ) = ln (3/2)
x = ln (3/2)

if this is valid, what other properties/laws can I apply to logarithms?
associative, distributive, etc.
is there a list of these?
I found this site, but no answer to these questions.
http://mathworld.wolfram.com/Logarithm.html

Thantos
11-25-2004, 05:37 PM
no you can not factor out like that.

xddxogm3
11-25-2004, 05:41 PM
how would i issolate x in a problem like that?
w/o eliminating it totaly?
I'm assuming you can zero out the two ln(x) - ln(x).
and what properties can you apply to logarithms?

XSquared
11-25-2004, 05:44 PM
There is no solution to ln(2x)=ln(3x). ln(3x)-ln(2x) is approximately 0.4054651084 for all x.

xddxogm3
11-25-2004, 05:58 PM
I attended the tutorial session at my university, and the instructor in charge stated you can use the distributive law when dealing with logarithms. Is this not correct? If you can use distributive, wouldn't that allow the use of factoring out a common factor?

Thantos
11-25-2004, 06:08 PM
ln(2x)=ln(3x)
ln(2) + ln(x) = ln(3) + ln(x)
ln(x) - ln(x) = ln(3) - ln(2)
Up to this point you were ok.

x ( ln() - ln() ) = ln (3/2)
On the right side you were ok but on the left side you can not do that. This line should have looked like:

0 = ln (3/2) which is a no solution as ln(3/2) does not equal 0

gcn_zelda
11-25-2004, 06:24 PM
ln(2x) = ln(3x)

Remove the natural log from both sides...

2x = 3x
x = 0

But you can't take a natural log of 0 because :

ln(0) is like saying e^? = 0
Nothing raised to a power can equal 0.

xddxogm3
11-25-2004, 06:39 PM
I found the name of the properties I was questioning.
Properties of Real Numbers.
I was advised by an instructor in a tutorial session, that you can use the Commutative, Associative, and Distributive properties on logarithms. Is this correct?
If you can use the Distributive property, couldn't you reverse that property?
This would be similar to factoring out a common multiple of the product.
Is this not a valid statement? Again, I just want to know if this is possible for future knowledge.

gcn_zelda
11-25-2004, 07:26 PM
ln(x) - ln(x) != x(ln - ln)

ln(x) is not natural log times x. It's the natural log of x. Logarithms are not constants. They're operations.

abyssphobia
11-25-2004, 10:43 PM
ln(x) - ln(x) != x(ln - ln)

ln(x) is not natural log times x. It's the natural log of x. Logarithms are not constants. They're operations.
ln(2x) = ln(3x)

Remove the natural log from both sides...

2x = 3x
x = 0

But you can't take a natural log of 0 because :

ln(0) is like saying e^? = 0
Nothing raised to a power can equal 0.

I agree with your theory !!!

ln(2x)=ln(3x)
ln(2) + ln(x) = ln(3) + ln(x)
ln(x) - ln(x) = ln(3) - ln(2)

but i am wondering , if my hypotesise could be possible
what if...

ln x/ ln x = ln3/ln2 // because of the property of logarithms
1= ln3/ln2

Is that possible or I'm dreaming up...

You're interpreting that property incorrectly. It would be ln(x/x)=ln(3/2), which gives 0=0.4054651084.

right!!!
it's more logical,
well at least I had the idea ;)
thanks XSquared, you cleared mind :D

XSquared
11-25-2004, 10:55 PM
You're interpreting that property incorrectly. It would be ln(x/x)=ln(3/2), which gives 0=0.4054651084.

Zach L.
11-25-2004, 11:52 PM
Your problem is that x is not in the domain of ln. That is why you come up with a non-sense result. Surely, the one solution of 2x=3x is x=0, but 0 is not in the domain of ln, so that equation ln(2x)=ln(3x) has no solution. The properties of logarithms only apply when the quantities in question are in the domain.

To convince yourself that 0 is not in the domain, look at the definition of ln(x). Integral{t=1 to t=x} of dt/t. If you just sketch it out, you see that this integral is undefined (i.e. the 'area under the curve' between 0 and 1 inclusive diverges sharply).

Thantos
11-26-2004, 12:18 AM
You don't need integrals to see the domain of ln x. ln x is just the inverse of e^x. e^x has a domain of (-inf, +inf) and a range of (0, +inf). Since e^x is a one to one type of function we don't have to restrict it to take the inverse. So its inverse will have a domain of (0, +inf) and a range of (-inf, +inf)

From IM
How would factoring with logarithms work?
If at all. Would I have to resolve the logarithm first before any attempt to factor?
You can not "factor" out of a log just as you can't "factor" out the base of an exponent. ie:

x^2 + x^3 != x ( 1^2 + 1^3)

I think you are forgetting the major rule: Once you get an answer put it into the orginal equation and check the results.

Zach L.
11-26-2004, 12:34 AM
Thats another way of looking at it. What I prefer about the integral solution is that it more directly relates to computing a value of ln(x) than does looking at it as the inverse of e^x.

Thantos
11-26-2004, 12:55 AM
But log is defined to be the inverse. Also consdiering the OP's previous math based questions I would consider the use of integrals to be more confusing then helpful.

Zach L.
11-26-2004, 07:15 AM
That's only an equivalent way of defining it.
I hadn't entirely read all of the post. So, to make it a bit more understandable: The log of 0 is the area under the curve 1/x from x = 0 to x = 1. Notice, however, that this region contains the point (0, 1/0). Hence, that point, x = 0 is not in the domain.

Thantos
11-26-2004, 08:31 AM
the integral of 1/x is ln|x|. Doesn't really help you solve for a given value. Also what about other log bases?

Zach L.
11-26-2004, 09:42 AM
Okay. Say you have a value M of which you want to find the natural logarithm of (or at least, approximate). Given these two options, which do you take? 1) Randomly guess values of x such that e^x = M and hope you get close eventually, 2) take the curve 1/x and integrate from 1 to M using geometric approximations for the integral. More to the point, which is a better algorithm for doing this.

You have to multiply the integrand by a constant, namely, 1/ln(b) where b is the base.

Well, it shouldn't take a link to convince you that the two definitions are equivalent. I'd hope you'd be able to see that since the two definitions produce functions which a) have the same domain, b) take on the value at at least one place, and c) have the same properties (hence taking identical values over the entire domain), that they are in fact the same. If you insist on a link, however, here was one which was a small Google search away: http://mathworld.wolfram.com/NaturalLogarithm.html

*edit*
And with the definition I gave, the integral is ln(x) not ln(|x|) otherwise you are integrating through a discontinuity, so the domain is necessarily restricted to x > 0.

Thantos
11-26-2004, 11:00 AM
Well personally if I need to calculate it I bust out the trusty calculator or when programming use the built in libraries. I'm not gonna waste my time doing enough iterations of the trapezoidal or simpon's rules to get an accurate value ;)

What I was looking for is for a reference that said that logs (not just ln) were defined in such a manner. Yes it works for e and from that we can get the other ones. But its not the actual defination of logs.

Zach L.
11-26-2004, 11:42 AM
Granted, I would break out the calculator too. Though, when I have written algorithms for ln, I have used the integral method.

At any rate, it is a way of defining logs. Yours is too. And, they both (as they should) produce the same thing. :)

Well, I think we are arguing in circles around each other at this point (just don't ask me to define circle ;) ).

Cheers

Thantos
11-26-2004, 11:47 AM
Nah defining a circle is too easy. Now figuring out why xviddivxoggmp3 keeps posting math questions here is a much harder question ;)

xddxogm3
11-26-2004, 08:42 PM
Ok, Thanks for everybodies input. You are correct, that I do not know anything about integral values. As for why I post math questions, I'm just trying to make sure I have a good foundation for calculas and calculas based physics (which I have been advised is needed to be a good programmer). I have received numerous details that have been misleading me on this issue. Again sorry for the elementry nature of the questions I have been posting. I have tried to get answers from my teacher, math lab, and our tutor, but I'm still unclear on some things. I also have been unable to find any math forum that is active. I have found one or two, but no posts at all. Can you think of a valid example of how to use the distributive rule with a logarithm.

Zach L.
11-26-2004, 09:11 PM
You can't use it like you did. Firstly, any function must act on a value (be evaluated somewhere), so you can't factor anything out without putting something else in. Secondly, the property which would allow you to treat it that way is linearity, a property which log does not posess.

A function T is said to be linear if the following conditions hold:
i) T(0) = 0
ii) T(x+y) = T(x) + T(y)
iii) T(c*x) = c*T(x) for any constant c
For example, let T be multiplication by a constant. So, say T(x) = a*x.
Condition one holds: T(0) = a*0 = 0
Condition two holds: T(x+y) = a*(x+y) = a*x + a*y = T(x) + T(y)
Condition three holds: T(c*x) = a*(c*x) = (a*c)*x = c*(a*x) = c*T(x)

Now, log violates all of these conditions. Now, if you look at the set of positive real numbers multiplicatively (call this set R*), then a slight variation of the conditions do hold. Firstly, note that if x is in R*, then so is its inverse (multiplicatively), and 1 (the multiplicative identity) is also in R*.
i) log(1) = 0
ii) log(a*b) = log(a) + log(b)
iii) log(a^b) = b*log(a)
You can see a correlation between the multiplicative properties inside the logarithm, and the additive properties outside the logarithm. Note, however, that there are no special properties when addition takes place inside the logarithm. So, for instance, log(a+b) has no special qualities about it. For this reason, you cannot use the distributive property.

You can play around with the properties listed above, though:
log(a^c * b^c) = log(a^c) + log(b^c) = c*log(a) + c*log(b) = c*(log(a) + log(b))
And of course:
log(a) = log(1*a) = log(1) + log(a) = 0 + log(a) = log(a)

xddxogm3
11-27-2004, 05:50 PM
Zach,
thanks for the clarification.
So from what you are saying I can only factor the power after it has been logged.
i.e.
3^x = 2^x
x log 3 = x log 2
x log 3 - x log 2 = 0
x (log 3 - log 2) = 0

and would it also be correct to say you can do the following.

4^2 = 2^4
2 log 4 = 4 log 2
2 log 4 - 4 log 2 = 0
2 ( log 4 - 2 log 2) = 0

When I run these in my calculator, all forms produce 0, making me think this is valid.
Again thank you everybody for the help. My understanding of logarithms have been clarified.:)
I wish I would have had this understanding prior to my last exam. :rolleyes:

Zach L.
11-27-2004, 06:09 PM
You are correct in both cases.