An insane person should not fast and should not be asked or forced to fast because he does not know or understand what he is doing. Furthermore the Prophet (S) told us that he is not responsible for anything until he comes back to sanity.
Those permitted to break the fast, but who must pay a "fidyah" (ransom) for not fasting.
The frail elderly men and women are permitted to break their fasts, as are the chronically ill, and those who have to perform difficult jobs under harsh circumstances and who could not find any other way to support themselves. All of these people are allowed to break their fast, because such a practice would place too much hardship on them during any part of the year. Instead of fasting they are obliged to feed one poor person [miskin] a day (for every day of fasting that they do not perform).
Ibn 'Abbas said: "An elderly man is permitted to break his fast, but he must feed a poor person daily. If he does this, he does not have to make up the days that he did not fast.[ad-Daraqutni and al-Hakim].
Ibn 'Abbas recited the ayah: "And for those who can fast [but do not], there is a ransom": the feeding of a person in need" [al-Baqarah: 2:185], and said "It is the old man who is unable to fast so he refrains from fasting and instead feeds a poor person with a saa` (*) of wheat. [Daraqutni; Sahih]
Abu Huraira said: "Whoever reaches old age and is unable to fast the month of Ramadan, he should give a Mudd (**) of wheat for each day". [Daraqutni]
One year Anas Ibn Malik became too weak to fast so he prepared a large dish of Thareed (***) and invited thirty poor people who came and ate their fill. [Daraqutni, Sahih]
(*)The Saa` is a measure equal to four times the quantity held by the two outstretched hands. (**)The Mudd is the quantity held by the two outstretched hands. (***) a broth of crumbled bread and meat
Al-Bukhari recorded that 'Ata heard Ibn 'Abbas recite the ayah: "And for those who can fast [but do not], there is a ransom": the feeding of a person in need" [al-Baqarah: 2:185]. Then Ibn 'Abbas continued: "It has not been abrogated. [Its ruling applies] to elderly men and women who are not able to fast. Instead, they must feed one poor person on a daily basis."
If they fear for the baby, can break the fast and pay the fidyah (ransom). They do not have to make up the days missed according to one opinion of scholars.
The Prophet (S) said to one of his companions (*): "Come, I shall inform you about the fast. Allah, the Blessed and Most High, remitted half the prayer for the traveler, and fasting for the pregnant and breast-feeding" .[at-Tirmithi, Ibn Majah, Abu Dawud and an-Nasa'i, Sahih] (*) Anas Ibn Malik al-Ka`bee who is different than Anas the servant of the Prophet (S).
Abu Dawud related from 'Ikrimah that Ibn 'Abbas said concerning the ayah "And form those who can fast [but do not],": "This is a concession for the elderly, as they can fast. They are to break the fast and feed a poor person a day. Pregnant or breast-feeding women, if they fear for the child, can do likewise." [al-Bazzar]. At the end of the report, there is the addition: "Ibn 'Abbas used to say to his wives who were pregnant: 'You are in the same situation as those who can fast [but do not]. You are to pay the "ransom" and, do not have to make up the days later."' [ad-Daraqutni also mentions it]
Allah says in the Qur'an [in meaning]: "And [for] him who is sick among you or on a journey [the same] number of other days." [al-Baqara, 2:185]
Mu'adh said: "Verily, Allah made the fast obligatory upon the Prophet by revealing: 'O you who believe, fasting is prescribed for you as it was prescribed for those before you . . .'until the words, 'And for those who can fast [but do not] there is a "ransom" payment...' Then, whoever wished to do so would fast and whoever wished to do so would feed a poor person, and that was sufficient for them. Then Allah revealed another ayah: 'The month of Ramadan in which the Qur'an was revealed ...' to the words: 'Whoever is resident among you during this month is to fast.'[By this Ayah, the fast was established for those who were resident and healthy. A concession was made for the sick and travelers, and the feeding of the poor by the elderly who could not fast was [left] confirmed." [Ahmad, Abu Dawud, and al-Baihaqi]
A sick person may break his fast which, if continued, would only aggravate the illness or delay its cure. Similar is the case of a the person who is overcome by hunger and/or thirst and fears that he may die because of it, even if he is resident and healthy. He must make up the days of fasting that he missed. The following two 'ayat support this point: "And do not kill yourselves, Allah is ever Merciful to you," and "He has not laid upon you in your religion any hardship."
If a sick person or a traveller fast and withstand the hardships of the fast, and continue to fast while feeling the hardship, their fast will be valid but disliked, for they did not accept the concession Allah gave him, thereby causing himself much hardship and the Prophet (S) said: "Allah loves to give allowances just as He hates that you commit sins" and in another narration "just as He love to give His obligations" [Ibn Hibban and others; Sahih]. He also said: "It is not righteousness to fast during a journey". [Bukhari and Muslim]
The traveler can break his fast in any circumstances. However, if he feels hardship, he must brake the fast otherwise he will be going against the spirit of the Shari`a [Islamic law]. But if he has the strength to fast, he can fast and it is still good for him. This is portrayed in the following Ahadith that shows how the Prophet (S) and his companions behaved during their journeys.
'Aisha reported that Hamza bin 'Amr Al-Aslami asked the Prophet, "Should I fast while traveling?" The Prophet replied, "You may fast if you wish, and you may not fast if you wish." [Bukhari]
Hamza al-Aslami said:" O Messenger of Allah, I find within me the strength to fast while traveling. Would there be any blame upon me if I were to do so?" The Prophet (S) answered "It is a concession from Allah. Whoever takes it has done well. Whoever likes to fast, there is no blame upon him. [Bukhari and Muslim]
Abu Sa`id al-Khudri said "And they used to hold that one who had the strength and fasted, then that was good, and he who was weak and refrained from fasting, then that was good". [Tirmithi; Sahih]
Abu Sa`id al-Khudri said "We fought under the leadership of the Messenger of Allah during Ramadan. Some of us fasted and some of us did not. The ones who fasted did not find any fault with those who did not fast, and those who did not fast did not find any fault with those who did not find any fault with those who fasted. They knew that if one had the strength to fast he could do so and it was good, and that if one was weak, he was allowed to break his fast, and that was good." [Muslim and Ahmad].
Ibn Abbas said, "Allah's Messenger (S) traveled in the month of Ramadan and he fasted till he reached (a place called) 'Usfan, then he asked for a tumbler of water and drank it by the daytime so that the people might see him. He broke his fast till he reached Mecca." Ibn Abbas used to say, "Allah's Messenger fasted and sometimes did not fast while traveling, so one may fast or may not (on journeys)" [Bukhari]
Ibn 'Abbas reported that Allah's Messenger set out for Mecca in Ramadan and he fasted, and when he reached Al-Kadid, he broke his fast and the people (with him) broke their fast too. (Abu 'Abdullah said, "Al-Kadid is a land covered with water between Usfan and Qudaid.") [Bukhari]
Ibn 'Abbas said, "Allah's Apostle set out from Medina to Mecca and he fasted till he reached 'Usfan, where he asked for water and raised his hand to let the people see him, and then broke the fast, and did not fast after that till he reached Mecca, and that happened in Ramadan." Ibn 'Abbas used to say, "Allah's Apostle (sometimes) fasted and (sometimes) did not fast during the journeys so whoever wished to fast could fast, and whoever wished not to fast, could do so." [Bukhari]
Abu Ad-Darda' said: We set out with Allah's Apostle on one of his journeys on a very hot day, and it was so hot that one had to put his hand over his head because of the severity of heat. None of us was fasting except the Prophet and Ibn Rawaha. [Bukhari]
Jabir bin 'Abdullah relates that Allah's Messenger (S) was on a journey and saw a crowd of people, and a man was being shaded (by them). He asked, "What is the matter?" They said, "He (the man) is fasting." The Prophet said, "It is not righteousness that you fast on a journey." [Bukhari]
Anas bin Malik said: We used to travel with the Prophet and neither did the fasting persons criticize those who were not fasting, nor did those who were not fasting criticize the fasting ones. [Bukhari]
Ibn 'Abbas said, "Allah's Apostle set out from Medina to Mecca and he fasted till he reached 'Usfan, where he asked for water and raised his hand to let the people see him, and then broke the fast, and did not fast after that till he reached Mecca, and that happened in Ramadan." Ibn 'Abbas used to say, "Allah's Apostle (sometimes) fasted and (sometimes) did not fast during the journeys so whoever wished to fast could fast, and whoever wished not to fast, could do so."[Bukhari]
There are other Ahadith in this topic that show that the Messenger of Allah (S) broke his fast and told his companions to break theirs. Other ahadith related to Sahaba show that some of them would break the fast before starting the trip, and all these are proof that the traveler has many options.