Self similar solutions of the evolution equation of a scalar field in an expanding geometry