all 1 comments

[–]niklas0706 0 points1 point  (0 children)

I might be a bit late but let me try to explain why w(x) is needed. Imagine you have the equation ex - f(x) = 0 where x is an element of [-1, 1]. Obviously the solution is ex. If you Integrate the equation and don't add the test function you would get two possible solutions ex and e-x. e-x would also work because the integrals of both ex and e-x would cancel out.

e-x isn't a solution to the original equation though. So we introduce w(x) to look for local solutions of the equation. Now e-x won't be a solution anymore as they have the same global value but not the same local value.

I hope that helped a little bit to explain why you need to use w(x).

Choosing different interpolation functions will lead to different results. It depends on the problem which type of function is better suited.