The battle for Mosul commenced a few months back. The Iraqi army on its own has been unable to make any progress. It's fighting capability is suspect as just after Obama ordered the withdrawal of US forces from Iraq, they lost almost 80% of Iraq to the ISIS. It was a defeat without parallel. Now after being given US air support and about 5000 advisors on the ground the Iraqi army has launched an attack on Mosul.
As a military analyst one can see that whatever progress the Iraqi army has made is because the US Air Force has created a "favorable air situation". The ISIS ground troops have no air cover and even with air cover the progress of the Iraqi army is slow. The US has now committed its troops to the battle lines and some casualties have been reported, though the exact numbers are not known. One can see that the Iraqi army on its own is unequal to the task.
General Mattis
On a recent visit to Iraq, the secretary defense General Mattis confirmed that the US forces would remain in Iraq, even if Mosul is captured.
This is a realistic assessment by a seasoned general. He is well aware that the Iraqi army is unequal to the task and in case the USA withdraws a repeat performance cannot be ruled out.
Questions about Iraq
This raises serious questions about Iraq. How long will the US continue to bolster the Baghdad regime which for all practical intents and purposes is a Shia regime? As things stand it looks like a long drawn affair. Such wars have a tendency to drag on. The cost of this will be heavy in terms of men and material. It will also affect the economy. Already there is a heavy deficit and Donald Trump has indicated that military spending on NATO and other places need to be curtailed. Perhaps the expense could be defrayed if an alliance is formed with Russia but with 2 anti-Russian generals at the helm of affairs, this is not likely.
Bolstering a Sunni alliance
The US forces will have to fight their own battles against the ISIS. It won't be easy as in the Middle East there is a Sunni-Shia conflict. The American plan to cobble up a Sunni alliance with Saudi Arabia as a partner may not succeed and the ultimate economic burden will remain with the USA.
Future
History records that the US was always involved in perpetual war from 1950. At that time it faced the communists in Korea. This has continued, putting a heavy drain on the economy. In addition, the Americans lost or at best there was a stalemate. It's about time the generals were taken out of policy making. One can recollect President Truman sacked General McArthur when he advocated the atomic bombing of China. It won't be easy.