3.4. The derivative of the inverse of functions

3.2. Summation by parts

28 Matrix Theory-Applications and Theorems

tions, a very useful result.

3.3. Second derivatives

For inner points we get

or

The sum of Eqs. (28) or (31), with weights 2χð Þ v;Δ , results in

<sup>2</sup>χð Þ <sup>v</sup>;<sup>Δ</sup> hjþ<sup>1</sup>ð Þ <sup>D</sup><sup>g</sup> <sup>j</sup> <sup>þ</sup>X<sup>m</sup>

<sup>¼</sup> gmþ<sup>1</sup>hmþ<sup>1</sup> <sup>þ</sup> gmhm � gnhn � gn�<sup>1</sup>hn�<sup>1</sup>,

<sup>¼</sup> gmþ<sup>1</sup>hmþ<sup>1</sup> <sup>þ</sup> gmhm � gnhn � gn�<sup>1</sup>hn�<sup>1</sup>:

This is the discrete version of the integration by parts theorem for continuous variable func-

Expressions for higher order derivatives are obtained through the powers of DN. For instance,

<sup>4</sup>χ<sup>2</sup>ð Þ <sup>v</sup>;<sup>Δ</sup> <sup>¼</sup> ð Þ <sup>D</sup><sup>g</sup> <sup>2</sup> � <sup>e</sup>�v<sup>Δ</sup>ð Þ <sup>D</sup><sup>g</sup> <sup>1</sup>

<sup>4</sup>χ<sup>2</sup>ð Þ <sup>v</sup>;<sup>Δ</sup> <sup>¼</sup> ð Þ <sup>D</sup><sup>g</sup> <sup>N</sup> � ð Þ <sup>D</sup><sup>g</sup> <sup>N</sup>�<sup>2</sup>

<sup>N</sup> <sup>¼</sup> gN�<sup>2</sup> � <sup>e</sup><sup>v</sup><sup>Δ</sup>gN�<sup>1</sup> <sup>þ</sup> <sup>e</sup><sup>2</sup>v<sup>Δ</sup> � <sup>1</sup> � �gN 4χ<sup>2</sup>ð Þ v;Δ

<sup>χ</sup>2ð Þ <sup>v</sup>; <sup>2</sup><sup>Δ</sup> :

<sup>¼</sup> <sup>e</sup><sup>v</sup><sup>Δ</sup>ð Þ <sup>D</sup><sup>g</sup> <sup>N</sup> � ð Þ <sup>D</sup><sup>g</sup> <sup>N</sup>�<sup>1</sup>

<sup>4</sup>χ<sup>2</sup>ð Þ <sup>v</sup>;<sup>Δ</sup> <sup>¼</sup> ð Þ <sup>D</sup><sup>g</sup> <sup>3</sup> � ð Þ <sup>D</sup><sup>g</sup> <sup>1</sup>

2χð Þ v;Δ ð Þ Dgh <sup>j</sup>

<sup>2</sup>χð Þ <sup>v</sup>;<sup>Δ</sup> gjþ<sup>1</sup> ð Þ <sup>D</sup><sup>h</sup> <sup>j</sup> <sup>þ</sup>X<sup>m</sup>

<sup>1</sup> <sup>¼</sup> <sup>e</sup>�2v<sup>Δ</sup> � <sup>1</sup> � �g<sup>1</sup> � <sup>e</sup>�v<sup>Δ</sup>g<sup>2</sup> <sup>þ</sup> <sup>g</sup><sup>3</sup>

<sup>2</sup> <sup>¼</sup> <sup>e</sup>�v<sup>Δ</sup>g<sup>1</sup> � <sup>2</sup>g<sup>2</sup> <sup>þ</sup> <sup>g</sup><sup>4</sup>

<sup>N</sup>�<sup>1</sup> <sup>¼</sup> gN�<sup>3</sup> � <sup>2</sup>gN�<sup>1</sup> <sup>þ</sup> <sup>e</sup><sup>v</sup><sup>Δ</sup>gN

<sup>4</sup>χ<sup>2</sup>ð Þ <sup>v</sup>; <sup>Δ</sup> <sup>¼</sup> ð Þ <sup>D</sup><sup>g</sup> <sup>j</sup>þ<sup>1</sup> � ð Þ <sup>D</sup><sup>g</sup> <sup>j</sup>�<sup>1</sup>

j¼n

j¼n

<sup>2</sup>χð Þ <sup>v</sup>;<sup>Δ</sup> gj�<sup>1</sup>ð Þ <sup>D</sup><sup>h</sup> <sup>j</sup>

2χð Þ v;Δ hj�<sup>1</sup> ð Þ Dg <sup>j</sup>

(33)

(34)

<sup>2</sup>χð Þ <sup>v</sup>;<sup>Δ</sup> , (35)

<sup>2</sup>χð Þ <sup>v</sup>;<sup>Δ</sup> , (36)

<sup>2</sup>χð Þ <sup>v</sup>;<sup>Δ</sup> , (38)

