Consider a PDE of the form $\frac{\partial f}{\partial t} = -\frac 1 2 \frac{\partial^2 f}{\partial x^2}$. Our aim is to find an explicit solution of the form $h(\sigma x + \mu t)$, where $\sigma, \mu \neq 0$, $h(-a) = 0$ and $h(b) = 0$ for some $a,b > 0$.
This leads to the equation
$$h'(\sigma x + \mu t)\mu = -\frac 1 2 h''(\sigma x + \mu t)\sigma^2.$$
I don't know how to deal with this at all due to the dependence on $x$ and $t$.
If I tried to solve the ODE $h'(x)\mu = -\frac 1 2 h''(x)\sigma^2$ instead, then I cannot have $h(b) = 0$.
EDIT: Well, actually I can. I just made an error trying to solve this (see Mark's answer).
How can I find a solution to the above equation?
This is of course based on hoping such an $h$ even exists.
Motivation: Consider $X_t = \sigma B_t + \mu t$, where $B$ is a Brownian motion. I want to find $h$ with $h(-a) = 0$ and $h(b) = 1$ s.t. $h(X)$ is a local martingale. The Ito formula naturally leads to the above equation.
Disclaimer: I know nothing about PDE's.
Let $\xi=\sigma x+\mu t$. Then, since $\mu h'(\xi)=-\frac12\sigma^2 h''(\xi)$, we find that
$$\left(\frac12 \sigma^2 h'(\xi)+\mu h(\xi)\right)'=0\tag1$$
Integrating $(1)$ we find that
$$\frac12 \sigma^2 h'(\xi)+\mu h(\xi)=C_1\tag2$$
where $C$ is a constant. Solving $(2)$ reveals
$$h(\xi)=\frac1\mu C_1+C_2e^{-\frac{2\mu}{\sigma^2}\xi}\tag3$$
Now, use $h(-a)=h(b)=0$ in $(3)$ to find $C_1$ and $C_2$ in terms of $a$ and $b$.