Solve PDE numerically

46 Views Asked by At

I am looking for some $f:[0,1]^2 \rightarrow R^+_0$ with

\begin{align} \lambda f(x,y)-\frac{1}{2}\Delta f(x,y)=x+y \end{align}

for $\lambda > 0$, with boundary conditions

\begin{align} f^1(0,y)-f^2(0,y)&=c_1, \quad \forall y \in [0,1] \\ f^1(1,y)&=c_2, \quad \forall y\in[0,1] \\ f^1(x,0)&=c_3, \quad \forall x\in[0,1] \\ f^1(x,b)&=c_4, \quad \forall x\in[0,1] \end{align}

where $\Delta$ defines the Laplace operator and $f^1:=\frac{d}{dx}f(x,y), \ f^2:=\frac{d}{dy}f(x,y)$.

I would like to solve this problem numerically but I don't know how to handle the first boundary condition. I would appreciate any suggestions.