I am trying to read some sources on how to implement the finite element method and I am having difficulty putting all the concepts together.
I can read and understand the Galerkin approach just fine. Then when I read the introduction to Sobolev spaces, weak derivatives, seminorms and Lax-Milgram it is a bit of a struggle but I can follow along with difficulty.
After you construct a bilinear form and a linear functional to reduce your differential equation to
$$a(u,v) = l(v)$$
however, I get completely lost. For example, the wikipedia entry here
provides an example which begins with constructing the weak formulation and partitioning the domain, but after that, I cannot follow how they arrive at the matrix form. In the subsection, "Matrix form of the problem", they are skipping a couple steps when substituting variables and rewriting the equation that I cannot follow both in terms of mechanical calculation and motivation.
Another example can be found here Finite Element Method for a Two-Point Problem where user sportingdan uses an ansatz equation to substitute into the weak formulation. Except again, I cannot figure out the motivation behind the ansatz equation, or even mechanically reproduce the substitution.
I am under the impression that the step I am having difficulty overcoming is related to the Galerkin approach, but at this point I have studied so many different norms that I am starting to lose confidence that I can properly manipulate any of these equations.
Edit: I forgot to add that I am also interested in how to handle the case where we have higher order basis functions, it seems to me that the only choice are to use uniform or non uniform kth order B-splines, but it isn't clear how much freedom I have to choose something else.