Didn't Muhammad write the Qur'an or borrow from the earlier scriptures( bible)?

Didn't Muhammad write the Qur'an or borrow from the earlier scriptures( bible)?

Opponents of Islam sometimes allege that Muhammad himself wrote the Qur'an or that he copied or adapted it from previous scriptures. But it is known that the Prophet's contacts with Jews and Christians was negligible before his emigration from Mecca, and after it his role was that of a teacher, openly inviting the Jews and Christians to accept Islam while pointing out how they had diverged from the true monotheism taught by their prophets. It is true that there are some similarities between the Qur'an and the Bible, but this does not indicate that later prophets plagiarized from former ones. It merely reflects the common source, which is the Creator of mankind, and the continuance of His basic message of monotheism. Moreover, there was no Arabic version of the Bible in existence at the time of Prophet Muhammad. The earliest Arabic version of the Old Testament is that of R. Saadias Gaon of 900 CE - more than 250 years after the death of Prophet Muhammad. And the oldest Arabic version of the New Testament was published by Erpenius in 1616 CE - about 1000 years after his death. Historically and logically, it cannot be established that there was any human source for the Qur'an or that the Messenger of Allah learned it from the Jews or Christians. His enemies kept a close watch on him hoping to find confirmation of their claim that he was a liar. But they could not point to a single instance when the Prophet might have had secret meetings with people of other faiths. It was a sign of Muhammad's prophethood that he was illiterate. Thus, he could not be credited with composing or editing the revelations, and suspicion that he learned what he preached from earlier scriptures is eliminated. At the time the Qur'an was revealed, his contemporaries among the Arabs, known for linguistic eloquence, acknowledged that its language was unique and distinctly different from the speech of Muhammad, a man they knew well. The Qur'an states that the Prophet was an illiterate  man, so if that had not been true, his opponents would surely have exposed him. There is, however, not a single report to this effect, and no one denied his illiteracy. At the same time, no one denied that the Qur'an was unequalled in eloquence, impact and clarity, including those who rejected its message.
It is not difficult to verify that Muhammad did not possess knowledge of many things mentioned in the Qur'an, such as historical events, natural phenomena and future occurrences. The kind of information he conveyed could not have been obtained through reading and research, so it was obviously something that could only have come directly from the Creator. The  Qur'an states in several places that Muhammad and his people did not know these facts, so had it been otherwise, his adversaries would have capitalized on that claim to discredit him. ??
I recently, within the last two centuries, have advancements in research technology which led to the discovery of facts that were mentioned in the Qur'an by the illetrate prophet over fourteen centuries ago. Here are a few examples:

 1.The creation of the universe from a single entity and of life from water:
أَوَلَمْ يَرَ الَّذِينَ كَفَرُوا أَنَّ السَّمَاوَاتِ وَالْأَرْضَ كَانَتَا رَتْقًا فَفَتَقْنَاهُمَا ? وَجَعَلْنَا مِنَ الْمَاءِ كُلَّ شَيْءٍ حَيٍّ ? أَفَلَا يُؤْمِنُونَ ?30?
(Interprtation of the meaning??)
 "Have those who disbelieved not considered that the heavens and the earth were a joined entity, and We separated them and made from water every living thing?"[Qur’an 21:30] 

 2.All creation is based on duality, made up of pairs, counterparts or opposites: 
وَمِنْ كُلِّ شَيْءٍ خَلَقْنَا زَوْجَيْنِ لَعَلَّكُمْ تَذَكَّرُونَ(49)

"And of all things We created two mates."[ Qur'an, 51:49. In contrast, God is one, with no counterpart and nothing resembling Him in any way.]

, [24.12.19 22:04]
3.The different natures of the sun and moon: 

هُوَ الَّذِي جَعَلَ الشَّمْسَ ضِيَاءً وَالْقَمَرَ نُورًا وَقَدَّرَهُ مَنَازِلَ لِتَعْلَمُوا عَدَدَ السِّنِينَ وَالْحِسَابَ مَا خَلَقَ اللَّهُ ذَلِكَ إِلَّا بِالْحَقِّ يُفَصِّلُ الْآَيَاتِ لِقَوْمٍ يَعْلَمُونَ(5)
(Interprtation of the meaning??)

"It is He [Allah] who made the sun a shining light and the moon a derived light and determined for it phases - that you may know the number of years and account [of time]."[Qur’an, 10:5. Other verses (25:61 and 71:16) refer to the sun as a burning lamp.] ..

4.The rotation of the earth: 

خَلَقَ السَّمَاوَاتِ وَالْأَرْضَ بِالْحَقِّ ? يُكَوِّرُ اللَّيْلَ عَلَى النَّهَارِ وَيُكَوِّرُ النَّهَارَ عَلَى اللَّيْلِ ? وَسَخَّرَ الشَّمْسَ وَالْقَمَرَ ? كُلٌّ يَجْرِي لِأَجَلٍ مُسَمًّى ? أَلَا هُوَ الْعَزِيزُ الْغَفَّارُ ?5?
(Interprtation of the meaning??)

"He created the heavens and earth in truth. He wraps the night over the day and wraps the day over the night.”[Qur’an, 39:5. The alternate "wrapping" of sunlight and darkness is caused by the earth's turning in one direction.]

 5.The expansion of the universe:
وَالسَّمَاءَ بَنَيْنَاهَا بِأَيْدٍ وَإِنَّا لَمُوسِعُونَ (47)
(Interprtation of the meaning??)

 "And the heaven We constructed with strength, and indeed, We are [its] expander."[Qur’an 51:47. 
 The Creator refers to Himself in the plural form which denotes power, grandeur and majesty] 
 1.The sun is not stationary but moves in a specific direction for a limited term: 
وَالشَّمْسُ تَجْرِي لِمُسْتَقَرٍّ لَهَا ذَلِكَ تَقْدِيرُ الْعَزِيزِ الْعَلِيمِ(38)
(Interprtation of the meaning??)

"And the sun runs [on course] toward its stopping point."[Qur’an, 36:38. 

The sun, as a tiny member of this vast universe, is progressing within it toward a final destination, which indicates an end to the present creation.] These are words recited by Muhammad, the illetrate prophet. The Qur'an addresses recently established scientific facts with the precision of a scientist. Could the most highly literate, well read or scholarly man of that period, or even of the centuries that followed, possibly have come up with anything similar?


 If you read the Qur’?n, you will immediately recognize that it has a very confident tone. Most books begin with an apology from the author for any shortcomings in the book. Some books even have several editions to make up for the shortcomings of the previous edition. However, the Qur’?n is the opposite. There is a famous Arabic statement “The one who does not have something cannot give it.” If one does not have certainty, they cannot give it. The Qur’?n begins with a very powerful statement: This is the Book about which there is no doubt, a guidance for those conscious of Allah (Qur’?n 2:2). Such a confident tone is not that of a liar.

 In the Qur’?n the Prophet peace be upon him is being addressed. He is being told what to say and preach. For instance, the Qur’?n says “Say: God is One”, this “say” is in the singular because it is addressed to him directly. It is difficult to accept that he composed the Qur’?n composed the Qur’?n on his own, because he would be addressing himself. One might say that he was a madman, but there is no indication of him being a madman. Rather he was intelligent, compassionate, and led an entire community. Mad men are not taken seriously and certainly cannot lead intelligent people to positively transform the entire world.

 Furthermore, the Qur’?n criticizes and corrects the Prophet Muhammad peace be upon him for certain things he did or decisions he made. Had he been a liar he would not have made such corrections of himself.