Suppose we have a diffusion PDE with time-dependent diffusion coefficient like this $$\frac{\partial{f}}{\partial{t}}=at^{a-1}\frac{\partial^2{f}}{\partial{x^2}},~~~~~(1)$$ where $a$ is some constant.
Is it allowed to divide the equation by $at^{a-1}$ and to substitute $\tilde{t}=t^{a}$? The idea is that the transformation would yield one that has a known solution, i.e. $$\frac{\partial{f}}{\partial{\tilde{t}}}=\frac{\partial^2{f}}{\partial{x^2}}.$$
Attempt at a solution: Not very knowledgeable about calculus and thought that this could work. However, I then tried sanity-checking this by taking a Gaussian solution, substituting the time variable in it as proposed above and then plugging this "proposed" solution into eq. (1), but then the LHS are not equal to the RHS. This suggests that I am doing something illegitimate, but I am not sure what.
After some time, I realized that I made a mistake in my initial attempt. With more care, it looks like the Gaussian solution satisfies equation (1), but I am unsure if this is correct.
So suppose that the substitution of $\tilde{t} = t^a$ is correct and equation (1) of the question can be reduced to $$\frac{\partial{f}}{\partial{\tilde{t}}}=\frac{\partial^2{f}}{\partial{x^2}},$$ which is solved by something like $f(x,\tilde{t})=C\tilde{t}^{-\frac{1}{2}}\exp(-\frac{1}{4}x^2\tilde{t}^{-1})$. We can express the latter in terms of $t$ as $f(x,t)=Ct^{-\frac{a}{2}}\exp(-\frac{1}{4}x^2t^{-a})$ and compute the needed derivatives. $$\frac{\partial{f}}{\partial{x}}=-\frac{1}{2}xt^{-a}f,$$ $$\frac{\partial^2{f}}{\partial{x^2}}=\frac{1}{2}t^{-a}(x^2t^{-a}-1)f,$$ $$\frac{\partial{f}}{\partial{t}}=\frac{1}{2}t^{-1}a(x^2t^{-a}-1)f.$$ Taking the following ratio $$\frac{\partial{f}/\partial{t}}{\partial^2{f}/\partial{x^2}}=at^{a-1},$$ we get the "time-dependent" diffusion coefficient on the RHS of equation (1).
Not sure if there are no major flaws with my reasoning, so will not resolve the question for a couple of days in case someone else wants to add to the question.