For the US to intervene militarily in NW Pakistan uninvited will cause a heavy backlash against them in Pakistan, who they must keep friendly. The US aerial drone attacks are already causing political problems for them. The US can't afford to alienate Pakistan, who want to sort out their own internal affairs (whether they are able or not). the US will have to just keep pumping money in, especially to keep the new government in place. India should not really be a threat to Pakistan unless the terrorist attacks in India increase (which let's face it is easy in the fact of poor Indian intelligence and internal security) and they can be pinned on terrorists trained in NW Pakistan. Let's not forget that India is by and large a very peaceful nation (internationally).
It's just fact that Afghanistan is a war the US can't win. But if they withdraw at least it will give the insurgents no target other than fellow Muslims, the Afghan army and police, which should alienate them in the eyes of the people of Afghanistan (we should hope).