If he repeats al-Fatihah or the tashahhud because he thinks he omitted part of them, should he do the prostration of forgetfulness (sujud as-sahw)?
Question

I repeated the recitation of al-Fatihah and the second tashahhud because I thought that I had omitted part of them, and I did the prostration of forgetfulness after the salaam. Is the prostration of forgetfulness required in this case? And is doing the prostration of forgetfulness after the salaam in this case correct?
Praise be to Allah.Firstly:
Repeating al-Fatihah when you think that you have omitted part of it
If someone thinks that he has omitted part of al-Fatihah so he repeats it before bowing, he does not have to do the prostration of forgetfulness. The same applies to one who thinks that he has omitted part of the second tashahhud, so he repeats it before the salaam; he does not have to do the prostration of forgetfulness.
The basic principle is that if someone finishes reciting al-Fatihah, then is not sure whether he recited a verse of it, he should not pay any attention to his uncertainty, because what appears to be the case is that he has recited it in full.
But if he becomes uncertain about that before completing al-Fatihah, he should start reciting al-Fatihah again from the beginning.
It says in al-Majmu‘ (3/394): Shaykh Abu Muhammad said in at-Tabsirah: If [the worshipper] has completed al-Fatihah and he believes that he has recited it in full and has no doubt about that, then it occurs to him that he may have omitted a word or a letter of it, his uncertainty carries no weight and his recitation is deemed to be sound. But if he has finished reciting al-Fatihah and is uncertain as to whether he recited it in full, he must repeat it; this also applies if he becomes uncertain whilst reciting it. End quote.
It says in Asna’l-Matalib (1/152): If he becomes uncertain as to whether he omitted a letter or more of al-Fatihah after completing it, that does not matter, because in that case it may be assumed that he completed it in full. If he becomes uncertain before completing it or he is not sure whether he recited it or not, he should repeat it again from the beginning, because in this case the basic principle is that he has not recited it. End quote.
Ar-Ramli al-Kabir said in his commentary thereon: The same applies to the tashahhud, by analogy with al-Fatihah. This is clear. End quote.
Secondly:
Prostration of forgetfulness for repeating al-Fatihah
The prostration of forgetfulness is not required for repeating al-Fatihah or the tashahhud, because deliberately repeating al-Fatihah or the tashahhud does not invalidate the prayer; rather it is only disliked (makruh).
It says in Zad al-Mustaqni‘: Doing the prostration of forgetfulness for that which invalidates the prayer if done deliberately is obligatory.
Shaykh Ibn ‘Uthaymin said in his commentary: This guideline applies to cases in which doing the prostration of forgetfulness is obligatory. The prostration of forgetfulness is obligatory in the case of anything that renders the prayer invalid if done deliberately.
So if [the worshipper] says prescribed words in the wrong place, such as reciting Qur’an whilst sitting, by mistake, he does not have to do the prostration of forgetfulness, because if he recited deliberately whilst sitting, that would not render his prayer invalid...
So the guideline applies both ways: the prostration of forgetfulness is obligatory in the case of any action or omission which renders the prayer invalid if done deliberately."(Ash-Sharh al-Mumti‘  3/391).
It says in Sharh Muntaha al-Iradat (1/209): And it is disliked (makruh) for him to repeat al-Fatihah, because that is not mentioned in any religious text, and so as to avoid a matter which some scholars say invalidates the prayer, namely repeating al-Fatihah, because reciting (once) it is a pillar or essential part of the prayer.
The difference between an essential part of the prayer that is verbal (words) and one that is practical (actions or movements) is that repeating a verbal essential part does not affect the outward appearance of the prayer. End quote.
The Malikis are of the view that if [the worshipper] repeats words that are obligatory, such as al-Fatihah or the second tashahhud, then he should do the prostration of forgetfulness.
It says in al-Fawakih ad-Dawani (1/216): With regard to adding something to the words of the prayer, the prostration of forgetfulness is not required in this case and it does not invalidate the prayer if done deliberately, such as if he repeats the surah or the takbir or adds another surah in the last two rak‘ahs.
But if the words are obligatory, then he should do the prostration of forgetfulness, such as if he repeats al-Fatihah by mistake, even in one rak‘ah. But there are different views as to whether the prayer is invalidated if he repeats al-Fatihah deliberately. The correct view, which is that favoured by al-Ajhuri, is that it does not invalidate the prayer.
Thirdly:
Prostration of forgetfulness for one who recites something that changes the meaning in al-Fatihah by mistake
If [the worshipper] recites something in al-Fatihah that changes the meaning, such as saying an‘amtu [1st person singular] instead of the correct an‘amta [2nd person singular], he should do the prostration of forgetfulness according to the Shafa‘is.
It says in Tuhfat al-Muhtaj (2/38): He should do the prostration of forgetfulness if he makes a mistake that changes the meaning, for example, because the prostration of forgetfulness is required in the case of that which invalidates the prayer if done deliberately. End quote.
The Hanbalis clearly stated that the prostration of forgetfulness is not required in this case.
It says in Kashshaf al-Qina‘ (1/408): The prostration of forgetfulness is obligatory in the case of that which would invalidate the prayer if done deliberately. … except if he makes a grammatical error which changes the meaning, whether that is done by mistake or out of ignorance, because doing that deliberately would invalidate the prayer, but he is not required to do the prostration of forgetfulness if he did it by mistake or out of ignorance. End quote.
This prostration should be done after the salaam, because it results from adding something to the prayer. He should also beware of waswasah (whispers from the Shaytan or intrusive thoughts).
And Allah knows best.