I prayed all the obligatory prayers in congregation, but after finishing the `Isha prayer, I remembered that I had forgotten to pray Dhuhr. What should I do, and is my prayer invalid?
Your prayers are valid, but you must make up the Dhuhr prayer as soon as you remember it, based on the saying of the Prophet (peace be upon him): "Whoever forgets a prayer must pray it as soon as they remember it; there is no expiation for it except this." [Muslim]. And Allah knows best
Is it permissible for a woman who has become pure before the end of forty days of confinement to perform different acts of worship? and is it lawful for her husband to have sex with her?
Once postpartum bleeding ceases and she is certain that it won`t happen again, she becomes pure, and so she should perform Ghusl (ritual bath), pray, and fast. She can also have sex with her husband even before the end of (40) days because the minimum of postpartum bleeding is a moment, and the maximum is (60) days. However, the postpartum bleeding for the majority of women is (40) days, but this does not apply to rest of them.
What is the ruling on swearing on the Holy Quran and breaking that oath?
It is impermissible to swear on the Holy Quran in vain, and it is also impermissible to subject it to such an act since breaking the oath after swearing on the Quran entails an expiation.
Is it permissible for one to masturbate in order not to commit fornication?
This is called committing the milder of the two evils such as eating a carcass in fear of death, and this happens when committing fornication is very likely to occur.