Basis functions that are one at a point and zero at others

59 Views Asked by At

1D basis functions

In 1D space, I'm looking for a set of basis functions like below. They would be equal to one at certain points and zero at others.

Schematic 1D

2D schematics

In 2D space, the basis function could be something below, taken from this reference:

Schematic FEM 2D

Sigmoid?

I don't want a conditional function with if and else. I'm just looking for a straightforward function that is easy to handle. Like what Sigmoid function provides for the step behavior: https://en.wikipedia.org/wiki/Sigmoid_function

Derivate of sigmoid

I was thinking about using derivative of the sigmoid function:

Derivative of sigmoid function

Question

Can anyone shed some light on the subject I'm exploring. Am I on the right path? Can sigmoid derivative be used as my basis functions?

Update

I realized I may be looking for a bump function: https://en.wikipedia.org/wiki/Bump_function but without the if else condition.

1

There are 1 best solutions below

0
On

The function $ \phi:\Bbb R\to [0,1] $ suggested by @SassatelliGiulio works:

$$ \phi(x) = \max\left(0,\min\left(\frac{x-x_0+\delta}{\delta},\frac{x_0+\delta-x}{\delta}\right)\right) $$

Which leads to:

$$ \phi(x) = \frac{\frac{\frac{x-x_0+\delta}{\delta}+\frac{x_0+\delta-x}{\delta}-\sqrt{\left(\frac{x-x_0+\delta}{\delta}-\frac{x_0+\delta-x}{\delta}\right)^2}}2+\sqrt{\left(\frac{\frac{x-x_0+\delta}{\delta}+\frac{x_0+\delta-x}{\delta}-\sqrt{\left(\frac{x-x_0+\delta}{\delta}-\frac{x_0+\delta-x}{\delta}\right)^2}}2\right)^2}}{2} $$

For $x_0 = 0.25$ and $\delta = 0.125$, the plot is:

Plot

The integral of the above plot from 0 to 1 is 0.125.