Prostration for forgetfulness
If one forgets during the obligatory or supererogatory prayer by adding, removing or doubting, then he should perform two sujoods and this has many cases which can be briefly described as follows:
1. If one recites tasleem before he finishes the prayer: he should finish it, then recite tasleem and after tasleem he should perform two sujoods and then tasleem.
2. If one adds something such as ruku or sujood: after finishing the prayer, he does two sujoods and then tasleem.
3. If one stands for an extra raka’ah: he does not complete it and sits whenever he remembers, recites Shahada and tasleem then does two sujoods and tasleem.
4. If one forgets the middle Shahada: if he stands then he should stay standing and do two sujoods after Shahada before tasleem. However, if he remembers before standing up then he should return without sujood.
5. If one doubts his salat and is able to investigate and be absolute about his guess then he should do two sujoods after tasleem, then tasleem again.
6. If one doubts and is not able to investigate, he takes the least number of rakaah then does two sujood before tasleem.
7. If one forgets ruku or sujood, or any of the prayer integrals: if he remembers at the same time, he corrects it. If he remembers in the second raka’ah, he does not count the first raka’ah and replaces it with another one ,in both cases, he does two sujoods before tasleem.
8. If one remembers after finishing the salat: He stands and performs a whole raka’ah and tasleem, then two sujood and tasleem.
9. If the imam forgets, the worshipers follow him unless there is an addition in raka’ah. Then, worshipers must wait for the imam to do tasleem with him.
10. If al-ma’mum forgets while being behind the imam: there is no sujood, and the imam bears it for him.
11. If one forgets the initial takbir: he repeats the prayer without sujood.
12. If one forgets tasleem: he does tasleem, then sujood and tasleem.
13. For every forgetfulness two sujood and their place is optional i.e., if one does sujood for addition after tasleem and before tasleem for shortage: it is better.