An Interesting Relation يك رابطه جالب

Please note that since the value of x is positive and smaller than 1, its powers of x1, x2, x3, ... become smaller and smaller. We  recommend that don't try to learn the formula "by heart", rather, use paper and pencil to divide 1 by (1+x).  

This formula is noteworthy because
Firstly, it defines an operation of division by a series of additions , subtractions and multiplications;
Secondly, the formula tells us that the inverse of (1+x) equals the sum of even powers of x minus the sum of odd powers of x  ( note that x0=1, i.e. 0 is considered positive).
Thirdly, for calculation of the value of 1/ (1+x), the right hand side of the formula instructs us to begin with the initial value of 1, but then, subtract x1, add x2 , subtract x3, add x4, ... until  xn becomes insignificantly small.
This formula provides the algorithm for calculation of 1/(1+x). Many mathematical formulas are, in fact, algorithms and should be read as a series of simple operations as it helps comprehension and appreciation of the formulas.


Following is a Visual Basic program for this algorithm
. This algorithm converges quickly when x is near zero but converges very slowly if x is near to 1.

دقت كنيد كه چون مقدار مثبت و كمتر از 1 است، وقتي به توان 2 , 3 , 4 ,...  برسد كوچكتر مي شود. سفارش مي كنيم كه رابطه را از بر نكنيد بلكه  با كاغذ و مداد و تقسيم  كردن دستي عدد 1 بر عبارت   خودتان رابطه را بدست آوريد. 

اين فرمول جالبي است زيرا
اولا عمل تقسيم را با  يك سري عمليات جمع، تفريق، و ضرب  بيان مي كند

ثانيا بما مي گويد كه وارونه يِ عبارت برابر است با  مجموع توانهاي زوج x  منهاي مجموع توانهاي فرد و(  x0=1 ).    

ثالثا  سمت راست معادله بيانگر آلگوريتم محاسبه ي عبارت سمت چپ است. اين فرمول يا آلگوريتم دستور مي دهد كه  براي محاسبه مقدار سمت چپ، در آغاز آنرا برابر عدد 1 بگير و آنگاه توان اول ايكس را از آن بكاه و توان دوم ايكس به آن بيفزا و  توان سوم ايكس را از آن بكاه و  توان چهارم ايكس را به آن بيفزا  ...  و بدينسان ادامه بده تا مقدار كاهش يا افزايش ناچيز گردد. در واقع هر فرمول رياضي يك  دستور كار ( ياآلگوريتم كار) را بيان مي كند كه اگر بدينگونه خوانده شود بآساني درك مي گردد. 

 

 برنامه زير به زبان ويژوآل بيسيك  مقدار ايكس و ميزان دقت جواب را دريافت مي كند و محاسبه را طي چند دور بانجام مي رساند. وقتي مقدار ايكس به صفر نزديك باشد اين آلگوريتم بزودي بنتيجه مي رسد ولي هرچه به 1 نزديكتر باشد ديرتر به جواب مي رسد

Private Sub Command1_Click()
Dim x, Answer, d, epsilon As Double
Dim n As Integer
epsilon = 10 ^ -6
Answer = 1
n = 0
epsilon = 10 ^ (-InputBox("Enter
the number of digits after decimal point"))
x          = InputBox("Input the value of x, {0<x<1 }")
Print "x="; x; " precision="; epsilon
Print "n"; Tab(7); "d"; Tab(26); "Answer"

Do
        n = n + 1
        d = (-1) ^ n * x ^ n
        Answer = Answer + d
        Print Tab(1); n; Tab(7); d; Tab(26); Answer
Loop While Abs(d) > epsilon

Print "Correct Answer:1 /(1+"; Str(x); ") ="; 1 / (1 + x)
End Sub