Al-Farisi was a pupil of the astronomer and mathematician Qutb al-Din al-Shirazi (1236 - 1311), who in turn was a pupil of Nasir al-Din al-Tusi. His work on light was prompted by a question put to him concerning the refraction of light. Al-Shirazi advised him to consult the Optics of ibn al-Haytham and al-Farisi made such a deep study of this treatise that al-Shirazi suggested that he write what is essentially a revision of that major work. Al-Shirazi himself was writing a commentary on works of Avicenna at the time.
Then al-Farisi went much further, for he undertook a project to study all the optical work of ibn al-Haytham. His major work the Tanqih (which means revision) was far more than a commentary on ibn ibn al-Haytham's optical writings. Al-Farisi does not seek merely to explain the works of a master in a more elementary form, rather he is quite prepared to suggest that some of ibn al-Haytham's theories are incorrect and to propose alternative theories himself.
The most important part of this work by al-Farisi is his theory of the rainbow. Ibn al-Haytham had indeed proposed a theory, but al-Farisi considered both this theory and another proposed by Avicenna before giving his own. The theory proposed by al-Farisi was the first mathematically satisfactory explanation of the rainbow.
Ibn al-Haytham had proposed that light from the sun is reflected by a cloud before reaching the eye. It was a theory which did not allow for a possible experimental verification. Al-Farisi, on the other hand, proposed a model where the ray of light from the sun was refracted twice by a water droplet, one or more reflections occurring between the two refractions. This model did allow an experiment to be conducted with a transparent sphere filled with water. Of course this introduced two additional sources for refraction, namely at the surface between the glass container and the water. Al-Farisi was able to show that the approximation obtained by his model was good enough to allow him to ignore the effects of the glass container.
In order to explain the colours in the rainbow, however, al-Farisi had to produce some new ideas about how colours were formed. The view before al-Farisi was that colours were produced a mixing darkness with light. This could not explain the rainbow so, based on the experimental evidence of the colours that he had observed with his transparent sphere experiment, al-Farisi proposed that the colours occurred because of the superimposition of different forms of the image on a dark background. He wrote (see for example ):-
... If the images then interpenetrate, the light is again intensified and produces a bright yellow. Next, the blended image diminishes and becomes a darker and darker red until it disappears when the sun is outside the cone of rays refracted after one reflection.There have been arguments between modern scholars as to whether al-Farisi's theory of the rainbow was due to him or whether it was a theory proposed by his teacher al-Shirazi. Boyer writes in :-
... the discovery of the theory should presumably be ascribed to [al-Shirazi], its elaboration to [al-Farisi].Rashed discusses the claims of Boyer and others that the innovation in the theory of the rainbow was from al-Shirazi, but gives sound arguments for his claim that ascribing the theory to al-Shirazi is unconvincing.
Al-Farisi made a number of important contributions to number theory. He noted the impossibility of giving an integer solution to the equation
In Tadhkira al-ahbab fi bayan al-tahabb (Memorandum for friends on the proof of amicability) al-Farisi gave a new proof of the following theorem by Thabit ibn Qurra on amicable numbers:
At the end of his treatise al-Farisi gives the pairs of amicable numbers 220, 284 and 17296, 18416, obtained from using Thabit's rule with n = 2 and n = 4 respectively. To check that Thabit's theorem gives amicable numbers with n = 4, al-Farisi has to show that p3, p4, and q4 are prime numbers. Now p3 = 23, p4 = 47 and q4 =1151 and, to show that 1151 is prime al-Farisi uses a number of lemmas including an application of the sieve of Eratosthenes.
The pair of amicable number 17296, 18416 are known as Euler's amicable pair. There is no doubt that al-Farisi proved these to be amicable numbers long before Euler. However, al-Farisi was probably not the first to discover these amicable numbers. In  Hogendijk argues that they were known to Thabit ibn Qurra himself.
Al-Farisi saw the relation between polygonal numbers and the binomial coefficients and he presented arguments, using an early type of mathematical induction, which showed a relation between triangular numbers, the sums of triangular numbers, the sums of the sums of triangular number, etc., and the combinations of n objects taken k at a time.
Article by: J J O'Connor and E F Robertson