Punto fisso

Un punto fisso per una funzione definita da un insieme in sé è un elemento coincidente con la sua immagine. Siano f:A \to A e x \in A. x è un punto fisso per f se $$x=f(x)$$ Si tratta di un punto che la funzione mappa in sé stesso.

Con l’ausilio di Python, valutiamo il punto fisso della funzione y=\sqrt{x}.

import matplotlib.pyplot as plt
from numpy import array,linspace,sqrt,sin
from numpy.linalg import norm

def fixedp(f,x0,tol=10e-5,maxiter=100):
 """ Fixed point algorithm """
 e = 1
 itr = 0
 xp = []
 while(e > tol and itr < maxiter):
    x = f(x0)      # fixed point equation
    e = norm(x0-x) # error at the current step
    x0 = x
    xp.append(x0)  # save the solution of the current step
    itr = itr + 1
 return x,xp

f = lambda x : sqrt(x)
x_start = .5
xf,xp = fixedp(f,x_start)
x = linspace(0,2,1000)
y = f(x)
plt.plot(x,y,xp,f(xp),'bo',
     x_start,f(x_start),'ro',xf,f(xf),'go',x,x,'k')
stringa = "Fixed Point: " + str(round(xf, 4))

Figure 1

Grazie Diego

La terra non si è spaccata in due e il cielo non è diventato nero e il mare non si è aperto e noi tutti siamo sopravvissuti, inutilmente. Eppure Diego Armando Maradona è morto, ma forse, penso, è morto solo l’uomo e le sue spoglie terrene. Quindi, farò quello che faranno tutte le persone come me e tutti i napoletani di questo mondo. Aspetteremo tre giorni, nel caso Diego Armando Maradona decida di risorgere. Se così non fosse, se dovesse continuare a essere morto, allora non sarà morto: avrà semplicemente deciso che era arrivato il momento di pronunciare il suo «arrivederci», la parola più bella di tutte, quella che serve dirsi per pensarci reciprocamente mentre siamo lontani, e per volerci ancora più bene quando ci rincontreremo. E perché l’unica certezza che ho sempre avuto e che sempre mi rimarrà è che Diego Armano Maradona non può morire. Per qualsiasi evenienza: grazie Diego, con tutto il cuore, per sempre.
  • Alessio Forgione, da Soltanto lui ci ha resi felici

Exponential sums make interesting pictures

Exponential sums are a specialized area of math that studies series with terms that are complex exponentials.

\sum\limits_{n=1}^{N}{e{}^{2\pi if(n)}}

Exponential sums also make pretty pictures. If you make a scatter plot of the sequence of partial sums you can get surprising shapes. This is related to the trickiness of estimating such sums: the partial sums don’t simply monotonically converge to a limit. By the plot of an exponential sum we mean the sequence of partial sums, plotted in the complex plane, with successive points joined by straight line segments. That is, we start at the origin; draw a line interval corresponding to the first term of the sum; from the end of this interval draw another, corresponding to the second term of the sum; and so on.

Following this article, we playing around with polynomials with dates in the denominator. If we take that suggestion, with

f(n)=\frac{n}{dd}+\frac{{n}^{2}}{mm}+\frac{{n}^{3}}{yy}

and with today’s date, we get the curve below:

Today
Here’s the python code that produced the image.
import matplotlib.pyplot as plt 
from numpy import array, pi, exp, log 
N = 20000 
def f(n): 
    return n/25 + n**2/11+ n**3/20 
z = array( [exp( 2*pi*1j*f(n) ) for n in range(0, N)] ) 
z = z.cumsum() 

plt.plot(z.real, z.imag, color='#333399') 
plt.axes().set_aspect(1) 
plt.show()

An interesting picture is the exponential sum with f(n)=(log n)4 and N=5000. The graph was dubbed “the Loch Ness monster” by John Loxton in a 1981 article.

Lockness