About an iteration technique

  • #1
snoopies622
791
22
Recently my dad wrote a computer program that finds an approximate solution to the "crossed-ladders problem"

http://en.wikipedia.org/wiki/Crossed_ladders_problem

for inputed ladder lengths and height of ladder intersection. It uses what I just learned is called "fixed point iteration" to find the square of the width (approximately) and then after about ten cycles returns the square root of the result.

We are both impressed with how efficiently it finds so precise an answer, but neither of us completely understands why it works, especially when if one takes a random polynomial function and attempts to find a solution to it by isolating the exponent=1 term, making an initial guess, plugging it into the other side and iterating, the result almost always diverges.

So my question is: under what circumstances will fixed point iteration converge? I've played around with a few sample functions and right now I have the impression that it always works if the absolute value of the slope of the function (with the exponent=1 term removed and its coeffecient made into unity by diving both sides as necessary) never gets bigger than one. But I don't know if that's in fact true.
 

Answers and Replies

  • #2
Borek
Mentor
29,101
3,716
Square root? I guess you are using

[tex]x_{n+1} = \frac 1 2 (x_n + \frac a {x_n})[/tex]

and xn is approximation of square root of a?

As far as I remember this is variant of the Newton method, and Newton method works only if derivative of the function between starting point and solution is larger than 1. Or something close to that, could be it depends on the side from which you approach the solution, my imagination went on strike.
 
  • #3
snoopies622
791
22
Unfortunately, LaTeX is no longer displaying correctly on this old computer of mine so I'll have to just type the characters and hope they appear correctly.

The program starts with the relationship

[tex]


\frac {1}{h} = \frac {1}{\sqrt{l^2 - w^2}} + \frac {1}{\sqrt{s^2 - w^2}}


[/tex]

where h is the intersection height, l and s and the lengths of the long and short ladders respectively, and w is the width between the buildings.

It rearranges this to

[tex]

w^2 = s^2 - ( \frac {1}{h} - \frac {1}{\sqrt{l^2 - w^2}} ) ^ {-2}

[/tex]

Then it starts with a guess value for [itex] w^2 [/itex], puts that into the right side of the equation to produce a new [itex] w^2 [/itex], plugs that back into the [itex] w^2 [/itex] on the right, and so on. After about ten cycles it takes the square root of the last value [itex] w^2 [/itex] it found, and that's the approximate value of [itex] w [/itex].

Since this is of the form [itex] a_{n+1} = f (a_n) [/itex] (where [itex] w^2 [/itex] is the [itex] a [/itex]), it's an example of fixed point iteration as I understand it.
 
Last edited:
  • #4
awkward
365
0
Recently my dad wrote a computer program that finds an approximate solution to the "crossed-ladders problem"

http://en.wikipedia.org/wiki/Crossed_ladders_problem

for inputed ladder lengths and height of ladder intersection. It uses what I just learned is called "fixed point iteration" to find the square of the width (approximately) and then after about ten cycles returns the square root of the result.

We are both impressed with how efficiently it finds so precise an answer, but neither of us completely understands why it works, especially when if one takes a random polynomial function and attempts to find a solution to it by isolating the exponent=1 term, making an initial guess, plugging it into the other side and iterating, the result almost always diverges.

So my question is: under what circumstances will fixed point iteration converge? I've played around with a few sample functions and right now I have the impression that it always works if the absolute value of the slope of the function (with the exponent=1 term removed and its coeffecient made into unity by diving both sides as necessary) never gets bigger than one. But I don't know if that's in fact true.

Fixed point iteration will converge provided the function involved decreases distances. More precisely, the condition is that

[tex]|f(x) - f(y)| < k \; |x - y|[/tex] for all x, y
for some [tex]k < 1[/tex].

Another test that guarantees convergence is that [tex]|f'(x)| < k[/tex] for some [tex]k < 1[/tex].
 
  • #5
snoopies622
791
22
Thanks awkward; that's about what I suspected.
 

Suggested for: About an iteration technique

  • Last Post
Replies
0
Views
362
Replies
2
Views
495
Replies
4
Views
706
  • Last Post
Replies
2
Views
268
  • Last Post
Replies
3
Views
155
  • Last Post
Replies
2
Views
359
Replies
11
Views
928
  • Last Post
Replies
22
Views
822
Replies
7
Views
275
Replies
4
Views
423
Top