Problem
I want to convert the general second order linear PDE problem \begin{align} \begin{cases} a(x,y)\frac{\partial^2 u}{\partial x^2}+b(x,y) \frac{\partial^2 u}{\partial y^2} +c(x,y)\frac{\partial^2 u}{\partial x \partial y}\\+d(x,y)\frac{\partial u}{\partial x}+e(x,y)\frac{\partial u}{\partial y}+f(x,y)u=g(x,y) & \text{in } R \text{ PDE} \\ u=u^* & \text{on } S_1 \text{ Dirchlet boundary condition} \\ \dfrac{\partial u}{\partial n}=q^* & \text{on } S_2 \text{ Neumann boundary condition} \\ \dfrac{\partial u}{\partial n}=r^*_1-r^*_2 u & \text{on } S_3 \text{ Robin boundary condition} \\ \end{cases} \end{align} into a weak form suitable for the finite element method. That is into the weak bilinear form $B(u,v)=L(v)$ where $B$ is bilinear, symmetric and positive definite functional and $L$ is a linear functional.
Work thus far
I know to how convert the following
\begin{align}
\begin{cases}
\dfrac{\partial^2 u}{\partial x^2}+\dfrac{\partial^2 u}{\partial y^2}+u=g(x,y) & \text{in } R \text{ PDE} \\
u=u^* & \text{on } S_1 \text{ Dirchlet boundary condition} \\
\dfrac{\partial u}{\partial n}=q^* & \text{on } S_2 \text{ Neumann boundary condition} \\
\dfrac{\partial u}{\partial n}=r^*_1-r^*_2 u & \text{on } S_3 \text{ Robin boundary condition} \\
\end{cases}
\end{align}
into the weak bilinear form $B(u,v)=L(v)$ where $B$ is bilinear, symmetric and positive definite and $L$ is linear. The steps are as follows (note that $v$ is our test function)
\begin{align}
\int \int_{R} \left(\frac{\partial^2 u}{\partial x^2}+\frac{\partial^2 u}{\partial y^2}+u \right) v \ dA &= \int \int_{R} g(x,y) v \ dA
\end{align}
Using the identity
\begin{align}
\int \int_{R} v \nabla^2 u\ dA &= \int_{S} v \frac{\partial u}{\partial n}\ ds-\int\int_{R} \nabla u \cdot \nabla v\ dA
\end{align}
We get
\begin{align}
\int \int_R -\nabla u \cdot \nabla v +uv \ dA &= \int \int_R g v \ dA - \int_{S} v \frac{\partial u}{\partial n}\ ds \\
\int \int_R -\nabla u \cdot \nabla v +uv \ dA &= \int \int_R g v \ dA - \int_{S_1} v \frac{\partial u}{\partial n}\ ds- \int_{S_2} v \frac{\partial u}{\partial n}\ ds - \int_{S_3} v \frac{\partial u}{\partial n}\ ds \\
\int \int_R -\nabla u \cdot \nabla v +uv \ dA &= \int \int_R g v \ dA - \int_{S_2} v q^* \ ds - \int_{S_3} v (r^*_1-r^*_2 u) \ ds \\
\int \int_R -\nabla u \cdot \nabla v +uv \ dA &= \int \int_R g v \ dA - \int_{S_2} v q^* \ ds - \int_{S_3} v r^*_1\ ds +\int_{S_3} r^*_2 uv \ ds \\
\int \int_R -\nabla u \cdot \nabla v +uv \ dA +\int_{S_3} r^*_2 uv \ ds &= \int \int_R g v \ dA - \int_{S_2} v q^* \ ds - \int_{S_3} v r^*_1\ ds \\
B(u,v)&=L(v)
\end{align}
Where I am having trouble
I do not know what to do with the terms $$c(x,y)\frac{\partial^2 u}{\partial x \partial y}+d(x,y)\frac{\partial u}{\partial x}+e(x,y)\frac{\partial u}{\partial y}$$ as using the divergence theorem/integration by parts used in the work thus far section leaves terms that are not symmetric and therefore does not not satisfy the requirements for $B(u,v)$.
The other problem are the terms $$a(x,y)\frac{\partial^2 u}{\partial x^2}+b(x,y) \frac{\partial^2 u}{\partial y^2}$$ the identity that I used in the work thus far section does not work (I am probably wrong on this part).
I could really use some guidance on both of these problems.
Notes
- This question is part of a much larger problem in which I have to use the finite element method. Once the problem is in a weak form in which the finite element/galerkin method can be applied I know what to do. From what I know the symmetry of $B(u,v)$ is essential. If there is some other weak form that works with the finite element (that is suitable for a numerical solution), that would be an acceptable answer to my problem.
- I have been following "Finite Elements: A Gentle Introduction" I could not find anything in the book that answered the problem. If you have any references that covers my problem that would be great (so far I have found nothing).
- If you have any questions feel free to ask.
- I originally posted this question on math stack exchange. I reposted the question here as it relevant and could bring more interest to my problem.
Notation
- $n$ is the vector normal to the boundary surface.
- $u(x,y)$ is the solution to the given PDE or ODE. $v(x,y)$ is a test function.
- $\int \int_{R} * \ dA$ is an integral over region $R$. $\int_{S} * ds$ is a surface integral over $S$.
- $u^*, q^*, r^*_1, r^*_2, r^*_3$ are either constants or functions used to define the boundary conditions.
- The surface (S) boundary conditions can be divided into Dirchlet, Neumann, and Robin boundary conditions. That is $S=S_1\cup S_2 \cup S_3$.