flat assembler
Message board for the users of flat assembler.

Index > Heap > A simple mathemagical trick for interested ones.

Goto page Previous  1, 2, 3, 4, 5  Next
Author
Thread Post new topic Reply to topic
MHajduk



Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
Yeah, this is the second analytic proof I have seen today (I have posted the same exercise also in other places and one person solved this by calculating the first derivative of the function f(x) = (a^x - b^x)/(a^x + b^x) and proved that f'(x) > 0 for any x, basically it's the same approach as yours). Smile

There are also proofs that don't involve differential calculus, only basic arithmetic operations.
Post 19 Nov 2015, 01:05
View user's profile Send private message Visit poster's website Reply with quote
YONG



Joined: 16 Mar 2005
Posts: 8000
Location: 22° 15' N | 114° 10' E
YONG
tthsqe wrote:
(x-1)/(x+1) is increasing for x>1
(a/b)^p > (a/b)^q > 1 by hypothesis


"(a/b)^q > 1" Is this really true?

Suppose q = 0.
(a/b)^q = 1.

Suppose q = -1.
(a/b)^q = b/a < 1.

Rolling Eyes Wink
Post 19 Nov 2015, 04:59
View user's profile Send private message Visit poster's website Reply with quote
tthsqe



Joined: 20 May 2009
Posts: 724
tthsqe
oops - please change my statement to
(x-1)/(x+1) is increasing for x>0
(a/b)^p > (a/b)^q > 0 by hypothesis

it is also obvious that (x-1)/(x+1) = 1-2/(x+1) is increasing for x>0 without doing any analysis.
Post 19 Nov 2015, 05:23
View user's profile Send private message Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
Below I present my solution of the aforementioned math problem. We prove the given inequality showing step-by-step its equivalence with the condition a > b.
The number of the condition (placed near the "if and only if" connective) used in the particular transition signalizes the importance of the condition for assuring the current step is correct.

Image
Post 19 Nov 2015, 19:40
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17247
Location: In your JS exploiting you and your system
revolution
MHajduk wrote:
Below I present my solution of the aforementioned math problem. We prove the given inequality showing step-by-step its equivalence with the condition a > b.
The number of the condition (placed near the "if and only if" connective) used in the particular transition signalizes the importance of the condition for assuring the current step is correct.

Image
Perhaps I misunderstood something but how do you prove that you can eliminate the negative roots?
Post 20 Nov 2015, 01:23
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
revolution wrote:
Perhaps I misunderstood something but how do you prove that you can eliminate the negative roots?
Very good question, you're the first person that noticed this fact. Of course, we have that from the first condition a > b > 0 and this assures as that we won't calculate roots from the negative numbers. Smile

We should all the time bear in mind that we are in the "world" of the positive numbers it's a consequence of the first condition.

Or maybe you meant something else?
Post 20 Nov 2015, 16:13
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17247
Location: In your JS exploiting you and your system
revolution
I was thinking that for example sqrt(4) = +/- 2.

You have (p-q)root(some positive value). But for integral (p-q) there can be both negative and positive solutions.
Post 20 Nov 2015, 20:43
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
Image
Post 20 Nov 2015, 21:17
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17247
Location: In your JS exploiting you and your system
revolution
Let's make a=2 and (p-q)=2.

(p-q)root(a^(p-q)) = sqrt(4) = +/- 2.

I think you can't run away from the negative result by some algebraic manipulations. Question Otherwise, from your description above, there would never be any negative roots, ever.
Post 20 Nov 2015, 21:55
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
Image
Post 20 Nov 2015, 23:54
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17247
Location: In your JS exploiting you and your system
revolution
I was taught: When taking roots we have to account for both negative and positive roots. The mathematics doesn't know that we only want positive roots, it still gives the valid result of negative roots. We can choose to ignore negative roots but then that makes any proofs based upon it invalid or incomplete.

I still claim -2 is a perfectly valid solution to the square root of 4. Razz


Last edited by revolution on 21 Nov 2015, 05:50; edited 1 time in total
Post 21 Nov 2015, 01:47
View user's profile Send private message Visit poster's website Reply with quote
TmX



Joined: 02 Mar 2006
Posts: 821
Location: Jakarta, Indonesia
TmX
I guess this is a sort of convenience/convention.

