Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

 Open In Colab

Yet another method involves invoking our interpolator methods to model the solution directly. The process is:

  1. Determine a set of (possibly unevenly spaced) points, xix_i.

  2. Define an interpolator function with unknown parameters wiw_i.

  3. Apply the ODE at each point and find a residual, R(wi)=y′(wi)−f(xi,yi(wi))R(w_i) = y^\prime(w_i) - f\big(x_i, y_i(w_i)\big)

  4. Solve (root find or in least squares) for the interpolator parameters.

We can apply a number of interpolators to this scheme, but some common ones include:

  • Splines (1D / 2D)

  • Radial Basis Functions (ND)

  • Neural Networks

  • Spectral methods

Spectral methods in this context refers to the use of special basis functions (Sin / cos, Chebychev, Legenre polynomials, etc) with associated optimal collocation points.

Pros / Cons

Benefits:

  • Flexibility: Can handle complex geometries and irregular domains.

  • High Accuracy: Often provides high accuracy with fewer collocation points, especially with higher-order polynomials.

  • Versatility: Suitable for a wide range of problems, including ODEs and PDEs.

  • Spectral Methods: Achieve exponential convergence for smooth problems when using spectral collocation (e.g., Chebyshev or Legendre polynomials).

Drawbacks:

  • Complexity: More complex to implement compared to FDM, especially for higher-order methods.

  • Computational Cost: Can be computationally expensive due to the need to solve large systems of equations.

  • Stability: Requires careful selection of collocation points to ensure stability and convergence.

Example: Splines

∂2y∂t2=−g,y(0)=0,y(5)=50\frac{\partial^2 y}{\partial t^2} = -g, \quad y(0) = 0, y(5) = 50
<Figure size 640x480 with 1 Axes>

Example: RBFs

Use RBFs to solve

∇2u=4\nabla^2 u = 4

on the unit square where u(x=0,1,y)=u(x,y=0,1)=0u(x=0,1,y) = u(x, y=0,1) = 0.

<Figure size 800x600 with 2 Axes>