Dirac's delta, a simple integral Solving
$$
\int_{-\infty}^\infty \delta(2x-\pi)\sin{x}dx
$$
Should not be too hard. Dirac's delta assumes 1 at $x=\frac{\pi}{2}$ and zero everywhere else. So the answer is $\sin{\frac{\pi}{2}}=1$. But the correct answer is supposed to be $\frac{1}{2}$, why??

Because you have $\delta(2 x - \pi)$ in the integral.  You need to do a substitution with $u=2 x$ and this is where your factor of $1/2$ comes from.
