# Fokas method

The Fokas method, or unified transform, is an algorithmic procedure for analysing boundary value problems for linear partial differential equations and for an important class of nonlinear PDEs belonging to the so-called integrable systems. It is named after Greek mathematician Athanassios S. Fokas.

Traditionally, linear boundary value problems are analysed using either integral transforms and infinite series, or by employing appropriate fundamental solutions.

## Integral transforms and infinite series

For example, the Dirichlet problem of the heat equation on the half-line, i.e., the problem

${\displaystyle u_{t}=u_{xx},\quad 00,}$

(Eq.1)

${\displaystyle u(x,0)=u_{0}(x),\quad 00,}$

(Eq.2)

${\displaystyle u_{0}}$ and ${\displaystyle g_{0}}$ given, can be solved via the sine-transform. The analogous problem on a finite interval can be solved via an infinite series. However, the solutions obtained via integral transforms and infinite series have several disadvantages:

1. The relevant representations are not uniformly convergent at the boundaries. For example, using the sine-transform, equations Eq.1 and Eq.2 imply

${\displaystyle u(x,t)={\frac {2}{\pi }}\int _{0}^{\infty }\sin(\lambda x)e^{-\lambda ^{2}t}\left[\int _{0}^{\infty }\sin(\lambda y)u_{0}(y)\,dy+\lambda \int _{0}^{t}e^{\lambda ^{2}\tau }g_{0}(\tau )\,d\tau \right]\,d\lambda .}$

(Eq.3)

For ${\displaystyle g_{0}(t)\neq 0}$, this representation cannot be uniformly convergent at ${\displaystyle x=0}$, otherwise one could compute ${\displaystyle u(0,t)}$ by inserting the limit ${\displaystyle x\rightarrow 0}$ inside the integral of the rhs of Eq.3 and this would yield zero instead of ${\displaystyle g_{0}(t)}$.

2. The above representations are unsuitable for numerical computations. This fact is a direct consequence of 1.

3. There exist traditional integral transforms and infinite series representations only for a very limited class of boundary value problems.
For example, there does not exist the analogue of the sine-transform for solving the following simple problem:

${\displaystyle u_{t}+u_{xxx}=0,\quad 00,}$

(Eq.4)

supplemented with the initial and boundary conditions Eq.2.

For evolution PDEs, the Fokas method:

1. Constructs representations which are always uniformly convergent at the boundaries.
2. These representations can be used in a straightforward way, for example using MATLAB, for the numerical evaluation of the solution.
3. Constructs representations for evolution PDEs with spatial derivatives of any order.

In addition, the Fokas method constructs representations which are always of the form of the Ehrenpreis fundamental principle.

## Fundamental solutions

For example, the solutions of the Laplace, modified Helmholtz and Helmholtz equations in the interior of the two-dimensional domain ${\displaystyle \Omega }$, can be expressed as integrals along the boundary of ${\displaystyle \Omega }$. However, these representations involve both the Dirichlet and the Neumann boundary values, thus since only one of these boundary values is known from the given data, the above representations are not effective. In order to obtain an effective representation, one needs to characterize the generalized Dirichlet to Neumann map; for example, for the Dirichlet problem one needs to obtain the Neumann boundary value in terms of the given Dirichlet datum.

For elliptic PDEs, the Fokas method:

1. Provides an elegant formulation of the generalised Dirichlet to Neumann map by deriving an algebraic relation, called the global relation, which couples appropriate transforms of all boundary values.
2. For simple domains and a variety of boundary conditions the global relation can be solved analytically. Furthermore, for the case that ${\displaystyle \Omega }$ is an arbitrary convex polygon, the global relation can be solved numerically in a straightforward way, for example using MATLAB. Also, for the case that ${\displaystyle \Omega }$ is a convex polygon, the Fokas method constructs an integral representation in the Fourier complex plane. By using this representation together with the global relation it is possible to compute the solution numerically inside the polygon in a straightforward semi-analytic manner.

## The forced heat equation on the half-line

Let ${\displaystyle u(x,t)}$ satisfy the forced heat equation

${\displaystyle u_{t}-u_{xx}=f(x,t),\ 00,}$

(Eq.5)

supplemental with the initial and boundary conditions Eq.2, where ${\displaystyle g(t),\ u_{0}(x),\ f(x,t)}$ are given functions with sufficient smoothness, which decay as ${\displaystyle x\rightarrow \infty }$.

The unified transform involves the following three simple steps.

1. By employing the Fourier transform pair

