I have a question about prayer. I understand that the Bible states that when we pray, we are to let our requests to God be given in faith, believing that we will receive. So if I pray that God will help me through a difficult time or give me the strength to overcome some weakness, I need to pray with the belief that he will hear me and I will receive what I ask for, so long as it is His will. What I have trouble understanding, however, is this: Suppose I have a friend who is dying with cancer and I want to pray to God to heal him. How can I pray, believing I will receive, if I am not sure that it is God's will that he be healed? I know that God has the power to heal, but I don't know if he will choose to heal this person. So how can I obey this command to pray, believing that I will receive when I really don't know if I will get what I am asking? I can't know God's will in every situation, so how can I pray with such full assurance that my prayers will be answered? I hope I am making sense. It is difficult to explain how I feel.
Thank you so much for your time.
You're not the first or only person with such questions. There are a couple of articles which I would like you to read first which should take care of most, if not all, of your questions. See: "Unanswered Prayers" and "Does God Answer Every Prayer?"
The core problem is you are assuming that everything you ask for is best for you or those you are praying for. God answers our prayers, and we should act with faith that those prayers will be answered, but we should not be so arrogant as to think like the bratty child that everything I ask for I should get. Sometimes what we ask for isn't best for us or for those we are praying for.