# Computing Tangential Derivative using the Dirichlet value

Let $$\Gamma$$ be a smooth boundary of a domain $$\Omega$$. Let $$u = g$$ on $$\Gamma$$. How can I compute the tangential derivative of the function $$u$$ using the information that $$u = g$$ on $$\Gamma$$? Please provide a reference.

• You mean mathematically, or in actual practice? If the latter, how do you represent $g$? Commented May 12 at 17:02

As @WolfgangBangerth already mentioned, the practical implementation depends on the representation of $$\mathbf g$$. I will give a short answer for a polynomial curve.

If $$\mathbf{g}$$ are point values on a smooth curve $$\boldsymbol\Gamma$$ you can calculate the tangential derivative

\begin{align} \frac{ \partial \mathbf g}{ \partial \Gamma} = \frac{1}{\|\boldsymbol{\dot\gamma}(\xi)\|}\circ \frac{ \partial \mathbf g}{ \partial \xi}, \\ \end{align}

with

\begin{align} \|\boldsymbol{\dot\gamma}(\xi)\| = \sqrt{\left(\frac{ \partial \mathbf{x}}{ \partial \xi}\right)^2 + \left(\frac{ \partial \mathbf y}{ \partial \xi}\right)^2}, \\ \end{align}

and

\begin{align} \frac{ \partial \mathbf x}{ \partial \xi} = \mathbf{\mathcal D}\mathbf x, \quad \frac{ \partial \mathbf y}{ \partial \xi} = \mathbf{\mathcal D}\mathbf y, \quad \frac{ \partial \mathbf g}{ \partial \xi} = \mathbf{\mathcal D}\mathbf g. \\ \end{align}

Here $$\mathcal D$$ is defined as derivative matrix, $$\circ$$ is the elementwise multiplication and $$\mathbf x, \mathbf y$$ are coordinates. The curve may be parametrized using $$\xi \in [0,1]$$. Note that $$\mathbf x,\mathbf y, \mathbf g$$ are nodal values

\begin{align} \mathbf x = \left(x_1, x_2, \dots, x_n\right), \quad \mathbf y = \left(y_1, y_2, \dots, y_n\right), \quad \mathbf g = \left(g_1, g_2, \dots, g_n\right). \\ \end{align}

Example: ($$n=2$$)

If $$\Gamma$$ consists of many linear segments $$\gamma_i$$, you can calculate the tangential derivative on each segment using

\begin{align} \frac{ \partial \mathbf g}{ \partial \gamma_i} = \frac{ g_2 - g_1}{ \sqrt{\left(x_2 - x_1 \right)^2 + \left(y_2 - y_1 \right)^2}} . \\ \end{align}