Ex 3.3: Hill Climbing, 2

Functional Differential Geometry

.

b. Write this as a computational expression.

~~~

\begin{aligned}   P &= mg \frac{d h}{d t} \\   &= mg \left( \frac{\partial h}{\partial x} \frac{dx}{dt} + \frac{\partial h}{\partial y} \frac{dy}{dt} \right) \\   &= mg \begin{bmatrix}   \frac{\partial h}{\partial x} & \frac{\partial h}{\partial y} \end{bmatrix} \begin{bmatrix} \frac{dx}{dt} \\ \frac{dy}{dt} \end{bmatrix} \\  &= mg (\nabla h) \cdot \mathbf{v} \\  &= mg (D f(\chi(\mathbf{m})) b(\chi{(\mathbf{m}})) \\   \end{aligned}

(define (components->vector-field components coordsys)
  (define (v f)
    (compose (* (D (compose f (point coordsys)))
                components)
             (chart coordsys)))
  (procedure->vector-field v))

(define R2->R (-> (UP Real Real) Real))

(define v
  (components->vector-field
   (up (literal-function 'v_x R2->R)
       (literal-function 'v_y R2->R))
   R2-rect))

(define R2-rect-chi-inverse
  (point R2-rect))

(define R2-rect-point
  (R2-rect-chi-inverse (up 'x_0 'y_0)))

(show-expression
 ((v (literal-manifold-function
      'h R2-rect)) R2-rect-point))

\left(      \left(v_x \left(\begin{pmatrix} x_0 \\ y_0 \end{pmatrix}\right) \cdot \left(\partial_0 h \right)\right|_{\begin{pmatrix} x_0 \\ y_0 \end{pmatrix}} +      \left(v_y \left(\begin{pmatrix} x_0 \\ y_0 \end{pmatrix}\right) \cdot \left(\partial_1 h \right) \right|_{\begin{pmatrix} x_0 \\ y_0 \end{pmatrix}}  \right)

— Me@2024-11-22 04:05:26 PM

.

.

2024.12.15 Sunday (c) All rights reserved by ACHK

Posted in FDG