Newton's greatest contribution to maths was the discovery of calculus. His book Principia Mathematics, containing this work was published in 1704, many years after his discovery. A German mathematician, Leibniz, announced his own version of the calculus before Newton's book, which led to a dispute over who had discovered it. Newton was a vain and vicious man, labelling Leibniz a plagiarist. The Royal Society held an inquiry to decide on this. The inquiry was chaired by friends of Newton, and the report written by Newton himself.
His greatest contribution to physics was his explanation of gravity, somewhere between 1165 and 1667. All the heavenly bodies were supposed to be subject to the same force as any falling apple on Earth. This theory explained the Copernian system and led to a scientific model of the Universe as subject to forces, not any religious Law. He also put forward three Laws of motion, explaining movement and acceleration in terms of forces, giving rise to a whole system of mechanics, called 'Newtonian Mechanics'.
Newton made major contributions to Optics, publishing his book Oticks in 1705. He showed that white light was made up of many colours by refracting light through a glass prism, and proposed the theory that light was made up of tiny particles, as opposed to waves, as other scientists thought.