When asked what are the solutions of x^2 = 25, you will be expected to answer both 5 and -5.
But when asked what is the square root of 25, just answer 5.
Maybe most people prefer injective function

Razz
Post 21 Nov 2015, 05:47
View user's profile Send private message Reply with quote
YONG



Joined: 16 Mar 2005
Posts: 8000
Location: 22° 15' N | 114° 10' E
YONG
Let's try another route.

TRUE
<=> a > b
<=> ln a > ln b [since a & b are +ve and ln is monotonic increasing]
<=> (p-q) ln a > (p-q) ln b [since (p-q) > 0]
<=> ln [a^(p-q)] > ln [b^(p-q)] [by properties of logarithm]
<=> a^(p-q) > b^(p-q) [since ln is monotonic increasing]

Wink
Post 21 Nov 2015, 06:04
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17247
Location: In your JS exploiting you and your system
revolution
I think the trick is simply to realise that (p-q) > 0. And simplify to an equivalent a^c > b^c where c=(p-q) and a>b>0.

YONG's solution also works for me.
Post 21 Nov 2015, 07:25
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
revolution wrote:
I was taught: When taking roots we have to account for both negative and positive roots. The mathematics doesn't know that we only want positive roots, it still gives the valid result of negative roots. We can choose to ignore negative roots but then that makes any proofs based upon it invalid or incomplete.
I didn't ignore the negative roots, only have said that they have no influence on the logical value of the equivalence / biconditional

a^(p-q) > b^(p-q) <=> a > b

  1. From the assumption a^(p-q) > b^(p-q) , a > b> 0 , p > q we can prove many facts, among them is the inequality a > b.

  2. The implication a > b => a^(p-q) > b^(p-q) has been proved above by you.
The points 1 and 2 give us a proof of the mentioned biconditional.

revolution wrote:
I still claim -2 is a perfectly valid solution to the square root of 4. Razz
It depends on what you understand by the sign of the "square root". If we are talking about sqrt(x) as a function from R to R we can't accept negative values.
If we are talking about solutions of the relation y^2 = x in R^2 then we have to accept both pairs (x, -sqrt(x)) and (x, sqrt(x)).

The widely accepted practice is to treat the sign of the square root as a symbol of a function (as long as we don't move to the field of the complex numbers where we have to accept all n roots of the n-th root of the given numbers, both real and complex).
Post 21 Nov 2015, 16:55
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
A stained glass effect test. This was something truly laborious from the technical point of view (a lot of work with lighting).

Image
Post 27 Nov 2015, 00:14
View user's profile Send private message Visit poster's website Reply with quote
tthsqe



Joined: 20 May 2009
Posts: 724
tthsqe
I would say taylor's inequality for sqrt(x) about x=1. This works for both sides of the inequality if you dehomogenize it both ways.
Post 28 Nov 2015, 03:41
View user's profile Send private message Reply with quote
Xorpd!



Joined: 21 Dec 2006
Posts: 161
Xorpd!
I've never heard of Taylor's inequality, but here is an approach which seems to work:
Let f(a,b) = 4a(a+b)-8√(a³b)-(a-b)²
= 3a²+6ab-b²-8√(a³b)
Then on the left boundary of the domain, a = b, f(a,a) = 0.
∂f/∂a = 6a+6b-12√(ab) = 6(√a-√b)² > 0 for a > b, so the function increases from left to right and so is nonnegative over its domain.
It's easy to get from there to the left inequality.
Let g(a,b) = (a-b)²-4b(a+b)+8√(ab³)
= a²-6ab-3b²+8√(ab³)
On the upper boundary of the domain, a = b, g(b,b) = 0.
∂g/∂b = -6a-6b+12√(ab) = -6(√a-√b)² < 0 for a > b, so the function increases from top to bottom and so is nonnegative over its domain.
This yields the right inequality.

Edit: corrected 2 typos.
Post 28 Nov 2015, 05:15
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
tthsqe wrote:
I would say taylor's inequality for sqrt(x) about x=1. This works for both sides of the inequality if you dehomogenize it both ways.
That's interesting. Could you explain it in details?
Post 29 Nov 2015, 17:49
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
The approach presented by Xorpd! gives me a new perspective of solving inequalities. I dared to formulate his solution in a more descriptive manner (as I understood it):

Image

Image
Post 29 Nov 2015, 17:52
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3, 4, 5  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.