I'm trying to prove that if $f(a+\epsilon) = f(a-\epsilon)$, i.e. $f(x)$ is symmetric about $a$, then $a$ is the median of a continuous random variable with pdf $f(x)$. Using the fact that $a$ being the median means that $$\int_{-\infty}^a f(x)dx = \int_{a}^{\infty}f(x)dx = 1/2$$ I thought I could do something like
$$1 = \int_{-\infty}^{\infty}f(x)dx = \int_{-\infty}^a f(x)dx + \int_{a}^{\infty}f(x)dx,$$
but couldn't see why I could claim that the two integrals had to then be equal/ both then must be $1/2$.
I saw a similar version of what I'm trying to prove with $a=0$ here, but couldn't figure out how to apply a transform to my integrals so that it worked out the same way. I tried using $x=a-y$, but still just couldn't get the negative signs to work out correctly.
Any advice is apricated, and thank you in advance.