Applying a function to both sides of equation

  • Thread starter Thread starter mr0no
  • Start date Start date
  • Tags Tags
    Function
AI Thread Summary
Applying a function to both sides of an equation preserves equality if the function is injective, meaning it has a unique inverse. For equalities, if x = y, then applying a function f gives f(x) = f(y). However, for inequalities, the function must be monotonically increasing to maintain the direction of the inequality; otherwise, it may reverse. The square root function is a specific case where applying it to both sides of an equation is valid, but transitioning from x² to x is not a defined operation without considering the domain. Misunderstandings often arise regarding the implications of applying functions, particularly with square roots and their principal values.
mr0no
Messages
4
Reaction score
0
How can I be sure if I can apply a function to both sides of an equation and preserve equality?
for example:
x = y ⇔ x2 = y2
or
x = y ⇔ \sqrt{}x = \sqrt{}y
or
x < y ⇔ log(x) < log(y)

What's up with that?
 
Mathematics news on Phys.org
You can alays apply the same operation to both sides of an equation (in the modern sense of indicating equality). If they're equal to start with and you do the same to both sides then they must still be equal.
But that does not work for inequalities. If you apply a monotonically decreasing function to each side (negation, inversion of items having the same sign) you must reverse the inequality. If the function is not even monotone then all bets are off.
 
Not always: Example: (-1)2 = 12, but -1 ≠ 1.
 
mathman said:
Not always: Example: (-1)2 = 12, but -1 ≠ 1.

Exactly
 
Mathematically speaking, the function must be injective, in case of equalities.
 
Last edited:
mr0no said:
How can I be sure if I can apply a function to both sides of an equation and preserve equality?
for example:
x = y ⇔ x2 = y2
or
x = y ⇔ \sqrt{}x = \sqrt{}y

The implication is only guaranteed to be one way. If x = y, then you can safely "apply a function to both sides" because you know x = y. That is, let z = f(x). But, since we know x = y, we can replace x with y in this equation, so z = f(y). The result z is the same in both cases, so we know f(x) = f(y).

However, given f(x) = f(y), you cannot necessarily conclude x = y, because the function f may not have a unique inverse. For examples, x2 = y2 does not imply x = y, because it is possible that x = -y. However, this doesn't contradict what I said about because taking the square root function of both sides does not give you "x = y". If you apply the square root function to both sides, what you actually get is |x| = |y|, which is true, because ##\sqrt{a^2} = |a|## for any real number a.

or
x < y ⇔ log(x) < log(y)

What's up with that?

The case is of inequalities is trickier and a different situation. If x < y, then you can only conclude f(x) < f(y) if f is a monotonically increasing function only the region that contains x and y. That is, if f'(x) > 0 on the entire region containing x and y.

For example, consider 0<x<y and f(t) = exp(t). Since exp(t) is always increasing, we can conclude exp(x) < exp(y). However, consider a function g(t) = exp(-t). This function is always decreasing, so x < y actually implies g(x) > g(y).

For a trickier example, let h(t) = sin(t), and let ##0 < x < y < \pi/2##. The sine function is monotonically increasing on this interval, so we can conclude that sin(x) < sin(y). However, if it were the case that 0 < x < y, but ##y > \pi/2##, then we cannot conclude that sin(x) < sin(y) because it may not be true, as sin(t) is decreasing on ##\pi/2<t<3\pi/2##.
 
mathman said:
Not always: Example: (-1)2 = 12, but -1 ≠ 1.
What operation are you applying to both sides of what initial equation?
If you're starting with (-1)2 = 12 and square-rooting you get √((-1)2) = √(12). It is not valid to reduce that to -1 = 1. You can make it 1 = 1, or ±1 = ±1.
 
haruspex said:
What operation are you applying to both sides of what initial equation?
If you're starting with (-1)2 = 12 and square-rooting you get √((-1)2) = √(12). It is not valid to reduce that to -1 = 1. You can make it 1 = 1, or ±1 = ±1.

The first item on the list is x = y is equivalent to x2 = y2. This not necessarily true.
 
mathman said:
The first item on the list is x = y is equivalent to x2 = y2. This not necessarily true.
Allow me to rephrase my original post without changing its burden:
Square rooting is a defined function. It can be applied to both sides of an equation with confidence. Going from x2 to x is not a defined function. The square root of x2 is ±x, and √(x2) is defined to be |x|.
 
  • #10
