MWLS Method - Edupanda

Edupanda » Numerical Methods » MWLS Method

MWLS Method

The Moving Weighted Least Squares (MWLS) method is a relatively new and advanced approximation method that is used, for example, in the meshless Galerkin method (MGM).

We won't analyze the mathematical background of this method, as it is highly complicated and, honestly, not entirely necessary to learn how to apply it.

Solution procedure for the 1D (one-dimensional) case:

  1. We write the function value using Taylor series expansion (in practice, most often Maclaurin series, since when possible we assume \(a=0\)):
    \[ \begin{aligned} f(x) &= f(a) + \frac{f'(a)}{1!}(x-a) + \frac{f''(a)}{2!}(x-a)^2 + \dots \\ &\quad + \frac{f^{(n)}(a)}{n!}(x-a)^n + \dots \\ &= \sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!}(x-a)^n \end{aligned} \]

    For \( a = 0 \):

    \[ \begin{aligned} f(x) &= f(0) + \frac{f'(0)}{1!} x + \frac{f''(0)}{2!} x^2 + \dots \\ &= \sum_{n=0}^{\infty} \frac{f^{(n)}(0)}{n!} x^n \end{aligned} \]

    The degree of approximation determines the number of elements we examine, e.g., for approximation degree \( p=1 \), we write the formula only up to and including the first derivative.

  2. We write the error function:
    \[ \begin{aligned} J &= (\tilde{u}_1 - u_1)^2 \cdot \left( \frac{1}{h^{p+1-s}} \right)^2 \\ &\quad + (\tilde{u}_1 - u'_1)^2 \cdot \left( \frac{1}{h^{p+1-s}} \right)^2 \\ &\quad + (\tilde{u}_2 - u_2)^2 \cdot \left( \frac{1}{h^{p+1-s}} \right)^2 + \dots \end{aligned} \]

    For all elements that are known.

  3. We minimize the error function with respect to the value being examined, e.g., \( u_1 \):
    \[ \begin{aligned} \frac{d}{du_1} J = 0 \end{aligned} \]

    And based on this, we calculate the sought value.