I'm working on this question:
$(2)$ Solve the two-dimensional Poisson problem $$\Delta u+\lambda u=f\quad\text{in}\quad\Omega=(0,1)^2$$ subject to homogeneous Dirichlet boundary conditions using a fast Poisson solver. You will have to adjust the code $\mathtt{fastpoissonD2d.m}$ and you have to turn in a hardcopy of your code. In addition, apply your code to the specific problem $\lambda=100$ and $f(x,y)=-2x+3y$, and include images of the solution $u$ for discretization sizes $N=128$ and $N=256$.
I've worked through most of the problem. The issue I'm having is that the code we're given is for u'' = -1. I have no idea how to incorporate the u and the eigenvalue into the solver, although I have incorporated the given function.
My question is there is this bit of code: Leig = (((2*cos(pi*(1:N-1)'/N))-2)ones(1,N-1)) + ... (ones(N-1,1)((2*cos(pi*(1:N-1)/N))-2)); I have no what this does, perhaps it would answer my question. If someone could join me in http://collabedit.com/qt5c8 and we could converse about the code together?