I am studying the connection between stochastic processes and PDEs and I understand the underlying theory well but when it comes time to solve the PDEs I am really stuck. Here are a few of the kinds of BVPs that I have encountered and do not know how to approach:
$$ \partial_t u(t,x) + \frac{1}{2} \partial_x^2 u(t,x) = 0 \\ u(T,x) = e^{-\gamma x^2} $$ This arises when considering $u(t,x) = E_{B_t = x} e^{-\gamma B_T^2}$. For this one I was able to use the known distribution of $B_T$ given that $B_t = x$ to determine that the solution is $$ u(t,x) = \frac{1}{ \sqrt{2 \gamma (T-t) + 1}} e^{-\frac{\gamma x^2}{2\gamma (T-t) + 1}} $$ However, I would have had no idea how to arrive at that solution without using the pdf of $B_T$.
Here's another one that I've come across and cannot figure out how to solve: $(f = f(t,x))$ $$ \partial_t f - x \partial_x f + \frac{1}{2} x^2 \partial_x^2 f = 0 \\ f(\tau,x) = V(x)\\ f(t,a)=0, f(t,b) = 1. $$ (Here $\tau$ is the first exit time from $[a,b]$ for a process started at $x \in [a,b]$ and $V(x)$ equals 0 when $x=a$ and equals 1 when $x=b$.)
I'm not really asking for a solution to that BVP (though I'd certainly be grateful for one) so much as:
How do you approach a PDE of this sort? "This sort" is vague but generally means a PDE with a single time derivative, first and second spatial derivatives, and "simple" but non-constant coefficients for the spatial derivatives. Advice and/or references are much appreciated. Thank you.