Proposal for gradient wrt complex variables

This is a proposal to handle gradients of a scalar, real variable (usually, a cost) with respect to tensor variables, of complex (and real) type, in an optimization perspective.

Derivative of complex variables is usually studied only for so-called analytical complex functions, which have a particular structure in their partial derivatives. However, we do not want to limit ourselves to analytical functions, and we make other assumptions (that the final cost is real-valued, for instance), so we will adopt a different convention for gradients than what is usually used in the literature.

Gradient (re-)definition

We are interested in the case where we have a final real-valued cost,

System Message: WARNING/2 (C)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

, and a graph of mathematical expressions, including real-valued and complex-valued variables (scalars, vectors, matrices, higher-order tensors), and we want to compute the gradient of

System Message: WARNING/2 (C)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

, wrt some variables in that graph, using gradient back-propagation. In the case where some variables are complex, the usual chain rule cannot be applied, except in some cases.

For each real-valued variable

System Message: WARNING/2 (r)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

(not necessarily scalar, it could be a matrix, for instance), in particular

System Message: WARNING/2 (\Re v)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

and

System Message: WARNING/2 (\Im v)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

, partial derivatives can be defined:

System Message: WARNING/2 (\frac{\partial C}{\partial r})

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

has the same number of dimensions and shape as

System Message: WARNING/2 (r)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

. We will limit that notation to real-valued variables only, this way, the partial derivative itself will be real-valued too. We will not use that notation for the complex derivative of analytical complex functions.

For any real-valued intermediate variable

System Message: WARNING/2 (t)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

, the usual chain rule applies:

System Message: WARNING/2 (\frac{\partial C}{\partial r} = \frac{\partial C}{\partial t} \frac{\partial t}{\partial r})

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

If

System Message: WARNING/2 (z)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

is a complex variable, with

System Message: WARNING/2 (\Re z = x)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

and

System Message: WARNING/2 (\Im z = y)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

, we can consider

System Message: WARNING/2 (x)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

and

System Message: WARNING/2 (y)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

as free variables, and then:

System Message: WARNING/2 (\frac{\partial C}{\partial r} = \frac{\partial C}{\partial x} \frac{\partial x}{\partial r} + \frac{\partial C}{\partial y} \frac{\partial y}{\partial r})

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

If we want to use an algorithm similar to gradient backpropagation, we can see that, here, we need to have both

System Message: WARNING/2 (\frac{\partial C}{\partial \Re t})

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

and

System Message: WARNING/2 (\frac{\partial C}{\partial \Im t})

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

, in order to compute

System Message: WARNING/2 (\frac{\partial C}{\partial r})

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

.

For each variable

System Message: WARNING/2 (v)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

in the expression graph, let us denote

System Message: WARNING/2 (\nabla_C(v))

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

the gradient of

System Message: WARNING/2 (C)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

with respect to

System Message: WARNING/2 (v)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

. It is a tensor with the same dimensions as

System Message: WARNING/2 (v)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

, and can be complex-valued. We define:

System Message: WARNING/2 (\nabla_C(v) = \frac{\partial C}{\partial \Re v} + i \frac{\partial C}{\partial \Im v})

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

This is the tensor that we are going to back-propagate through the computation graph.

Generalized chain rule

Using the definition above, if we have two complex variables

System Message: WARNING/2 (z = x + iy)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

and

System Message: WARNING/2 (t = r + is)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

(with

System Message: WARNING/2 (x, y, r, s)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

all real-valued):

System Message: WARNING/2 (\nabla_C(z) &= \frac{\partial C}{\partial \Re z} + i \frac{\partial C}{\partial \Im z} \\ &= \frac{\partial C}{\partial x} + i \frac{\partial C}{\partial y} \nabla_C(t) &= \frac{\partial C}{\partial \Re t} + i \frac{\partial C}{\partial \Im t} \\ &= \frac{\partial C}{\partial r} + i \frac{\partial C}{\partial s} \\ &= \left(\frac{\partial C}{\partial x} \frac{\partial x}{\partial r} + \frac{\partial C}{\partial y} \frac{\partial y}{\partial r}\right) + i \left(\frac{\partial C}{\partial x} \frac{\partial x}{\partial s} + \frac{\partial C}{\partial y} \frac{\partial y}{\partial s}\right) \\ &= \frac{\partial C}{\partial x} \left(\frac{\partial x}{\partial r} + i \frac{\partial x}{\partial s}\right) + \frac{\partial C}{\partial y} \left(\frac{\partial y}{\partial r} + i \frac{\partial y}{\partial s}\right) \\ &= \Re \left(\nabla_C(z)\right) \left(\frac{\partial x}{\partial r} + i \frac{\partial x}{\partial s}\right) + \Im \left(\nabla_C(z)\right) \left(\frac{\partial y}{\partial r} + i \frac{\partial y}{\partial s}\right))

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

This formula can be used whether or not

System Message: WARNING/2 (C)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

is an analytical function of

System Message: WARNING/2 (z)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

or

System Message: WARNING/2 (t)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

, and whether or not

System Message: WARNING/2 (z)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

is an analytical function of

System Message: WARNING/2 (t)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

.

Special cases

Real-valued input variable

If variable

System Message: WARNING/2 (x)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

is defined as real-valued, it can sometimes be useful to have the value of

