In the beginning of the part four of Descartes Discourse on the Method, the philosopher is in conflict with his being and is trying to establish he rationale of his existence in this earth. To address this quagmire, the proponent establishes that his ability to think and doubt of his existence is in itself a confirmation that he exists. He also confirms that he is able to think about other things such as heaven, heat, light, and the earth which back his initial conclusion.
The philosopher goes on to decipher how he came into being and it does not make sense that he came from nothing hence establishes the only reasonable conclusion that another higher being must have architecture this occurrence, hence God. Humans have varying intelligence and different bodies which are made up of simpler elements dependent on a higher power. This means that they are not perfect and only the perfect authority can regulates them. God is portrayed to have this power to control intelligence and the existence of physical bodies, hence His existence. Also, using the geometrical proofs, he establishes that geometry is perfect and so is God.
The surprise ending in the text is that he doubts his initial conclusions by holding other views on the metaphysical certainty. He contradicts what he had already established by questioning the existence of our physical bodies, the sun, stars, and other obvious realities that we see and feel. He says that we may have dreams which are not necessarily true and they make him doubt the real things that are in the earth. He says that this can only be proven with the knowledge of God’s existence hence truth and perfection.
 
 
 
References
http://www.earlymoderntexts.com/assets/pdfs/descartes1637.pdf