# Singularity function

Singularity functions are a class of discontinuous functions that contain singularities, i.e., they are discontinuous at their singular points. Singularity functions have been heavily studied in the field of mathematics under the alternative names of generalized functions and distribution theory. The functions are notated with brackets, as $\langle x-a\rangle ^{n}$ where n is an integer. The "$\langle \rangle$" are often referred to as singularity brackets . The functions are defined as:
    n $\langle x-a\rangle ^{n}$ $<0$ ${\frac {d^{|n+1|}}{dx^{|n+1|}}}\delta (x-a)\,$ -2 ${\frac {d}{dx}}\delta (x-a)\,$ -1 $\delta (x-a)\,$ 0 $H(x-a)\,$ 1 $(x-a)H(x-a)\,$ 2 $(x-a)^{2}H(x-a)$ $\geq 0$ $(x-a)^{n}H(x-a)$
where: δ(x) is the Dirac delta function, also called the unit impulse. The first derivative of δ(x) is also called the unit doublet. The function $H(x)$ is the Heaviside step function: H(x) = 0 for x < 0 and H(x) = 1 for x > 0. The value of H(0) will depend upon the particular convention chosen for the Heaviside step function. Note that this will only be an issue for n = 0 since the functions contain a multiplicative factor of x − a for n > 0. $\langle x-a\rangle ^{1}$ is also called the Ramp function.

## Integration

Integrating $\langle x-a\rangle ^{n}$ can be done in a convenient way in which the constant of integration is automatically included so the result will be 0 at x = a.
$\int \langle x-a\rangle ^{n}dx={\begin{cases}\langle x-a\rangle ^{n+1},&n<0\\{\frac {\langle x-a\rangle ^{n+1}}{n+1}},&n\geq 0\end{cases}}$

## Example beam calculation

The deflection of a simply supported beam, as shown in the diagram, with constant cross-section and elastic modulus, can be found using Euler–Bernoulli beam theory. Here, we are using the sign convention of downward forces and sagging bending moments being positive.
Load distribution:
    $w=-3{\text{ N}}\langle x-0\rangle ^{-1}\ +\ 6{\text{ Nm}}^{-1}\langle x-2{\text{ m}}\rangle ^{0}\ -\ 9{\text{ N}}\langle x-4{\text{ m}}\rangle ^{-1}\ -\ 6{\text{ Nm}}^{-1}\langle x-4{\text{ m}}\rangle ^{0}\$
Shear force:
    $S=\int w\,dx$
    $S=-3{\text{ N}}\langle x-0\rangle ^{0}\ +\ 6{\text{ Nm}}^{-1}\langle x-2{\text{ m}}\rangle ^{1}\ -\ 9{\text{ N}}\langle x-4{\text{ m}}\rangle ^{0}\ -\ 6{\text{ Nm}}^{-1}\langle x-4{\text{ m}}\rangle ^{1}\,$
Bending moment:
    $M=-\int S\,dx$
    $M=3{\text{ N}}\langle x-0\rangle ^{1}\ -\ 3{\text{ Nm}}^{-1}\langle x-2{\text{ m}}\rangle ^{2}\ +\ 9{\text{ N}}\langle x-4{\text{ m}}\rangle ^{1}\ +\ 3{\text{ Nm}}^{-1}\langle x-4{\text{ m}}\rangle ^{2}\,$
Slope:
    $u'={\frac {1}{EI}}\int M\,dx$
    Because the slope is not zero at x = 0, a constant of integration, c, is added
    $u'={\frac {1}{EI}}\left({\frac {3}{2}}{\text{ N}}\langle x-0\rangle ^{2}\ -\ 1{\text{ Nm}}^{-1}\langle x-2{\text{ m}}\rangle ^{3}\ +\ {\frac {9}{2}}{\text{ N}}\langle x-4{\text{ m}}\rangle ^{2}\ +\ 1{\text{ Nm}}^{-1}\langle x-4{\text{ m}}\rangle ^{3}\ +\ c\right)\,$
Deflection:
    $u=\int u'\,dx$
    $u={\frac {1}{EI}}\left({\frac {1}{2}}{\text{ N}}\langle x-0\rangle ^{3}\ -\ {\frac {1}{4}}{\text{ Nm}}^{-1}\langle x-2{\text{ m}}\rangle ^{4}\ +\ {\frac {3}{2}}{\text{ N}}\langle x-4{\text{ m}}\rangle ^{3}\ +\ {\frac {1}{4}}{\text{ Nm}}^{-1}\langle x-4{\text{ m}}\rangle ^{4}\ +\ cx\right)\,$
The boundary condition u = 0 at x = 4 m allows us to solve for c = −7 Nm$^2$