In quantum mechanics, the translation operator $\hat{T}(a)$ is defined such that $\hat{T}(a) \cdot f(x) = f(x+a)$. I'm asked to find the exponential form of this operator, given by $\hat{T}(a)=e^{i\frac{a}{\hbar}\hat{p_{x}}}$, for one dimension. I've come up with the following.
From the definition of the translation operator, $f(x+a)$ can be expanded in a Taylor series around $a=0$ as
$$ \hat{T}(a) \cdot f(x) = f(x+a) = \sum_{n=0}^{\infty} \frac{1}{n!} \left. \frac{\text{d}^{n}f(x+a)}{\text{d}a^{n}} \right|_{a=0} a^{n} .$$
Now, considering the following, $$ \frac{\text{d}}{\text{d}a} = \frac{\text{d}}{\text{d}(x+a)} \frac{\text{d}(x+a)}{\text{d}a} = \frac{\text{d}}{\text{d}(x+a)}, $$ $$ \frac{\text{d}}{\text{d}x} = \frac{\text{d}}{\text{d}(x+a)} \frac{\text{d}(x+a)}{\text{d}x} = \frac{\text{d}}{\text{d}(x+a)}. $$
Therefore $$ \frac{\text{d}}{\text{d}a} = \frac{\text{d}}{\text{d}x}. $$
Then, the expansion can be rewritten as follows, evaluating $a=0$ on the derivatives, $$ \hat{T}(a) \cdot f(x) = f(x+a) = \sum_{n=0}^{\infty} \frac{1}{n!} \frac{\text{d}^{n}f(x)}{\text{d}x^{n}} a^{n} = \sum_{n=0}^{\infty} \frac{1}{n!} \left[ a \frac{\text{d}}{\text{d}x} \right]^{n} f(x).$$
Taking the definition of the momentum operator, in one dimension, in the position representation, then, $$\hat{p}_{x} = -i \hbar \frac{d}{dx} \rightarrow \frac{\text{d}}{\text{d}x} = \frac{i}{\hbar} \hat{p}_{x} .$$
Replacing this in the expression above, $$ \hat{T}(a) \cdot f(x) = f(x+a) = \sum_{n=0}^{\infty} \frac{1}{n!} \left[ i \frac{a}{\hbar} \hat{p}_{x} \right]^{n} f(x) = e^{ i \frac{a}{\hbar} \hat{p}_{x} } f(x) ,$$ from which it can be concluded that $$ \hat{T}(a) = e^{ i \frac{a}{\hbar} \hat{p}_{x} } .$$
Apart from whether my calculations are correct or not, I see that in most places the exponential form of the translation operator is given by $ \hat{T}(a) = e^{- i \frac{a}{\hbar} \hat{p}_{x} } $.
The thing is that, from the exponential of the operator with the positive argument of the exponential, that is, the one I found earlier, the commutator of the position operator with the translation operator is given by $$ \left[ \hat{x}, \hat{T}(a) \right] = \left[ \hat{x}, e^{ i \frac{a}{\hbar} \hat{p}_{x} } \right] \\ =\left[ \hat{x}, \sum_{n=0}^{\infty} \frac{1}{n!} \left( i \frac{a}{\hbar} \hat{p}_{x} \right)^{n} \right] = \sum_{n=0}^{\infty} \frac{1}{n!} \left( i \frac{a}{\hbar} \right)^{n} \left[ \hat{x}, \hat{p}_{x}^{n} \right] .$$
Since $\left[ \hat{x}, \hat{p}_{x}^{n} \right]=i \hbar n \hat{p}_{x}^{n-1}$, $$ \left[ \hat{x}, \hat{T}(a) \right] = \sum_{n=0}^{\infty} \frac{1}{n!} \left( i \frac{a}{\hbar} \right)^{n} i \hbar n \hat{p}_{x}^{n-1} \\ = - \sum_{n=0}^{\infty} \frac{1}{n!} \left( i \frac{a}{\hbar} \right)^{n} \frac{1}{i} \hbar n \hat{p}_{x}^{n-1} \\ = - a \sum_{n=0}^{\infty} \frac{1}{(n-1)!} \left( i \frac{a}{\hbar} \right)^{n-1} \hat{p}_{x}^{n-1} .$$
From the sum, the term corresponding to $n=0$ is zero, as $0!=1$; then the sum can start from $n=1$. From this, we can take $k=n-1$, and the sum is now as follows, $$ \left[ \hat{x}, \hat{T}(a) \right] = - a \sum_{k=0}^{\infty} \frac{1}{k!} \left( i \frac{a}{\hbar} \hat{p}_{x} \right)^{k} = -a \, e^{i \frac{a}{\hbar} \hat{p}_{x}} = -a \hat{T}(a).$$
From this, the translation operator can be expressed as $$ \hat{T}(a) = -\frac{1}{a} \left[ \hat{x}, \hat{T}(a) \right]. $$
Taking the action of the translation operator on a space vector $\left|x\right>$, $$\hat{T}(a)\left|x\right> = -\frac{1}{a} \left[ \hat{x}, \hat{T}(a) \right] \left|x\right> = -\frac{1}{a} \left(\hat{x}\hat{T}(a) - \hat{T}(a)\hat{x} \right)\left|x\right> \\ = -\frac{1}{a} \left(\hat{x}\hat{T}(a)\left|x\right> - \hat{T}(a)\hat{x}\left|x\right> \right) .$$
I am assuming that, as the definition in the beginning stated, the action of the translation operator on a state vector $\left|x\right>$ to be $\hat{T}(a)\left|x\right> = \lambda \left|x+a\right>$, where $\lambda$ is a complex number. Then, $$ = -\frac{1}{a} \left( \lambda (x+a) \left|x+a\right> - x \left|x+a\right> \right) = - \frac{1}{a} a \lambda \left|x+a\right> = - \lambda \left|x+a\right>. $$
But, as I assumed before, $\hat{T}(a)\left|x\right> = \lambda \left|x+a\right>$. So, I know that $\lambda \neq 0$, because then the translator operator would kill all vectors it acts on, so I reach a contradiction.
I know that the assumption I took, that is, that $\hat{T}(a)\left|x\right> = \lambda \left|x+a\right>$, may be wrong, but it is way too intuitive for it not to be that way. I was thinking that perhaps the exponential of the operator that I found here is not correct, and that's why everywhere it is defined as an exponential with the same argument but negative, that is, $\hat{T}(a)=e^{-i\frac{a}{\hbar}\hat{p_{x}}}$, but that would mean that the calculations I made at the start are wrong somehow, bu I can't see where. What is my problem here, then?