James 1:5 If any of you lack wisdom, let him ask of God, that giveth to all men liberally, and upbraideth not; and it shall be given him.
6 But let him ask in faith, nothing wavering. For he that wavereth is like a wave of the sea driven with the wind and tossed.
7 For let not that man think that he shall receive any thing of the Lord.
8 A double minded man is unstable in all his ways.
James now says if you would like to wisdom ask God for it. Why does he say to ask for wisdom? Because wisdom is what is needed to be able to begin to understand God and what He has for you. He says God will give it to you as long as you ask in faith, not wavering. It is useless to pray and ask for something, if you do not believe you will get an answer to that prayer. Faith is what causes the prayer to be answered. When Jesus healed the sick, He said, your faith has made you whole. If there is any doubt then God is not going to grant what we ask for. In Mark 9 a man of faith ask Jesus to help him with his unbelief because he wanted more and God here us when we sincere with our faith in asking for what we need. Verse 8 is speaking of an unstable person, who cannot make up his mind. He really does not truly believe anything. His heart is not right with God.