${\displaystyle {\widehat {f}}(\lambda )=\int _{0}^{\infty }e^{-i\lambda x}f(x)\,dx,\quad \operatorname {Im} \lambda \leq 0;}$
${\displaystyle f(x)={\frac {1}{2\pi }}\int _{-\infty }^{\infty }e^{i\lambda x}{\hat {f}}(\lambda )\,d\lambda ,\quad 0

(Eq.6)

obtain the global relation.
For equation Eq.5, we find

${\displaystyle e^{\lambda ^{2}t}{\hat {u}}(\lambda ,t)=Q(\lambda ,t)-{\tilde {g_{1}}}(\lambda ^{2},t)-i\lambda {\tilde {g_{0}}}(\lambda ^{2},t),\quad \operatorname {Im} \lambda \leq 0,}$

(Eq.7)

where the functions ${\displaystyle {\hat {u}},\ Q,\ {\tilde {g_{1}}}}$ and ${\displaystyle {\tilde {g_{0}}}}$ are the following integral transforms:

${\displaystyle {\widehat {u}}(\lambda ,t)=\int _{0}^{\infty }e^{-i\lambda x}u(x,t)\,dx,\ \operatorname {Im} \lambda \leq 0,}$
${\displaystyle Q(\lambda ,t)=\int _{0}^{\infty }e^{-i\lambda x}u_{0}(x)dx+\int _{0}^{t}\,d\tau \int _{0}^{\infty }dx\,e^{-i\lambda x+\lambda ^{2}\tau }f(x,\tau ),\quad \operatorname {Im} \lambda \leq 0,}$
${\displaystyle {\tilde {g_{1}}}(\lambda ^{2},t)=\int _{0}^{t}e^{\lambda ^{2}\tau }u_{x}(0,\tau )\,d\tau ,\quad {\tilde {g_{0}}}(\lambda ^{2},t)=\int _{0}^{t}e^{\lambda ^{2}\tau }u(0,\tau )\,d\tau ,\quad \lambda \in \mathbb {C} .}$

(Eq.8)

This step is similar with the first step used for the traditional transforms. However, equation Eq.7 involves the t-transforms of both ${\displaystyle u(0,t)}$ and ${\displaystyle u_{x}(0,t)}$, whereas in the case of the sine-transform ${\displaystyle u_{x}(0,t)}$ does not appear in the analogous equation (similarly, in the case of the cosine-transform only ${\displaystyle u_{x}(0,t)}$ appears). On the other hand, equation Eq.7 is valid in the lower-half complex ${\displaystyle \lambda }$-plane, wheres the analogous equations for the sine and cosine transforms are valid only for ${\displaystyle \lambda }$ real. The Fokas method is based on the fact that equation Eq.7 has a large domain of validity.

2. By using the inverse Fourier transform, the global relation yields an integral representation on the real line. By deforming the real axis to a contour in the upper half ${\displaystyle \lambda }$-complex plane, it is possible to rewrite this expression as an integral along the contour ${\displaystyle \partial D^{+}}$, where ${\displaystyle \partial D^{+}}$ is the boundary of the domain ${\displaystyle D^{+}}$, which is the part of ${\displaystyle D}$ in the upper half complex ${\displaystyle \lambda }$ plane, with ${\displaystyle D}$ defined by

${\displaystyle D:\{\lambda \in \mathbb {C} ,\ \Re \ \omega (\lambda )<0\},}$ where ${\displaystyle \omega (\lambda )}$ is defined by the requirement that ${\displaystyle e^{i\lambda x+\omega (\lambda )t}}$ solves the given PDE.
Figure 1: The curve ${\displaystyle \partial D^{+}}$
For equation Eq.5, equations Eq.6 and Eq.7 imply
${\displaystyle u(x,t)={\frac {1}{2\pi }}\int _{-\infty }^{\infty }e^{i\lambda x-\lambda ^{2}t}Q(\lambda ,t)\,d\lambda -{\frac {1}{2\pi }}\int _{\partial D^{+}}e^{i\lambda x-\lambda ^{2}t}[{\tilde {g_{1}}}(\lambda ^{2},t)+i\lambda {\tilde {g_{0}}}(\lambda ^{2},t)]\,d\lambda ,}$

(Eq.9)

where the contour ${\displaystyle \partial D^{+}}$ is depicted in figure 1.

In this case, ${\displaystyle \omega (\lambda )=-\lambda ^{2}=-|\lambda |^{2}e^{2i\theta }}$, where ${\displaystyle \theta ={\rm {{arg}\lambda }}}$. Thus, ${\displaystyle \Re \ \omega (k)<0}$ implies ${\displaystyle \sin 2\theta >0}$, i.e., ${\displaystyle -{\frac {\pi }{4}}<\theta <{\frac {\pi }{4}}}$ and ${\displaystyle {\frac {3\pi }{4}}<\theta <{\frac {5\pi }{4}}}$.
The fact that the real axis can be deformed to ${\displaystyle \partial D^{+}}$ is a consequence of the fact that the relevant integral is an analytic function of ${\displaystyle \lambda }$ which decays in ${\displaystyle D^{+}}$ as ${\displaystyle \lambda \rightarrow \infty }$.[1]

3. By using the global relation and by employing the transformations in the complex-${\displaystyle \lambda }$ plane which leave ${\displaystyle \omega (\lambda )}$ invariant, it is possible to eliminate from the integral representation of ${\displaystyle u(x,t)}$ the transforms of the unknown boundary values. For equation Eq.5, ${\displaystyle \omega (\lambda )=\lambda ^{2}}$, thus the relevant transformation is ${\displaystyle \lambda \rightarrow -\lambda }$. Using this transformation, equation Eq.7 becomes

${\displaystyle e^{\lambda ^{2}t}{\hat {u}}(-\lambda ,t)=Q(-\lambda ,t)-{\tilde {g_{1}}}(\lambda ^{2},t)+i\lambda {\tilde {g_{0}}}(\lambda ^{2},t),\quad \operatorname {Im} \lambda \geq 0.}$

(Eq.10)

In the case of the Dirichlet problem, solving equation Eq.10 for ${\displaystyle {\tilde {g_{1}}}}$ and substituting the resulting expression in Eq.9 we find

${\displaystyle u(x,t)={\frac {1}{2\pi }}\int _{-\infty }^{\infty }e^{i\lambda x-\lambda ^{2}t}Q(\lambda ,t)\,d\lambda -{\frac {1}{2\pi }}\int _{\partial D^{+}}e^{i\lambda x-\lambda ^{2}t}[2i\lambda {\tilde {g_{0}}}(\lambda ^{2},t)+Q(-\lambda ,t)]\,d\lambda .}$

(Eq.11)

If is important to note that the unknown term ${\displaystyle {\hat {u}}(-\lambda ,t)}$ does not contribute to the solution ${\displaystyle u}$. Indeed, the relevant integral involves the term ${\displaystyle e^{i\lambda x}{\hat {u}}(-\lambda ,t)}$, which is analytic and decays as ${\displaystyle \lambda \rightarrow \infty }$ in ${\displaystyle D^{-}}$, thus Jordan's lemma implies that ${\displaystyle {\hat {u}}(-\lambda ,t)}$ yields a zero contribution.
Equation Eq.11 can be rewritten in a form which is consistent with the Ehrenpreis fundamental principle: if the boundary condition is specified for ${\displaystyle 0<\tau , where ${\displaystyle T}$ is a given positive constant, then using Cauchy's integral theorem, it follows that Eq.11 is equivalent with the following equation:

${\displaystyle u(x,t)={\frac {1}{2\pi }}\int _{-\infty }^{\infty }e^{i\lambda x-\lambda ^{2}t}Q(\lambda )\,d\lambda -{\frac {1}{2\pi }}\int _{\partial D^{+}}e^{i\lambda x-\lambda ^{2}t}[Q(-\lambda )+2i\lambda {\tilde {g_{0}}}(\lambda ^{2})]\,d\lambda ,}$

(Eq.12)

where

${\displaystyle Q(\lambda )={\widehat {u}}_{0}(\lambda )+\int _{0}^{\infty }dx\int _{0}^{T}dt\,e^{-i\lambda x+\lambda ^{2}t}f(x,t),}$
${\displaystyle {\tilde {g_{0}}}(\lambda ^{2})=\int _{0}^{T}e^{\lambda ^{2}t}g_{0}(t)\,dt.}$

Uniform convergence
The unified transform constructs representations which are always uniformly convergent at the boundaries. For example, evaluating Eq.12 at ${\displaystyle x=0}$, and then letting ${\displaystyle \lambda \rightarrow -\lambda }$ in the first term of the second integral in the rhs of Eq.12, it follows that

${\displaystyle u(0,t)=-{\frac {i}{\pi }}\int _{\partial D}e^{-\lambda ^{2}t}\lambda {\tilde {g_{0}}}(\lambda ^{2})\,d\lambda .}$

The change of variables ${\displaystyle \lambda =e^{\frac {i\pi }{4}}{\sqrt {k}}}$, ${\displaystyle k>0}$, implies that ${\displaystyle u(0,t)=g(t)}$.

Numerical evaluation It is straightforward to compute the solution numerically using quadrature after the contour has been deformed to ensure exponential decay of the integrand.[2] For simplicity we concentrate on the case that the relevant transforms can be computed analytically. For example,

${\displaystyle f(x,t)=0,\ u_{0}(x)=e^{-a^{2}x},\ g_{0}(t)=\cos(bt),\ a,b,{\text{real constants}}.}$

Then, equation Eq.11 becomes

${\displaystyle 2\pi u(x,t)=\int _{-\infty }^{\infty }{\frac {e^{i\lambda x-\lambda ^{2}t}}{i\lambda +a^{2}}}\,d\lambda -\int _{\partial D^{+}}e^{i\lambda x-\lambda ^{2}t}\left[{\frac {1}{-i\lambda +a^{2}}}+{\frac {i\lambda }{\lambda +ib}}{\bigl (}e^{(\lambda ^{2}+ib)t}-1{\bigr )}+{\frac {i\lambda }{\lambda -ib}}{\bigl (}e^{(\lambda ^{2}-ib)t}-1{\bigr )}\right]\,d\lambda .}$

(Eq.13)

For ${\displaystyle \lambda }$ on ${\displaystyle \partial D^{+}}$, the term ${\displaystyle e^{i\lambda x}}$ decays exponentially as ${\displaystyle |\lambda |\rightarrow \infty }$. Also by deforming ${\displaystyle \partial D^{+}}$ to ${\displaystyle L}$ where ${\displaystyle L}$ is a contour between the real axis and ${\displaystyle \partial D^{+}}$, it follows that for ${\displaystyle \lambda }$ on ${\displaystyle L}$ the term ${\displaystyle e^{-\lambda ^{2}t}}$ also decays exponentially as ${\displaystyle |\lambda |\rightarrow \infty }$. Thus, equation Eq.13 becomes

${\displaystyle 2\pi u(x,t)=\int _{L}\left\{e^{i\lambda x-\lambda ^{2}t}\left[{\frac {1}{i\lambda +a^{2}}}+{\frac {1}{i\lambda -a^{2}}}\right]+i\lambda e^{i\lambda x}\left[{\frac {e^{ibt}-e^{-\lambda ^{2}t}}{\lambda +ib}}+{\frac {e^{-ibt}-e^{-\lambda ^{2}t}}{\lambda -ib}}\right]\right\}\,d\lambda ,}$

and the rhs of the above equation can be computed using MATLAB.

For the details of effective numerical quadrature using the unified transform, we refer the reader to,[2] which solves the advection-dispersion equation on the half-line. There it was found that the solution lends itself to quadrature (Gauss-Laguerre quadrature for exponential decay of integrand or Gauss-Hermite quadrature for squared exponential decay of integrand) with exponential convergence.

An Evolution Equation with Spatial Derivatives of Arbitrary order.
Suppose that ${\displaystyle e^{i\lambda x+\omega (\lambda )t}}$ is a solution of the given PDE. Then, ${\displaystyle \partial D^{+}}$ is the boundary of the domain ${\displaystyle D^{+}}$ defined earlier.

If the given PDE contain spatial derivatives of order ${\displaystyle n}$, then for ${\displaystyle n}$ even, the global relation involves ${\displaystyle {\frac {n}{2}}}$ unknowns, whereas for ${\displaystyle n}$ odd it involves ${\displaystyle (n+1)/2}$ or ${\displaystyle (n-1)/2}$ unknowns (depending on the coefficient of the highest derivative). However, using an appropriate number of transformations in the complex ${\displaystyle \lambda }$-plane which leave ${\displaystyle \omega (\lambda )}$ invariant, it is possible to obtain the needed number of equations, so that the transforms of the unknown boundary values can be obtained in terms of ${\displaystyle {\hat {u}}}$ and of the given boundary data in terms of the solution of a system of algebraic equations.

## A Numerical Collocation Method

The Fokas method gives rise to a novel spectral collocation method occurring in Fourier space. Recent work has extended the method and demonstrated a number of its advantages; it avoids the computation of singular integrals encountered in more traditional boundary based approaches, it is fast and easy to code up, it can be used for separable PDEs where no Green's function is known analytically and it can be made to converge exponentially with the correct choice of basis functions.

### Basic method in a convex bounded polygon

Suppose that ${\displaystyle u}$ and ${\displaystyle v}$ both satisfy Laplace's equation in the interior of a convex bounded polygon ${\displaystyle \Omega }$. It follows that

${\displaystyle 0=v(u_{xx}+u_{yy})-u(v_{xx}+v_{yy})={\frac {\partial }{\partial x}}{\big (}vu_{x}-uv_{x}{\big )}+{\frac {\partial }{\partial y}}{\big (}vu_{y}-uv_{y}{\big )}.}$

Then Green's theorem implies the relation

${\displaystyle \int _{\partial \Omega }\left[\left(vu_{x}-uv_{x}\right)dy-\left(vu_{y}-uv_{y}\right)dx\right]=0.}$

(Eq.14)

In order to express the integrand of the above equation in terms of just the Dirichlet and Neumann boundary values, we parameterize ${\displaystyle u(x,y)}$ and ${\displaystyle v(x,y)}$ in terms of the arc length, ${\displaystyle s}$, of ${\displaystyle \partial \Omega }$. This leads to

${\displaystyle u_{x}dy-u_{y}dx={\frac {\partial u}{\partial w}}ds,}$

(Eq.15)

where ${\displaystyle {\frac {\partial u}{\partial w}}}$ denotes the normal derivative.

In order to further simplify the global relation, we introduce the complex variable ${\displaystyle z=x+iy}$, and its conjugate ${\displaystyle {\bar {z}}=x-iy}$. We then choose the test function ${\displaystyle v=e^{-i\lambda z}}$, leading to the global relation for Laplace's equation:

${\displaystyle \int _{\partial \Omega }e^{-i\lambda z}\left[{\frac {\partial u}{\partial w}}+\lambda u{\frac {dz}{ds}}\right]ds=0,\qquad \lambda \in \mathbb {C} .}$

(Eq.16)

A similar argument can also be used in the presence of a forcing term (giving a non-zero right-hand side). An identical argument works for the Helmholtz equation

${\displaystyle u_{xx}+u_{yy}+4\beta ^{2}u=0}$

and the modified Helmholtz equation

${\displaystyle u_{xx}+u_{yy}-4\beta ^{2}u=0.}$

Choosing respective test functions ${\displaystyle v=e^{-i\beta (\lambda z+{\frac {\bar {z}}{\lambda }})}}$ and ${\displaystyle v=e^{-i\beta (\lambda z-{\frac {\bar {z}}{\lambda }})}}$ lead to respective global relations

${\displaystyle \int _{\partial \Omega }e^{-i\beta (\lambda z+{\frac {\bar {z}}{\lambda }})}\left[{\frac {\partial u}{\partial w}}+\beta \left(\lambda {\frac {dz}{ds}}-{\frac {1}{\lambda }}{\frac {d{\bar {z}}}{ds}}\right)u\right]ds=0,\qquad \lambda \in \mathbb {C} \backslash \{0\},}$

and

${\displaystyle \int _{\partial \Omega }e^{-i\beta (\lambda z-{\frac {\bar {z}}{\lambda }})}\left[{\frac {\partial u}{\partial w}}+\beta \left(\lambda {\frac {dz}{ds}}+{\frac {1}{\lambda }}{\frac {d{\bar {z}}}{ds}}\right)u\right]ds=0,\qquad \lambda \in \mathbb {C} \backslash \{0\}.}$

These three cases deal with more general second order elliptic constant coefficient PDEs through a suitable linear change of variables.

The Dirichlet to Neumann map for a convex polygon Suppose that ${\displaystyle \Omega }$ is the interior of a bounded convex polygon specified by the corners ${\displaystyle z_{1},z_{2},\dots \ z_{n}}$. In this case, the global relation Eq.16 takes the form

${\displaystyle \sum _{j=1}^{n}u_{j}(\lambda )=0,\ \lambda \in \mathbb {C} ,}$

(Eq.17)

where

${\displaystyle u_{j}(\lambda )={\frac {1}{2}}\int _{z_{j}}^{z_{j}+1}e^{-i\lambda z}(u_{x}-iu_{y})\,dz,}$

(Eq.18)

or

${\displaystyle u_{j}(\lambda )=\int _{z_{j}}^{z_{j}+1}e^{-i\lambda z}\left({\frac {\partial u}{\partial w}}+\lambda u{\frac {dz}{ds}}\right)\,ds.}$

(Eq.19)

The side ${\displaystyle S_{j}}$, which is the side between ${\displaystyle z_{j}}$ and ${\displaystyle z_{j+1}}$, can be parametrized by

${\displaystyle z(t)=m_{j}+th_{j},\ m_{j}={\frac {z_{j}+z_{j+1}}{2}},\ h_{j}={\frac {z_{j+1}-z_{j}}{2}},\ t\in [-1,1].}$

Hence,

${\displaystyle ds=|h_{j}|\,dt,\ dz=h_{j}\,dt.}$

The functions ${\displaystyle u}$ and ${\displaystyle {\frac {\partial u}{\partial w}}}$ can be approximated in terms of Legendre polynomials:

${\displaystyle u^{j}(t)\approx \sum _{\ell =0}^{N-1}a_{\ell }^{j}P_{\ell }(t),\quad {\frac {\partial u^{j}(t)}{\partial w}}\approx \sum _{\ell =0}^{N-1}b_{\ell }^{j}P_{\ell }(t),}$

(Eq.20)

where for the cases of the Dirichlet, Neumann or Robin boundary value problems either ${\displaystyle a_{\ell }^{j}}$, ${\displaystyle b_{\ell }^{j}}$or a linear combination of ${\displaystyle a_{\ell }^{j}}$and ${\displaystyle b_{\ell }^{j}}$ is given.

Equation Eq.19 now becomes an approximate global relation, where

${\displaystyle u_{j}(\lambda )=\sum _{\ell =0}^{N-1}e^{-im_{j}\lambda }(b_{\ell }^{j}|h_{j}|+\lambda a_{\ell }^{j}h_{j}){\widehat {P}}_{\ell }(\lambda h_{j}),\ \lambda \in \mathbb {C} ,}$

(Eq.21)

with ${\displaystyle {\hat {P}}_{\ell }(\lambda )}$ denoting the Fourier transform of ${\displaystyle P_{\ell }(t)}$, i.e.,

${\displaystyle {\widehat {P}}_{\ell }(\lambda )=\int _{-1}^{1}e^{-i\lambda t}P_{\ell }(t)\,dt,\quad \lambda \in \mathbb {C} .}$

(Eq.22)

${\displaystyle {\hat {P}}_{\ell }(\lambda )}$ can be computed numerically via ${\displaystyle {\hat {P}}_{\ell }(\lambda )={\frac {\sqrt {-2i\pi \lambda }}{-i\lambda }}I_{\ell +{\frac {1}{2}}}(-i\lambda ),}$ where ${\displaystyle I_{\ell }}$ denotes the modified Bessel function of the first kind.

The global relation involves ${\displaystyle N}$ unknown constants (for the Dirichlet problem, these constants are ${\displaystyle b_{\ell }^{j}}$). By evaluating the global relation at a sufficiently large number of different values of ${\displaystyle \lambda }$, the unknown constants can be obtained via the solution of a system of algebraic equations.

It is convenient to choose the above values of ${\displaystyle \lambda }$ on the ${\displaystyle n}$ rays ${\displaystyle -{\bar {h}}_{j}\rho ,\ \rho >0,\ j=1,\dots ,n.}$ For this choice, as ${\displaystyle |\lambda |\rightarrow \infty }$, the relevant system is diagonally dominant, thus its condition number is very small.[3]

### Dealing with non-convexity

Whilst the global relation is valid for non-convex domains ${\displaystyle \Omega }$, the above collocation method becomes numerically unstable.[4] A heuristic explanation for this ill-conditioning in the case of the Laplace equation is as follows. The test functions' ${\displaystyle e^{-i\lambda z}}$ grow/decay exponentially in certain directions of ${\displaystyle \lambda }$. When using a sufficiently large selection of complex ${\displaystyle \lambda }$-values, located in all directions from the origin, each side of a convex polygon will for many of these ${\displaystyle \lambda }$-values encounter larger test functions than do the remaining sides. This is exactly the same argument that motivates the ray' choice of collocation points given by ${\displaystyle -{\overline {h}}_{j}\rho }$, which yield a diagonally dominant system. In contrast, for a non-convex polygon, boundary regions in indented regions will always be dominated by effects from other boundary parts, no matter the ${\displaystyle \lambda }$-value. This can easily be overcome by splitting up the domain into numerous convex regions (introducing fictitious boundaries) and matching the solution and normal derivative across these internal boundaries. Such splitting also allows the extension of the method to exterior/unbounded domains ${\displaystyle \Omega }$ (see below).

### Evaluating in the domain interior

Let ${\displaystyle G=G(z,\zeta )}$ be the associated fundamental solution of the PDE satisfied by ${\displaystyle u}$. In the case of straight edges, Green's representation theorem leads to

{\displaystyle {\begin{aligned}u(x,y)&=\sum _{j=1}^{n}\int _{-1}^{1}{\Big [}G(z,\zeta (t)){\frac {\partial u}{\partial w}}|h_{j}|+iu{\Big (}{\frac {\partial G}{\partial \zeta (t)}}(z,\zeta (t))h_{j}-{\frac {\partial G}{\partial {\bar {\zeta }}(t)}}(z,\zeta (t)){\bar {h}}_{j}{\Big )}{\Big ]}dt\\&\approx \sum _{j=1}^{n}\sum _{l=0}^{N-1}\int _{-1}^{1}{\Big [}G(z,\zeta (t))b_{l}^{j}P_{l}(t)|h_{j}|+ia_{l}^{j}{\Big (}{\frac {\partial G}{\partial \zeta (t)}}(z,\zeta (t))h_{j}-{\frac {\partial G}{\partial {\bar {\zeta }}(t)}}(z,\zeta (t)){\bar {h}}_{j}{\Big )}P_{l}(t){\Big ]}dt.\end{aligned}}}

(Eq.23)

Due to the orthogonality of the Legendre polynomials, for a given ${\displaystyle z=x+iy}$, the integrals in the above representation are Legendre expansion coefficients of certain analytic functions (written in terms of ${\displaystyle G}$). Hence the integrals can be computed rapidly (all at once) by expanding the functions in a Chebyshev basis (using the FFT) and then converting to a Legendre basis.[5] This can also be used to approximate the `smooth' part of the solution after adding global singular functions to take care of corner singularities.

### Extension to curved boundaries and separable PDEs

The method can be extended to variable coefficient PDEs and curved boundaries in the following manner (see [6]). Suppose that ${\displaystyle \alpha (x,y)\in \mathbb {C} ^{2\times 2}}$ is a matrix valued function, ${\displaystyle \beta (x,y)\in \mathbb {C} ^{2}}$ a vector valued function and ${\displaystyle \gamma }$ a function (all sufficiently smooth) defined over ${\displaystyle \Omega }$. Consider the formal PDE in divergence form:

${\displaystyle \nabla \cdot (\alpha \nabla u)+\nabla \cdot (\beta u)+\gamma u=0.}$

(Eq.24)

Assume that the domain ${\displaystyle \Omega }$ is a bounded connected Lipschitz domain whose boundary consists of a finite number of vertices connected by ${\displaystyle C^{1}}$ arcs. Denote the corners of ${\displaystyle \Omega }$ in anticlockwise order as ${\displaystyle \{z_{j}\}_{1}^{n}}$ with the side ${\displaystyle \Gamma _{j}}$, joining ${\displaystyle z_{j}}$ to ${\displaystyle z_{j+1}}$. ${\displaystyle \Gamma _{j}}$ can be parametrised by

${\displaystyle [-1,1]\ni t\rightarrow (x_{j}(t),y_{j}(t))\in \mathbb {R} ^{2},}$

where we assume that the parametrisation is ${\displaystyle C^{1}}$.

The adjoint of equation Eq.24 is given by

${\displaystyle \nabla \cdot (\alpha ^{T}\nabla v)-\beta \cdot \nabla v+\gamma v=0.}$

(Eq.25)

The expression ${\displaystyle v\times }$Eq.24${\displaystyle -u\times }$Eq.25 can be written in the form

${\displaystyle \nabla \cdot [v(\alpha \nabla u)-u(\alpha ^{T}\nabla v)+\beta uv]=0.}$

(Eq.26)

Integrating across the domain and applying the divergence theorem we recover the global relation (${\displaystyle n}$ denotes the outward normal):

${\displaystyle \int _{\partial \Omega }u{\big [}(n\cdot \beta )v-n\cdot (\alpha ^{T}\nabla v){\big ]}+v{\big [}n\cdot (\alpha \nabla u){\big ]}ds=0.}$

(Eq.27)

Define ${\displaystyle l_{j}(t)={\sqrt {{\dot {x}}_{j}(t)^{2}+{\dot {y}}_{j}(t)^{2}}}}$ along the curve ${\displaystyle \Gamma _{j}}$ and assume that ${\displaystyle l_{j}(t)>0}$. Suppose that we have a one-parameter family of solutions of the adjoint equation, ${\displaystyle v(x,y;\lambda )=v_{\lambda }}$, for some ${\displaystyle \lambda \in {\mathcal {C}}}$, where ${\displaystyle {\mathcal {C}}}$ denotes the collocation set. Denoting the solution ${\displaystyle u}$ alongside ${\displaystyle \Gamma _{j}}$ by ${\displaystyle u^{j}}$, the unit outward normal by ${\displaystyle n_{j}}$ and analogously the oblique derivative by ${\displaystyle n_{j}\cdot (\alpha \nabla u^{j})}$, we define the following important transform:

${\displaystyle {\hat {\mu }}_{j}(\lambda ):=\int _{-1}^{1}{\big \{}u^{j}{\big [}(n_{j}\cdot \beta )v_{\lambda }-n_{j}\cdot (\alpha ^{T}\nabla v_{\lambda }){\big ]}+v_{\lambda }{\big [}n_{j}\cdot (\alpha \nabla u^{j}){\big ]}{\big \}}l_{j}(t)dt.}$

(Eq.28)

Using Eq.28 , the global relation Eq.27 becomes

${\displaystyle \sum _{j=1}^{n}{\hat {\mu }}_{j}(\lambda )=0.}$

(Eq.29)

For separable PDEs, a suitable one-parameter family of solutions ${\displaystyle v_{\lambda }}$ can be constructed. If we expand each ${\displaystyle u^{j}}$ and its derivative ${\displaystyle n_{j}\cdot (\alpha \nabla u^{j})}$ along the boundary ${\displaystyle \Gamma _{j}}$ in Legendre polynomials, then we cover a similar approximate global relation as before. To compute the integrals that form the approximate global relation, we can use the same trick as before - expanding the function integrated against Legendre polynomials in a Chebyshev series and then converting to a Legendre series. A major advantage of the method in this scenario is that it is a boundary-based method which does not need any knowledge of the corresponding Green's function. Hence, it is more applicable than boundary integral methods in the setting of variable coefficients.

### Singular functions and an exterior scattering problems

A major advantage of the above collocation method is that the basis choice (Legendre polynomials in the above discussion) can be flexibly chosen to capture local properties of the solution along each boundary. This is useful when the solution has different scalings in different regions of ${\displaystyle \Omega }$, but is particularly useful for capturing singular behavior, for example, near sharp corners of ${\displaystyle \Omega }$.

We consider the acoustic scattering problem solved in [7] by the method. The solution ${\displaystyle u}$ satisfies Helmholtz equation in ${\displaystyle \mathbb {R} ^{2}\backslash \{x\in [-1,1],y=0\}}$ with frequency ${\displaystyle k_{0}=2\beta }$, along with the Sommerfeld radiation condition at infinity:

${\displaystyle \lim _{r\rightarrow \infty }r^{1/2}\left({\frac {\partial }{\partial r}}-ik_{0}\right)u(x,y)=0,}$

(Eq.30)

where ${\displaystyle r={\sqrt {x^{2}+y^{2}}}}$. The boundary condition along the plate is

${\displaystyle {\frac {\partial u}{\partial y}}(x,0)=-{\frac {\partial u_{I}}{\partial y}}(x,0),\quad x\in [-1,1]}$

(Eq.31)

for the incident field

${\displaystyle u_{I}(x,y)=e^{-ik_{0}\cos \theta x-ik_{0}\sin \theta y}.}$

(Eq.32)

By considering the domains ${\displaystyle y>0}$ and ${\displaystyle y<0}$ separately and matching the global relations, the global relation for this problem becomes

{\displaystyle {\begin{aligned}&\int _{\mathbb {R} \backslash [-1,1]}e^{-i\beta x(\lambda +{\frac {1}{\lambda }})}u_{y}(x,0)dx\\&+\int _{[-1,1]}e^{-i\beta x(\lambda +{\frac {1}{\lambda }})}\left[u_{y}(x,0)+{\frac {\beta }{2}}\left(\lambda -{\frac {1}{\lambda }}\right)[u](x,0)\right]dx=0,\qquad \lambda \in \Lambda ,\end{aligned}}}

(Eq.33)

with ${\displaystyle \Lambda =(-1,0)\cup (1,\infty )\cup \{e^{-i\theta }:0<\theta <\pi \}}$ and where ${\displaystyle [u](x,0)=u(x,0_{+})-u(x,0_{-})}$ denotes the jump in ${\displaystyle u}$ across the plate. The complex collocation points are allowed precisely because of the radiation condition. To capture the endpoint singularities, we expand ${\displaystyle [u](x,0)}$ for ${\displaystyle x\in [-1,1]}$ in terms of weighted Chebyshev polynomials of the second kind:

${\displaystyle C_{m}(x)={\sqrt {1-x^{2}}}U_{m}(x).}$

(Eq.34)

These have the following Fourier transform:

${\displaystyle \int _{-1}^{1}e^{i\lambda t}{\sqrt {1-t^{2}}}U_{m}(t)dt={\frac {(m+1)i^{m}\pi }{\lambda }}J_{m+1}(\lambda ),}$

(Eq.35)

where ${\displaystyle J_{\alpha }(\cdot )}$ denotes the Bessel function of the first kind of order ${\displaystyle \alpha }$. For the derivative ${\displaystyle u_{y}}$ along ${\displaystyle \mathbb {R} \backslash [-1,1]}$, a suitable basis choice are Bessel functions of fractional order (to capture the singularity and algebraic decay at infinity).

We introduce the dimensionless frequency ${\displaystyle {\tilde {k}}_{0}=k_{0}L^{-1}}$, where ${\displaystyle L}$ is the length of the plate. The figure below shows the convergence of the method for various ${\displaystyle {\tilde {k}}_{0}}$. Here ${\displaystyle N}$ is the number of basis functions ${\displaystyle C_{m}}$ used to approximate the jump ${\displaystyle [u]}$ across the plate. The maximum relative absolute error is the maximum error of the computed solution divided by the maximum absolute value of the solution. The figure is for ${\displaystyle \theta =\pi /3}$ and shows the quadratic-exponential convergence of the method, namely the error decreases like ${\displaystyle {\mathcal {O}}(\rho ^{N^{2}})}$ for some positive ${\displaystyle \rho <1}$. More complicated geometries (including different angles of touching boundaries and infinite wedges) can also be dealt with in a similar fashion as well as more complicated boundary conditions such as those modeling elasticity.[8][9]

Convergence results for the method and different ${\displaystyle {\tilde {k}}_{0}}$.

## References

1. ^ Deconinck, B.; Trogdon, T.; Vasan, V. (2014-01-01). "The Method of Fokas for Solving Linear Partial Differential Equations". SIAM Review. 56 (1): 159–186. CiteSeerX 10.1.1.454.8462. doi:10.1137/110821871. ISSN 0036-1445.
2. ^ a b de Barros, F. P. J.; Colbrook, M. J.; Fokas, A. S. (2019-08-01). "A hybrid analytical-numerical method for solving advection-dispersion problems on a half-line". International Journal of Heat and Mass Transfer. 139: 482–491. doi:10.1016/j.ijheatmasstransfer.2019.05.018. ISSN 0017-9310.
3. ^ Hashemzadeh, P.; Fokas, A. S.; Smitheman, S. A. (2015-03-08). "A numerical technique for linear elliptic partial differential equations in polygonal domains". Proc. R. Soc. A. 471 (2175): 20140747. doi:10.1098/rspa.2014.0747. ISSN 1364-5021. PMC 4353048. PMID 25792955.
4. ^ Colbrook, Matthew J.; Flyer, Natasha; Fornberg, Bengt (1 December 2018). "On the Fokas method for the solution of elliptic problems in both convex and non-convex polygonal domains". Journal of Computational Physics. 374: 996–1016. doi:10.1016/j.jcp.2018.08.005. ISSN 0021-9991.
5. ^ Colbrook, Matthew J.; Fokas, Thanasis S.; Hashemzadeh, Parham (9 April 2019). "A Hybrid Analytical-Numerical Technique for Elliptic PDEs". SIAM Journal on Scientific Computing. 41 (2): A1066–A1090. doi:10.1137/18M1217309.
6. ^ Colbrook, Matthew J. (27 November 2018). "Extending the unified transform: curvilinear polygons and variable coefficient PDEs". IMA Journal of Numerical Analysis. 40 (2): 976–1004. doi:10.1093/imanum/dry085.
7. ^ Colbrook, Matthew J.; Ayton, Lorna J.; Fokas, Athanassios S. (28 February 2019). "The unified transform for mixed boundary condition problems in unbounded domains". Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences. 475 (2222): 20180605. doi:10.1098/rspa.2018.0605. PMC 6405447. PMID 30853842.
8. ^ Colbrook, Matthew J.; Ayton, Lorna J. (2019). "A spectral collocation method for acoustic scattering by multiple elastic plates". Journal of Sound and Vibration. 461: 114904. doi:10.1016/j.jsv.2019.114904.
9. ^ Ayton, Lorna J.; Colbrook, Matthew; Fokas, Athanassios (2019). "The Unified Transform: A Spectral Collocation Method for Acoustic Scattering". 25th AIAA/CEAS Aeroacoustics Conference. American Institute of Aeronautics and Astronautics. doi:10.2514/6.2019-2528. ISBN 978-1-62410-588-3.