(39)

<sup>2</sup>χð Þ <sup>v</sup>;<sup>Δ</sup> , <sup>3</sup> <sup>≤</sup> <sup>j</sup> <sup>≤</sup> <sup>N</sup> � <sup>3</sup>, (37)

Xm j¼n

<sup>¼</sup> <sup>X</sup><sup>m</sup> j¼n

Xm j¼n

for the first two points, the second derivative is

D2 g � �

<sup>j</sup> <sup>¼</sup> gj�<sup>2</sup> � <sup>2</sup>gj <sup>þ</sup> gjþ<sup>2</sup>

D2 g � �

D2 g � �

D2 g � �

and for the last two points of the mesh, we find

D2 g � � It is possible to give an expression for the derivative of h�<sup>1</sup> ð Þq , including the edge points. For the first point, we have

$$\begin{split} \left(\mathbf{D}\frac{1}{h}\right)\_1 &= \frac{1}{2\chi(\upsilon,\Delta)} \left(\frac{1}{h\_2} - \frac{e^{-\upsilon\Delta}}{h\_1}\right) \\ &= \frac{1}{2\chi(\upsilon,\Delta)} \left(-\frac{h\_2 - h\_1}{h\_1 h\_2} + \frac{1 - e^{-\upsilon\Delta}}{h\_1}\right) \\ &= -\frac{(\mathbf{D}h)\_1}{h\_1 h\_2} + \frac{1 - e^{-\upsilon\Delta}}{2\chi(\upsilon,\Delta)} \left(\frac{1}{h\_1} + \frac{1}{h\_2}\right). \end{split} \tag{40}$$

For central and last points, we find that

$$\left(\mathrm{D}\frac{1}{h}\right)\_{j} = -\frac{(\mathrm{D}h)\_{j}}{h\_{j-1}h\_{j+1}},\tag{41}$$

$$\left(\mathrm{D}\frac{1}{h}\right)\_N = -\frac{(\mathrm{D}h)\_N}{h\_{N-1}h\_N} + \frac{e^{v\Lambda} - 1}{2\chi(v,\Delta)} \left(\frac{1}{h\_{N-1}} + \frac{1}{h\_N}\right). \tag{42}$$

The derivatives for the first and last points coincide with the derivative for central points when Δ ¼ 0.

## 3.5. The derivative of the ratio of functions

Now, we take advantage of the derivative for the inverse of a function and the derivative of a product of functions and obtain what the derivative of a ratio of functions is

$$\begin{split} \left(\mathbf{D}\frac{\mathcal{g}}{h}\right)\_{1} &= \frac{1}{h\_{2}} (\mathbf{D}\mathbf{g})\_{1} + g\_{1} \left(\mathbf{D}\frac{1}{h}\right)\_{1} + \frac{g\_{1}}{h\_{2}} \frac{e^{-v\boldsymbol{\Delta}} - 1}{2\chi(v, \boldsymbol{\Delta})} \\ &= \frac{1}{h\_{2}} (\mathbf{D}\mathbf{g})\_{1} + g\_{1} \left[ -\frac{(\mathbf{D}h)\_{1}}{h\_{1}h\_{2}} + \frac{1}{2\chi(v, \boldsymbol{\Delta})} \left(\frac{1}{h\_{1}} + \frac{1 - e^{-v\boldsymbol{\Delta}}}{h\_{2}}\right) \right] + \frac{g\_{1}}{h\_{2}} \frac{e^{-v\boldsymbol{\Delta}} - 1}{2\chi(v, \boldsymbol{\Delta})} \\ &= \frac{1}{h\_{2}} (\mathbf{D}\mathbf{g})\_{1} - \frac{g\_{1}}{h\_{1}h\_{2}} (\mathbf{D}h)\_{1} + \frac{g\_{1}}{h\_{1}} \frac{1 - e^{-v\boldsymbol{\Delta}}}{2\chi(v, \boldsymbol{\Delta})} . \end{split} \tag{43}$$

$$\mathbf{h}\left(\mathbf{D}\frac{\mathcal{S}}{h}\right)\_{j} = \frac{(\mathbf{D}\mathbf{g})\_{j}}{h\_{j-1}} - \mathbf{g}\_{j+1}\frac{(\mathbf{D}h)\_{j}}{h\_{j+1}h\_{j-1}},\tag{44}$$

$$\frac{1}{N} \left( \mathbf{D} \frac{\mathcal{S}}{h} \right)\_N = \frac{1}{h\_N} (\mathbf{D} \mathbf{g})\_N - \frac{\mathcal{g}\_{N-1}}{h\_{N-1} h\_N} (\mathbf{D}h)\_N + \frac{\mathcal{g}\_{N-1}}{h\_{N-1}} \frac{\varepsilon^{v\Delta} - 1}{2\chi(v, \Delta)},\tag{45}$$

expressions which are very similar to the continuous variable results. Again, these expressions coincide in the limit Δ ! 0, and they reduce to the corresponding expressions for continuous variables.