haruspex said:
Allow me to rephrase my original post without changing its burden:
Square rooting is a defined function. It can be applied to both sides of an equation with confidence. Going from x2 to x is not a defined function. The square root of x2 is ±x, and √(x2) is defined to be |x|.

It's a bit more subtle than that. The square root function has domain ##[0,\infty)## and range ##[0,\infty)##. Going from x2 to x is always fine provided you stay with this domain. If x is outside of this, you now have problems, and it is no longer a function.

The phrase "the square root" is reserved for the principle branch, which in the case of reals is always positive. The radical symbol, √, is also reserved for this. This is why the quadratic formula has a ±.

Lastly, and this is a minor technicality, √(x2) is not "defined" as |x|. The former is defined by the composition of two functions. The latter has it's own (piecewise) definition. These two function just happen to be equal to each other pointwise. But you shouldn't say one is "defined" in terms of the other.

I know what you are trying to say, you just need to be a bit more precise in your vocab choice.
 
  • #11
pwsnafu said:
The square root function has domain [0,∞) and range [0,∞). Going from x2 to x is always fine provided you stay with this domain.
The problem is not that x2 was outside that domain, but that x was outside that range.
√(x2) is not "defined" as |x|.
OK, but it is defined in such a way that the two are equivalent, and this is pretty much what you are saying wrt range.
Everyone else responding on this thread appears to think that "going from x2 to x" is a legitimate algebraic manoeuvre, but which is an exception to the rule that you can freely apply the same function to both sides of an equation. My point is that it is not an algebraic operation at all, it is a lexical one, and there cannot be exceptions to the rule.
 
  • #12
haruspex said:
The problem is not that x2 was outside that domain, but that x was outside that range.

Correct.

OK, but it is defined in such a way that the two are equivalent, and this is pretty much what you are saying wrt range.

Again correct.

Everyone else responding on this thread appears to think that "going from x2 to x" is a legitimate algebraic manoeuvre, but which is an exception to the rule that you can freely apply the same function to both sides of an equation. My point is that it is not an algebraic operation at all, it is a lexical one, and there cannot be exceptions to the rule.

What do you mean by "lexical" operation?
 
  • #13
haruspex said:
Allow me to rephrase my original post without changing its burden:
Square rooting is a defined function. It can be applied to both sides of an equation with confidence. Going from x2 to x is not a defined function. The square root of x2 is ±x, and √(x2) is defined to be |x|.
The fact remains that mathman was correct. He was objecting to the statement that x2=y2 implies that x=y.
 
  • #14
oay said:
The fact remains that mathman was correct. He was objecting to the statement that x2=y2 implies that x=y.
I never said it did.
 
  • #15
pwsnafu said:
What do you mean by "lexical" operation?
A manipulation of the symbols; in this case, removing the exponent.
 
  • #16
haruspex said:
I never said it did.

No, the OP said it did [saying x2 = y2 and x=y are equivalent]. mathman's post that you responded to was merely give a concrete example to demonstrate a case for which x2 = y2 but x = y, demonstrating that the equivalence the OP posited was false. mathman did not claim he was applying any functional (or even lexical) operation to both sides of the equation, it was just an example to demonstrate the falsity of the OP's claim.
 
  • #17
haruspex said:
Allow me to rephrase my original post without changing its burden:
Square rooting is a defined function. It can be applied to both sides of an equation with confidence. Going from x2 to x is not a defined function.

The square root of x2 is ±x,
No.
This is an extremely common misconception that comes up here way too often. Would you say that ##\sqrt{2^2} = \pm 2##? Although it is true that 4 has two square roots, the expression ##\sqrt{4}## denotes the principal square root, or 2.
haruspex said:
and √(x2) is defined to be |x|.
Right, and this too has a single value.
 
  • #18
Mute said:
No, the OP said it did [saying x2 = y2 and x=y are equivalent]. mathman's post that you responded to was merely give a concrete example to demonstrate a case for which x2 = y2 but x = y, demonstrating that the equivalence the OP posited was false. mathman did not claim he was applying any functional (or even lexical) operation to both sides of the equation, it was just an example to demonstrate the falsity of the OP's claim.
x ≠ y
 
  • #19
oay said:
x ≠ y

Whoops! Thanks for catching that typo! Too bad I can't go back and edit it now.
 
  • #20
Mute said:
Whoops! Thanks for catching that typo! Too bad I can't go back and edit it now.
Thanks! Not sure what haruspex (no offence, mate!) was trying to bring into the discussion really. The root function being positive wasn't really what mathman was talking about.

But where's mr0no now?
 
Last edited:
Back
Top