# Finite Element formulation of mixed BVP of Variational Problem

Suppose we are given the followin where $$f$$,$$u$$, $$g$$ are given functions:

$$-\Delta u = f$$ in $$\Omega$$

$$u=u_o$$ on $$\Gamma_1$$

$$\frac{du}{dn}=g$$ on $$\Gamma_2$$

So in order for me to form the variational problem which is the first step, I did the following.

Assume $$u_o$$ is sufficiently smooth on $$\hat{\Gamma}$$ then, $$\hat{u}=u-u_o$$

This results in:

$$-\Delta \hat{u}= f$$ in $$\hat{\Omega}$$

$$\hat{u}=0$$ on $$\hat{\Gamma_1}$$

$$\frac{d\hat{u}}{dn}=g-\frac{du_o}{dn}$$

If I let $$V$$={$$v \in H^1(\Omega): v|_{\Gamma_1} = 0$$}

Then by applying my test function v and using Green's Formula, I can show that the new problem I've created is similar to the original problem and it results in:

$$\int_{\Omega} \nabla u \nabla vdx$$ = $$\int_{\Omega}fvdx+\int_{\Gamma_2}gv ds$$

where the bilinear case is $$a = \int_{\Omega} \nabla u \nabla vdx$$

the linear case is $$L(v) = \int_{\Omega}fvdx+\int_{\Gamma_2}gv ds$$

So now that I have gotten the variational problem finished I need to implement some finite element method.

So this would mean I need to find a basis function which I would pick a triangulation in some smaller subspace $$V_h=$${$$v_h$$ is continous, linear.},

$$\phi_j(x)= 1$$ if $$i=j$$ and $$0$$ if $$i\neq j$$

So then,

$$v_h=\sum_{j=1}^{M} \eta_j \phi_j(x)$$ are the linear combinations

Now essentially I need to get to some sort of formulation of the finite element method where I would have

$$A \zeta=b$$ and then I could get some sort formulation of what the A matrix would look like. I know the A matrix will be symmetric and positive definite. I know the following,

$$A_{ij}= <\phi_i' , \phi_j'>$$

$$b=$$

I'm stuck on the finite method part and I want to make sure I'm going about it the right way.