I am trying to evaluate the integral $$\int_{-\infty}^{\infty} f(x) \delta(ax-b) \, dx$$ for $a\neq0$. From what I was taught, I would expect the answer to be $f\bigl(\frac{b}{a}\bigr)$ since $a\cdot\frac{b}{a}-b=0$.
However, I can also do a change of variables $u=ax$. This makes the integral $$\frac{1}{a}\int_{-\infty}^{\infty} f \Bigl(\frac{u}{a}\Bigr) \delta(u-b) \, du.$$ I would expect the value of this expression to be $\frac{1}{a} f\bigl(\frac{b}{a}\bigr)$. How am I getting two different answers? Is one of my steps invalid? Wolfram|Alpha seems to agree with the second result. If this is correct, why do I have to make the substitution to find the correct answer?
Thank you