Hi there. I am trying to self teach how to solve partial differential equations numerically using finite differences. I know this is a complex field, that requires much more knowledge of the theory than what I actually know, but anyway I wanted to try.

Anyway, I've tried to build my own differential equation, probably naively. I wanted to solve a first order partial differential equation, so I thought of taking the function:

And then, taking derivatives I build the differential equation:

, and I considered the interval

Then I considered the boundary conditions , , and .

I think that everything is correct until here, but I'm not sure, if anything is wrong please tell me.

Then I considered centered differences (I needed for centered difference to have the previous and forward steps in the equation, in order to propagate the solution from the boundaries). I've considered equal spacings in the y and x directions, with , , and , with N being the number of interior points in each axis, being and the points situated at the boundaries of the domain.

Under this conditions I've arrived to the set of equations:

Where I thought that

Then the discretized version of the boundary conditions would look like: [tex]u_{0,j}=\sin(-jh)[tex], , and .

But when I build the matrix and solve the linear system I get the result that the matrix is singular. So what would be the correct approach to this problem?