# Finite difference methods

I am simulating the price of a basket option with the help of equations from the report http://www.it.uu.se/edu/course/homepage/projektTDB/vt07/Presentationer/Projekt3/Dimension_Reduction_for_the_Black-Scholes_Equation.pdf .. I am a beginner in using Numerical methods in Finance.. hence I am stuck at probably the most trivial questions.. This paper uses BDF2 method.. The method includes performing PCA and then translating coordinates according to the following equations.. $$\bar{x}=\textbf{Q'} \ln(S) + b{\tau}$$ where $\tau=T-t$ and $b_i= \sum_{j=1}^d q_{ij} (r- \frac{\sigma_j^2}{2})$. I saw two different formulas in two different places.. alternate one was $b_i= \sum_{j=1}^d q_{ij} (r- \frac{\sigma_j}{2})$ , and I can't understand which one is correct. By applying change of variables to the Black Scholes Equation we get, $$\frac{\partial u}{\partial \tau} =\frac12 \sum\limits_{i=1}^d \lambda_i \frac{\partial^2 u}{\partial x_i^2}-ru$$ where $(\bar{x},\tau) \in \mathbb{R}^d \times (0,T)$ and $\lambda_i$ is the eigenvalue number $i$ of the covariance matrix. The payoff for the basket option is, $$u(\bar{x},0)=\max(\sum\limits_{i=1}^d \mu_i \exp(\sum_{j=1}^d q_{ij} x_j),0)$$ where $\bar{x} \in \mathbb{R}^d$. Now my question is.. What is in the vector U? According to me the dimension of U should be no_of_underlying_assets, but then I don't understand how spatial discretization plays a role here. I understand that the initial condition of U is the contract function(eq. 12) but then, it appears as a 1 x 1 scalar to me. Am quite confused here.

$u$ is the value of the option, and is in fact a scalar (which, of course, is a function its several underlyings). You're studying a single option on a basket, not a basket of options.
As for the two different formulas: you can pick the correct one just by looking at the units of its terms. The rate $r$ is the inverse of a time; each volatility $\sigma_j$ is the inverse of the square root of a time (you can see that from their definitions, or from their role in the Black-Scholes formula). The formula that combines them in a meaningful way is the one with the $\left( r - \frac{\sigma_j^2}{2} \right)$ term.