I'm having troubles with the transformation from the Black-Scholes PDE and transforming it to the diffusion equation. I read this other stackexchange post (Here) and I understand most of the process, except where they changed the initial condition.
I got \begin{equation} \begin{split} u(x,0) &= e^{r\tau}C(S,T)\\ &=e^{r\tau}\text{max}(S-K,0)\\ &=e^{r\tau}\text{max}(e^y-K,0)\\ &=e^{r\tau}\text{max}(e^{x-(r-\sigma^2/2)\tau)}-K,0)\\ &=\text{max}(e^{x+\sigma^2\tau/2}-e^{r\tau}K,0)\\ \end{split} \end{equation}
Which is different from their equation of: \begin{equation} u(x,0) = u_0(x) = \text{max}(e^{\frac{1}{2}(a+1)x}-e^{\frac{1}{2}(a-1)x},0) \end{equation}
Where $a=2r/\sigma^2$
I would comment on the other post, however I don't have enough 'reputation' and this is a very specific question that I can't find elsewhere. Apparently it's in the textbook referenced in the original post, but the particular page referenced isn't freely available.