• Support PF! Buy your school textbooks, materials and every day products Here!

Mathematical Analysis Proof: |x-y|<= |x|+|y|

  • #1
18
1

Homework Statement


1. Show that for all real numbers x and y:
a) |x-y| ≤ |x| + |y|

Homework Equations


Possibly -|x| ≤ x ≤ |x|,
and -|y| ≤ y ≤ |y|?

The Attempt at a Solution


I tried using a direct proof here, but I keep getting stuck, especially since this is my first time ever coming across mathematical analysis, so I don't have much intuition for it. What I did think was possibly trying to use the triangle inequality somehow?
So far I have added the two above equations together to get
-|x| - |y| ≤ x + y ≤ |x| + |y|
But If that is right then I have no idea how to manipulate it to get the original statement to be proven. Any help would be much appreciated as I seem to keep going in circles.

Thanks :)
 

Answers and Replies

  • #2
12,667
9,196
Since ##|x-y|=|y-x|## you may assume that ##x\geq y## which reduces the cases you have to consider. And this is the triangle inequality, because ##|x-y|=|x+(-y)|\leq |x|+|-y|=|x|+|y|## so you cannot use what you want to prove.
 
  • #3
Ray Vickson
Science Advisor
Homework Helper
Dearly Missed
10,706
1,728

Homework Statement


1. Show that for all real numbers x and y:
a) |x-y| ≤ |x| + |y|

Homework Equations


Possibly -|x| ≤ x ≤ |x|,
and -|y| ≤ y ≤ |y|?

The Attempt at a Solution


I tried using a direct proof here, but I keep getting stuck, especially since this is my first time ever coming across mathematical analysis, so I don't have much intuition for it. What I did think was possibly trying to use the triangle inequality somehow?
So far I have added the two above equations together to get
-|x| - |y| ≤ x + y ≤ |x| + |y|


Thanks :)
As fresh_42 points out, you may as well assume that ##x < y##; the case ##x = y## is trivial. Furthermore, the cases ##x=0## or ##y = 0## are trivial as well. Given all that, one way to go is by a (tedious?) consideration of cases:
(a) ##0 < x < y##; (b) ##x < 0 < y##; and (c) ##x < y < 0##.
 
  • #4
StoneTemplePython
Science Advisor
Gold Member
2019 Award
1,145
546
I think the 'right' way to do this is proving Cauchy Schwarz first, then proving triangle inequality.
- - - -
A less often used approach that I happen to like is quasi-linearisation. (Note, change of variables ##z:= -y##)

you want to prove

##f \big( x + z \big) = \big \vert x + z \big \vert \leq \big \vert x \big \vert + \big \vert z \big \vert = f \big( x \big) + f \big( z \big)##

now here I've defined ##f## as the absolute value function -- in common shorthand, I've said ##f(u) := \big \vert u\big \vert##

But suppose I instead define

##\begin{equation*}
\begin{aligned}
& f\big(u\big) := {\text{maximize }}\lambda \cdot u\\
& \text{subject to: }\lambda \in \{-1,+1\}\\
\end{aligned}
\end{equation*}##

From here, you'd need to confirm that the two definitions are equivalent, and the obvious fact that 2 choices are better than 1 (at least in 'single player' optimization problems).
 
  • #5
MathematicalPhysicist
Gold Member
4,220
172
The same old question year after year.
:-)
 
  • #6
18
1
Thank you all for your replies :)
 
  • #7
Ray Vickson
Science Advisor
Homework Helper
Dearly Missed
10,706
1,728
I think the 'right' way to do this is proving Cauchy Schwarz first, then proving triangle inequality.
- - - -
A less often used approach that I happen to like is quasi-linearisation. (Note, change of variables ##z:= -y##)

you want to prove

##f \big( x + z \big) = \big \vert x + z \big \vert \leq \big \vert x \big \vert + \big \vert z \big \vert = f \big( x \big) + f \big( z \big)##

now here I've defined ##f## as the absolute value function -- in common shorthand, I've said ##f(u) := \big \vert u\big \vert##

But suppose I instead define

##\begin{equation*}
\begin{aligned}
& f\big(u\big) := {\text{maximize }}\lambda \cdot u\\
& \text{subject to: }\lambda \in \{-1,+1\}\\
\end{aligned}
\end{equation*}##

From here, you'd need to confirm that the two definitions are equivalent, and the obvious fact that 2 choices are better than 1 (at least in 'single player' optimization problems).
You could even say
$$f(u) = \max_{-1 \leq \lambda \leq 1} \lambda \cdot u$$
to make it "less combinatorical".
 
  • #8
StoneTemplePython
Science Advisor
Gold Member
2019 Award
1,145
546
You could even say
$$f(u) = \max_{-1 \leq \lambda \leq 1} \lambda \cdot u$$
to make it "less combinatorical".
It definitely could be done as ##\lambda \in [-1,1]##.

- - - -
When using quasi-linearisation, it's common to have the 'norm' associated with the constraint fixed to 1 (e.g. when using the technique to pass from Hoelder ##\to## Minkowski).

I originally wrote the constraint as ##\big \vert \lambda \big \vert = 1##, but that struck me as perverse given that I was redefining the absolute value function here!
 

Related Threads on Mathematical Analysis Proof: |x-y|<= |x|+|y|

Replies
3
Views
8K
  • Last Post
Replies
10
Views
11K
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
2
Views
7K
  • Last Post
Replies
1
Views
3K
  • Last Post
Replies
5
Views
4K
  • Last Post
Replies
1
Views
3K
Replies
5
Views
4K
Replies
1
Views
2K
Replies
9
Views
2K
Top