I am trying to solve numerically Kolmogorov backward PDE with boundary conditions:
\[Sigma] = 0.1; \[Mu] = 0.05; k = 1; T = 1;
sol = NDSolve[{D[p[a, t], t] + (1/2)*\[Sigma]^2*a^2*D[p[a, t], a, a] + \[Mu]*a*D[p[a, t], a] == 0,
p[k, t] == 1, p[a, T] == 0}, p, {a, 1, 10}, {t, 0, 1}]
But it first complains about the boundary conditions (which in a way I can understand because of the p[1,1] point). But more importantly the outputted solution is nonsensical:
Plot3D[Evaluate[p[a, t] /. sol], {a, 1, 10}, {t, 0, 1}]
The physical problem I am trying to solve is the following: what is the probability of default of a firm with debt k and assets given by ito process (variable a). If a=k then the firm has defaulted, hence the first boundary condition. If a>k and t=T (T is the final point) then the probability of default is zero (no time left). This makes perfect sense to me, but something is not right mathematically (or programmatically). Any ideas?
Update
Following xzczd's advice in the comments, I added a condition at infinity (a=10). I also introduced UnitStep function to make boundary conditions consistent and stop the warning.
\[Sigma] = 0.1; \[Mu] = 0.05; k = 1; T = 1;
sol = NDSolve[{D[p[a, t], t] + (1/2)*\[Sigma]^2*a^2*D[p[a, t], a, a] + \[Mu]*a*D[p[a, t], a] == 0,
p[k, t] == 1, p[a, T] == UnitStep[k - a], p[10*k, t] == 0}, p, {a, 1, 3}, {t, 0, 1}]
bcartwarning. This is a serious problem. Check the following for more info: https://mathematica.stackexchange.com/q/73961/1871 – xzczd Jan 31 '20 at 11:01