How is to find the value of $k$ for the following equation which gives $100(1-\alpha)\%$ highest posterior density?
$$\int_{\theta:\pi(\theta|\mathbf x)>k}\pi(\theta|\mathbf x)d\theta=1-\alpha,$$
where $\pi(\theta|\mathbf x)$ is the posterior density for $\theta$, and $\alpha$ is the level of significance. Can anyone please show me a toy example from which I can understand how is to obtain the value of $k$?