Applying the Finite Element Method to a II order ODE with nonlinear source term

172 Views Asked by At

I'm trying to apply the FEM to a 1D Poisson equation

$ - u''(x) = f(x,u(x))$

subject to constraints $u(0) = u(1) = 0$, with a nonlinear source term of the type

$f = \dfrac{1}{1 + e^{-a \cdot u(x)}} + e^{-b\cdot u(x)} \cdot H(x)$

where $H(x)$ is piecewise constant function defined as

$ \begin{cases} -1& \text{for} \quad 0\leq x < x_0\\ +1& \text{for} \quad x_0 \leq x \leq 1 \end{cases} $

I'm stuck when trying to apply the Galerkin method to discretization to the weak formulation:

$ \sum_j u_j \int \varphi_i' \varphi_j' \,dx = \int f(x,u(x)) \varphi_i dx $

where $\{\varphi(x)\}$ is a Lagrange polynomial basis. Now, to solve this non-linear problem, somebody told me that it's possible to expand the $f$ function in the same basis used for the $u(x)$, i.e.

$ f = \sum_j f(u_j) \varphi(x)$

in order to obtain

$ \sum_j u_j \int \varphi_j' \varphi_i' \,dx = \sum_j f(u_j) \int \varphi_j \varphi_i dx $

which can be solved through Newton's method. However, i'm not convinced by the expansion of $f$, which leads to my question: since it contains discontinuities, it doesn't belong to the same space $\mathcal{H}^1$ as the $u(x)$, so wouldn't another, larger basis be required to do so? Is there a serious flaw in my line of reasoning?