This may be too technical for non-economists, yet familiar to macroeconomists, but students should find it useful. Its part of a continuing series on NGDP targets
‘c’ is a parameter. The cost function is quadratic to capture the idea that a 1% increase in inflation or the output gap is more costly if inflation or the output gap is already high than if it is low. Let’s abstract from uncertainty, and assume policy can perfectly control the output gap (there is no zero lower bound problem), and the only constraint is a forward looking Phillips curve
where ‘u’ is what is often called a cost-push shock, so it could be an increase in sales taxes for example. (Really it stands for all the things that might influence inflation besides expected inflation and the output gap, which is probably quite a lot.) The parameter ‘a’ measures how sensitive inflation is to the output gap.
Cost push shocks are in some ways the most difficult things for monetary policy to deal with, if we are ignoring uncertainty. Demand shocks that create negative or positive output gaps can in principle be eliminated entirely by an appropriate choice of interest rates. Supply shocks that change the natural rate, if known, can also be dealt with at zero cost by just moving demand to follow supply. A non-zero value of u will however result in some cost whatever policy does.
Let’s look at the case where there is a large positive cost push shock, just in the current period (t=0), and let’s make it equal to 10. This means that if the monetary authorities chose a zero output gap at t=0, then current inflation would be 10% higher. A crucial assumption here is that future inflation, assuming no known future shocks and a zero future output gap, is anchored at target, so excess inflation at t>0 will be zero. We can see in this case that by choosing a zero output gap at t=0 involves a loss of 100 at t=0, but no subsequent loss.
Now suppose all that monetary policy can do is change the output gap in the current period. Perhaps promises to change the output gap in future periods will not be believed. In that case the optimal combination of output and inflation to go for is given by
This is a bit different from the expression involving excess inflation at t=0, because inflation at t=1 will have implications for inflation at t=0, and therefore the choice of output gap at t=0. The neat point is that if d=1 again, this also implies we keep nominal GDP (NGDP) at t=1 constant, because this equation says the growth in NGDP should be zero, and the previous expression made the level of NGDP constant. If a=c=d=1, then we can show that the optimal policy involves having a negative output gap of 4% at t=0 and 2% at t=1. This will produce 4% inflation at t=0 and -2% inflation at t=1, but despite this rather odd combination involving inflation that is too low at t=1, the overall cost is less: 16+16+4+4=40. 
A potential problem with this policy is that it is time inconsistent. When period t=1 arrives, it seems better to change the policy and keep the output gap at zero, which implies zero inflation. The total cost would then be only 32. But if that is what monetary policy is going to do, people would not expect future inflation of -2% when t=0, so we would not get the benefits of this expectation. Instead inflation at t=0 would be 6% and the output gap -4%, giving an overall cost of 52, which is worse than if policymakers had only tried to change the output gap at t=0. However if d=1, and policymakers had committed to keeping the level of NGDP constant, then NGDP at t=1 would be too high, so keeping the output gap at zero in t=1 would not be an option. Policy would be committed to following the optimal path, and policy commitments would be credible if NGDP targets were credible. This is the logic behind this post. 
This is why, I would suggest, Michael Woodford is comfortable with targets for the level of NGDP. (A good technical reference on optimal monetary policy is here, where the equation above is an example of his equation 1.21, while his views on NGDP targets can be found here, pages 44-46.) Note that I have not had to invoke anything about the zero lower bound (ZLB) – indeed I have ignored it – which is why I have pointed out before that the case for NGDP targets does not rely on ZLB considerations.
However is it reasonable to suppose d=1? Quite often macroeconomists assume c=1: a 1% output gap has the same cost as 1% extra inflation. However recent IMF work that I talked about here suggested that the Phillips curve might be very flat at low inflation. Combine the two and d could be much larger than one. This would imply that the optimal policy would be to let most of the shock feed through into inflation.  In this case a NGDP target would not be optimal. 
So this is either good or bad news for NGDP advocates, depending on your views of these two key parameters.  However there is a lot left out of this simple story, such as what happens if the Phillips curve is more backward looking, or if policymakers and the private sector make mistakes.
 Note that the price level at t=2 in this case is just 2% higher than without the shock, compared to 5% higher when we only changed current period output. This gives us a clue to what will happen if we allow output even further ahead to change optimally – see the next footnote.
 If we allow policymakers to make promises about the output gap in period t=2 and beyond, we can get the cost of this shock down further still: what we get are more conditions like the last equation, for each subsequent period. The policymaker promises smaller and smaller negative output gaps, so future excess inflation approaches zero from below. What happens then is slightly magical: by summing all these conditions together, we find that all these future negative inflation rates sum to exactly offset the initial rise in inflation, so (if target inflation was zero) the price level eventually returns to its pre-shock level. More generally the optimal policy involves gradually returning the price level back to its original path. In this sense, long run price level targeting is optimal whatever the value of d.
 If c=1 but a=0.5 (and estimated 'a' is normally a lot smaller than this - Charlie Bean in the small model simulated here uses a=0.025), then in the first example the output gap should be -4%, and inflation would be 8%. Although that produces a total cost of 80, that is the best we can do. If the output gap was -5%, inflation would be 7.5%, giving a total cost of over 81.
 Keeping NGDP constant would reduce output by 6 and two thirds per cent. Although, compared to the optimal policy, inflation would be a bit more than 1% lower, output would be nearly 3% lower, and the total cost would be nearly 89.
 As I have already begun to read the mind of Michael Woodford, let me continue with my audacity. Michael Woodford first showed us how you can derive the first equation from a standard utility function in a model with Calvo contracts. If you do that, the ‘c’ parameter (which is actually is a function of 'a' along with other parameters) can be a lot less than one, so the chances of ‘d’ being close to one despite small 'a' are greater. The problem I have with this logic is that I do not believe the simple models used to derive these cost functions accurately capture the true costs of output gaps, in part because they typically exclude involuntary unemployment.