I am trying to solve the following PDE using FDM: $\frac{\partial^2 u}{\partial y^2} = x \frac{\partial u}{\partial x}$.
I discretized the independent variables as $x=x_0+i \Delta x$ and $y=y0+j \Delta y$. In my case,
$x_0=0=y_0$. I also descritized the derivaties and obtained the FDM as
$\frac{u_{i,j+1} -2 u_{i,j}+ u_{i,j-1} }{{\Delta y}^2} = i\Delta x \frac{u_{i,j}-u_{i-1,j}}{\Delta x}$.
Now, my question is, isn't it strange that the $\Delta x$ cancels? It apparently implies that the
accuracy of the solution is independent of the choice of $\Delta x$. However, I know a large $\Delta x$ introduces error into the solution.
The $x$-domain is semi-infinite in my problem.
Thanks.
The equation you give corresponds to a system of linear equations, whose solution is your estimation for u. However note that for any scalar $\alpha$ the equations $Ax = b$ and $\alpha A x = \alpha b$ have the same solution for $x$. So, you can always express this system of linear equations that only $\Delta x$ or $\Delta y$ show up, by applying some scalar first. In fact in might be beneficial to apply such a scalar for some numerical methods, although good solvers will be able to handle that themselves.
You should see both $\Delta x$ and $\Delta y$ appear in you error estimate! Usually you can find an error estimate by expanding the "real" solution as a Taylor series, see for example here.