Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Annotation of /trunk/math/derivs.tex
ViewVC logotype

Annotation of /trunk/math/derivs.tex

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10 - (view) (download) (as text)

1 : glk 10 \documentclass[11pt]{article}
2 :    
3 :     \usepackage{amsmath}
4 :     \usepackage{amsfonts}
5 :     \usepackage{array}
6 :     \usepackage{amssymb}
7 :     \usepackage{bm}
8 :    
9 :     \newcommand{\bx}{\mathbf{x}}
10 :     \newcommand{\bH}{\mathbf{H}}
11 :     \newcommand{\ie}{{\em i.e.}}
12 :    
13 :     \begin{document}
14 :    
15 :     \title{Math for Diderot}
16 :    
17 :     In the following,
18 :     \begin{itemize}
19 :     \item $\bx$ is a vector (an element of some vector space $W$)
20 :     \item $\alpha$ is a constant scalar
21 :     \item $f$ and $g$ are scalar functions of $W$
22 :     \item $\mathbf{u} \otimes \mathbf{v}$ is tensor product of two vectors,
23 :     computed as the outer product of their vectors of coefficients in
24 :     some basis.
25 :     \item $\nabla f$ is a the gradient (first derivative) of $f$,
26 :     computed in 3-D as:
27 :     \begin{equation}
28 :     \nabla f = \begin{bmatrix}
29 :     \frac{\partial}{\partial x} \\
30 :     \frac{\partial}{\partial y} \\
31 :     \frac{\partial}{\partial z}
32 :     \end{bmatrix} f
33 :     = \begin{bmatrix}
34 :     \frac{\partial f}{\partial x} \\
35 :     \frac{\partial f}{\partial y} \\
36 :     \frac{\partial f}{\partial z}
37 :     \end{bmatrix}
38 :     \end{equation}
39 :     where $x$, $y$, $z$ are the coordinates in $W$ (\ie{} some basis
40 :     is assumed). The formulae below don't assume a particular dimension.
41 :     Note that $\nabla$ can also be used to define divergence and curl
42 :     of vector fields, but for the time being these are not Diderot's concern.
43 :     \item $\bH f = \nabla \otimes \nabla f$ is the Hessian (second derivative)
44 :     of $f$, computed in 3-D as:
45 :     \begin{equation}
46 :     \bH f = \begin{bmatrix}
47 :     \frac{\partial}{\partial x} \\
48 :     \frac{\partial}{\partial y} \\
49 :     \frac{\partial}{\partial z}
50 :     \end{bmatrix} \begin{bmatrix}
51 :     \frac{\partial}{\partial x} &
52 :     \frac{\partial}{\partial y} &
53 :     \frac{\partial}{\partial z}
54 :     \end{bmatrix} f
55 :     = \begin{bmatrix}
56 :     \frac{\partial^2 f}{\partial x_1^2} & \frac{\partial^2 f}{\partial x_1 \partial x_2} & \frac{\partial^2 f}{\partial x_1 \partial x_3} \\
57 :     \frac{\partial^2 f}{\partial x_1 \partial x_2} & \frac{\partial^2 f}{\partial x_2^2} & \frac{\partial^2 f}{\partial x_2 \partial x_3} \\
58 :     \frac{\partial^2 f}{\partial x_1 \partial x_3} & \frac{\partial^2 f}{\partial x_2 \partial x_3} & \frac{\partial^2 f}{\partial x_3^2}
59 :     \end{bmatrix}
60 :     \end{equation}
61 :     \end{itemize}
62 :    
63 :     Basic rules for the gradient:
64 :     \begin{align}
65 :     \nabla (f + g) &= \nabla f + \nabla g \\
66 :     \nabla (f g) &= f \nabla g + g \nabla f \label{eq:grad-prod} \\
67 :     \nabla (\alpha f) &= \alpha \nabla f \label{eq:grad-scale} \\
68 :     \nabla (f^n) &= n f^{n-1} \nabla f \label{eq:grad-pow} \\
69 :     \nabla \left(\frac{f}{g}\right)
70 :     &= \frac{\nabla f}{g} - \frac{f \nabla g}{g^2} \label{eq:grad-frac} \\
71 :     \end{align}
72 :    
73 :     (\ref{eq:grad-scale}) follows from (\ref{eq:grad-prod}) with $\nabla
74 :     \alpha = 0$. (\ref{eq:grad-frac}) follows from (\ref{eq:grad-pow}).
75 :    
76 :     Basic rules for the Hessian:
77 :     \begin{align}
78 :     \bH (f + g) &= \bH f + \bH g \\
79 :     \bH (\alpha f) &= \alpha \bH f \\
80 :     \bH (f g) &= f \bH g + \nabla f \otimes \nabla g + \nabla g \otimes \nabla f + g \bH f \\
81 :     \bH \left(\frac{f}{g}\right) &=
82 :     \frac{\bH f}{g}
83 :     - \frac{\nabla f \otimes \nabla g + \nabla g \otimes \nabla f + f \bH g}{g^2}
84 :     + \frac{2 f \nabla g \otimes \nabla g}{g^3} \label{eq:hess-quot} \\
85 :     \bH (f^n) &= n f^{n-2} \left( (n-1) \nabla f \otimes \nabla f + f \bH f \right) \label{eq:hess-pow}
86 :     \end{align}
87 :    
88 :     All of these can actually be derived with $\bH f = \nabla \otimes \nabla f$
89 :     and the rules above. Someone may want to doublecheck (\ref{eq:hess-quot}).
90 :    
91 :     \end{document}

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0