Sunday, December 23, 2012

Q2/131) Find 2^(1/2) in ratio of integer form(approximate taht is p/q where p and q are integers)



Solution      
We know 2^(1/2) is irrational and let us assume2^(1/2)  = x/y

So we get x^2 = 2y^2 or x^2-2y^2 = 0

This does not have integer solution.

But if we chose x^2-2y^2= 1 then it has  integer solution x= 3 , y=2 is one of them

for each of the equations we can generate solutions with higher x and y for solution of either one of the equation and as we get x and y higher we get x/y as close to 2^(1/2)

for that we need 2 solution ( or 1 solution can be used 2 times) ( assuming x/y and a/b)
x^2-2y^2= 1 ..1 => (x+ 2^(1/2)y)(x- 2^(1/2)y) = 1  …1
a^2-2b^2= 1 ..1 => (a+ 2^(1/2)y)(x- 2^(1/2)y) = 1  …2

multiply (1) by (2) to get (x+ 2^(1/2)y)( (a+ 2^(1/2)b) (x - 2^(1/2)y)(a -2^(1/2)b) = 1
or ( ax + 2by + 2^(1/2)(bx + ay))( ax + 2by- 2^(1/2)(bx + ay)) = 1 .. 3

so if (x,y) and (a,b) are solution then (ax+2by, bx+ay) is a solution

we can chose (x,y) and(a,b) as different of (x,y) = (a,b) also giving a solution
now taking (x,y) = (a,b) = (3,2) we get
(ax+2by, bx+ay) = (17,12) is one solution : note that 17^2 – 2 * 12^2 =1 confirms the same
Taking (x,y) = (3,2) and (a,b) = (17,12) we get
(ax+2by, bx+ay) = (99, 70) is next solution : note that 99^2 – 2* 70^2 =  1 confirms the same
We can proceed to get solutions as (3,2), (17,12), (99,70) and so on and 3/2(= 1.5 ) , 17/12 ( = 1.416 ) and 99/70 (=1.414285 = correct upto 4 decimal places) are approximately 2^(1/2) closer and closer . Few more iterations shall give the values much closer.

No comments: