The ChebyshevU weight is the measure on [-1,1] with the Chebyshev weight function of the second kind w(x) = √(1-x^2).


A DiscreteWeight is a measure defined in terms of a discrete set of points and an associated set of weights.

The measure implements the points and weights functions.


The Duffy transform maps the unit square to the unit simplex.

It does so by collapsing the rightmost edge onto the x-axis.


Representation of a weight mapped to a new weight.

Given a weight w(x)dx and a map y=m(x), the mapped weight is defined as w(m(x))/J(m(x))dx, where J is the jacobian determinant of m.

The definition is such that we have the following equality after a change of variables:

integral(t->f(t), domain, weight) = integral(t -> f(inverse(m,t))), m.(domain), MappedWeight(m, weight)


A one-form is a map V → K, i.e., it is a generic function of one argument.

A one-form is applied to an argument using the F(f) syntax, which itself invokes form(F::OneForm, f). The form function can be specialized for concrete types of F and f.

The main use cases in DomainIntegrals.jl are a lazy Integral object and a quadratic form that derives from a bilinear form.


A Property type describes a property of the integrand that is independent from the other aspects of the integral (domain, measure).

The main examples are singularities of the integrand function, i.e., smoothness properties.


A two-form is a map V x W → K, i.e., it is a generic function of two arguments.

The two-form is applied to two arguments using the F(f,g) syntax, which itself invokes form(F::TwoForm, f, g). The form function can be specialized for concrete types of F, f and g.


A list of breakpoints of the integrand, for example because the integrand is piecewise smooth.


A Weight is a continuous measure that is defined in terms of a weight function: dμ = w(x) dx.

cauchy_integral(f [; a = 0, n  = 1, radius = 1])

Evaluate the integral of n!/(2πi) f(z)/(z-a)^n along a circular contour with radius radius around the point a.

If the integrand is analytic inside the contour except at the pole around z=a then its value should correspond to the derivative f^(n)(a).


Apply a two-form to the given arguments.

form(F::TwoForm, f, g)

By default, form invokes form1 which in turn invokes form2. The form function itself can be specialized on the type of F without ambiguity. Similarly, form1 and form2 can be specialized without ambiguity on the types of f and g respectively.

Each of these functions can be specialized on all three types involved, as long as the main type is at least as specific as any other specialization.


Helper function for form(F, f, g) that can be specialized on the type of f.


Helper function for form(F, f, g) that can be specialized on the type of g.


Construct a graded quadrature rule towards the left of the unit interval.

The rule is a composite quadrature rule on intervals of the form σ^(k+1):σ^k. The number of points on interval i is ⌈n*i*μ⌉, where μ is an optional parameter.


Compute an integral of the given integrand on the given domain, or with the given measure.


integral(cos, 0.0..1.0)

Transform the integral problem based on the supplied properties.

For example, if the integrand is known to be singular, then the domain may be split into several components such that there are no singularities in the interior.


Split the domain into a list of domains, such that any singularity lies on the boundary of one or more of the constituting parts.

Care is taken to avoid a singularity in the interior due to roundoff errors.