\documentclass{article}
\usepackage{graphicx}
\author{sun xichao}
\title{programming of FEM}
\usepackage[top=1in, bottom=1in, left=1.25in, right=1.25in]{geometry}
\begin{document}
\maketitle
\begin{equation}
\left\{
\begin{array}{cc}
-\Delta u+u^2=f(x,y) & (x,y) \in [0,1]\times[0,1]\\
u=0 & (x,y) \in \partial\Omega
\end{array}
\right.
\end{equation}
After the Galerkin variation,we get the equation:
\begin{equation}
\int_{\Omega} \nabla u\cdot\nabla v d \Omega+\int_{\Omega}u^{2} \cdot v d\Omega=\int_{\Omega}f\cdot v d{\Omega}
\quad where \quad v|_{\partial \Omega}=0
\end{equation}
we sets\\
$$a(u,v)=\int_{\Omega} \nabla u \nabla v d\Omega$$\\
$$b(u,u,v)=\int_{\Omega} u^{2} v d\Omega$$\\
$$(f,v)=\int_{\Omega}f\cdot vd{\Omega}$$
\\and the weak solution of (1) can be converted into:\\
find $u_{h}\in U=V=\{H_{0}^{1},v|_{\partial\Omega}=0\}$\quad st.\\
\begin{equation}
a(u_{h},v_{h})+b(u_{h},u_{h},v_{h})=(f,v_{h}) \qquad where \quad v_{h}\in V
\end{equation}
For solving the equation (3),we subdivide the $\Omega=[0,1]\times[0,1]$ into the chart below.
\begin{figure}
% Requires \usepackage{graphicx}
\centering \includegraphics[width=100pt]{FEM.png}\\
\en
\usepackage{graphicx}
\author{sun xichao}
\title{programming of FEM}
\usepackage[top=1in, bottom=1in, left=1.25in, right=1.25in]{geometry}
\begin{document}
\maketitle
\begin{equation}
\left\{
\begin{array}{cc}
-\Delta u+u^2=f(x,y) & (x,y) \in [0,1]\times[0,1]\\
u=0 & (x,y) \in \partial\Omega
\end{array}
\right.
\end{equation}
After the Galerkin variation,we get the equation:
\begin{equation}
\int_{\Omega} \nabla u\cdot\nabla v d \Omega+\int_{\Omega}u^{2} \cdot v d\Omega=\int_{\Omega}f\cdot v d{\Omega}
\quad where \quad v|_{\partial \Omega}=0
\end{equation}
we sets\\
$$a(u,v)=\int_{\Omega} \nabla u \nabla v d\Omega$$\\
$$b(u,u,v)=\int_{\Omega} u^{2} v d\Omega$$\\
$$(f,v)=\int_{\Omega}f\cdot vd{\Omega}$$
\\and the weak solution of (1) can be converted into:\\
find $u_{h}\in U=V=\{H_{0}^{1},v|_{\partial\Omega}=0\}$\quad st.\\
\begin{equation}
a(u_{h},v_{h})+b(u_{h},u_{h},v_{h})=(f,v_{h}) \qquad where \quad v_{h}\in V
\end{equation}
For solving the equation (3),we subdivide the $\Omega=[0,1]\times[0,1]$ into the chart below.
\begin{figure}
% Requires \usepackage{graphicx}
\centering \includegraphics[width=100pt]{FEM.png}\\
\en