It has been a while since I last read something related to chaos, but for a while now, I’ve been doing some stuff related to non-linearity. Recently I remembered this book(Portuguese edition), brought it to Lisbon, and was glancing my eyes by it when I came across the (almost) pseudo code for a program that iterated a quadratic function over an initial value, showed how chaos emerged. Well, I decided to give it a try: I coded a similar program in C++ that starts with two almost identical values, viz. 0.54321 and 0.54322, and through 50 iterations applies the following transformation to both of them: x = 2*x*x-1; the last 100 iterations are then plotted. Here’s the result (red: 0.54321; green: 0.54322)


Now pretend for a moment that that initial value was say, temperature. So long for any hope of accurately predicting weather…

I think it was Richard Feynman that always insisted in seeing the plot of an equation before looking at any formula; presumably because the former helped him understand the latter. Guess this example kinda turns the table around, doesn’t it? Or maybe this is a case where the formulas induce a false sense of simplicity…

I coded the program in C++, that programs dumps the values to two files, which then are plotted against each other in gnuplot; if you’re interested in the code drop a comment 😉


Os comentários estão fechados.