System Message: WARNING/2 (\nabla_C(z))

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

instead of only

System Message: WARNING/2 (\frac{\partial C}{\partial x})

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

, because the imaginary part contains information on how the cost would change if

System Message: WARNING/2 (y)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

was not constrained to be 0.

Real-valued intermediate variable

When

System Message: WARNING/2 (x)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

is an intermediate variable, however, the gradient of

System Message: WARNING/2 (C)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

wrt

System Message: WARNING/2 (t)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

must not be backpropagated through

System Message: WARNING/2 (y)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

. Therefore, we have:

System Message: WARNING/2 (\nabla_C(t) &= \frac{\partial C}{\partial r} + i \frac{\partial C}{\partial s} \\ &= \frac{\partial C}{\partial x} \frac{\partial x}{\partial r} + i \frac{\partial C}{\partial x} \frac{\partial x}{\partial s} \\ &= \Re \left(\nabla_C(z)\right) \left(\frac{\partial x}{\partial r} + i \frac{\partial x}{\partial s}\right))

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

The imaginary part of

System Message: WARNING/2 (\nabla_C(z))

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

is ignored, because

System Message: WARNING/2 (\Im z)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

is constrained to be 0.

Analytic functions

If

System Message: WARNING/2 (z)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

is the output of an analytic function of

System Message: WARNING/2 (t)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

, some simplifications are possible. Analytic functions include, for instance, polynomial functions, the exponential function. Most complex functions, however, are not: absolute value, real part, imaginary part, complex conjugate, etc.

Analytic (or holomorphic) functions satisfy the Cauchy-Riemann equations:

System Message: WARNING/2 (\frac{\partial \Re z}{\partial \Re t} = \frac{\partial \Im z}{\partial \Im t} \text{ and } \frac{\partial \Re z}{\partial \Im t} = - \frac{\partial \Im z}{\partial \Re t})

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

Or, in our case:

System Message: WARNING/2 (\frac{\partial x}{\partial r} = \frac{\partial y}{\partial t} \text{ and } \frac{\partial x}{\partial s} = - \frac{\partial y}{\partial r})

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

This leads to:

System Message: WARNING/2 (\nabla_C(t) &= \Re \left(\nabla_C(z)\right) \left(\frac{\partial x}{\partial r} + i \frac{\partial x}{\partial s}\right) + \Im \left(\nabla_C(z)\right) \left(\frac{\partial y}{\partial r} + i \frac{\partial y}{\partial s}\right) \\ &= \Re \left(\nabla_C(z)\right) \left(\frac{\partial x}{\partial r} + i \frac{\partial x}{\partial s}\right) + \Im \left(\nabla_C(z)\right) \left(- \frac{\partial x}{\partial s} + i \frac{\partial x}{\partial r}\right) \\ &= \Re \left(\nabla_C(z)\right) \left(\frac{\partial x}{\partial r} + i \frac{\partial x}{\partial s}\right) + i \Im \left(\nabla_C(z)\right) \left(\frac{\partial x}{\partial r} + i \frac{\partial x}{\partial s}\right) \\ \nabla_C(t) &= \nabla_C(z) \left(\frac{\partial x}{\partial r} + i \frac{\partial x}{\partial s}\right) = - i \nabla_C(z) \left(\frac{\partial y}{\partial r} + i \frac{\partial y}{\partial s}\right))

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

Finite differences

In order to verify that the mathematical formula for a gradient, or its implementation, is correct, we usually use a finite-differenciation approach. If

System Message: WARNING/2 (C)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

is our real scalar cost, and

System Message: WARNING/2 (x)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

a real-valued scalar variable, then:

System Message: WARNING/2 (\frac{\partial C}{\partial x} \approx \frac{C(x + \varepsilon) - C(x)}{\varepsilon})

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

where

System Message: WARNING/2 (\varepsilon)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

is also a real scalar, of small magnitude (typically

System Message: WARNING/2 (10^{-6})

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

to

System Message: WARNING/2 (10^{-4})

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

). If

System Message: WARNING/2 (x)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

is a tensor, then this approximation has to be made for each element

System Message: WARNING/2 (x_i)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

independently (a different

System Message: WARNING/2 (\varepsilon_i)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

could be used each time, but usually they are all equal to

System Message: WARNING/2 (\varepsilon)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

).

For a complex scalar variable

System Message: WARNING/2 (z = x + iy)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

:

System Message: WARNING/2 (\nabla_C(z) &= \frac{\partial C}{\partial x} + i \frac{\partial C}{\partial y}\\ \nabla_C(z) &\approx \frac{C(z + \delta) - C(z)}{\delta} + i \frac{C(z + i \varepsilon) - C(z)}{\varepsilon})

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

Both partial derivative have to be estimated independently, using generally

System Message: WARNING/2 (\delta = \varepsilon)

latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order): mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes: mktexfmt: /builddir/.texlive2020/texmf-config/web2c/fmtutil.cnf mktexfmt [INFO]: writing formats under /builddir/.texlive2020/texmf-var/web2c mktexfmt [INFO]: did not find entry for byfmt=latex, skipped mktexfmt [INFO]: total formats: 0 mktexfmt [INFO]: exiting with status 0 [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex) restricted \write18 enabled. I can't find the format file `latex.fmt'!

.