We propose a new quadratic-programming-based method of approximating a nonstandard density using a multivariate Gaussian density. Such nonstandard densities usually arise while developing posterior samplers for unobserved components models involving inequality constraints on the parameters. For instance, Chan et al. (2016) propose a new model of trend inflation with linear inequality constraints on the stochastic trend. We implement the proposed new method for this model and compare it to the existing approximation. We observe that the proposed new method works as good as the existing approximation in terms of the final trend estimates while achieving greater gains in terms of sample efficiency.