Re: Struggling to prove simple triangle inequality
- To: mathgroup at smc.vnet.net
- Subject: [mg126335] Re: Struggling to prove simple triangle inequality
- From: danl at wolfram.com
- Date: Tue, 1 May 2012 14:58:55 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <jnljcu$n5b$1@smc.vnet.net>
On Monday, April 30, 2012 3:44:14 AM UTC-5, Vladimir M wrote: > Greetings! > > Given two 3D vectors A and B, I want to prove that length of their sum > is less or equal than the sum of their lengths: > > length[v_] := Sqrt[v.v]; > a = {ax, ay, az}; > b = {bx, by, bz}; > inequality = length[a + b] <= length[a] + length[b]; > > This is famous, well-known and quite obvious: triangle side is shorter > than the sum of other sides, straight line is shorter than non- > straight, etc. However, proving it formally is hard. > > This fails: > > assum = Element[ax | ay | az | bx | by | bz, Reals]; > FullSimplify[inequality, assum] > > > This takes ages on a high-end PC with unknown result: > > vars = {ax, ay, az, bx, by, bz}; > Reduce[inequality, vars, Reals] > > Anyone can help? I think Reduce should somehow make it because it > actually succeeds at least with 2D vectors. > > > -- > All the best, > Vladimir You can make it easier by squaring to remove many of the radicals. In[305]:= length[v_] := Sqrt[v.v]; a = {ax, ay, az}; b = {bx, by, bz}; inequalityb = Expand[length[a + b]^2 - (length[a] + length[b])^2] <= 0; vars = Variables[{a, b}]; Timing[Reduce[inequalityb, vars, Reals]] Out[310]= {2.98, True} Daniel Lichtblau Wolfram Research
- Follow-Ups:
- Re: Struggling to prove simple triangle inequality
- From: Murray Eisenberg <murray@math.umass.edu>
- Re: Struggling to prove simple triangle inequality
- From: Murray Eisenberg <murray@math.umass.edu>
- Re: Struggling to prove simple triangle inequality