21.01.2015 Views

Algorithmic Differentiation in Python with Application Examples

Algorithmic Differentiation in Python with Application Examples

Algorithmic Differentiation in Python with Application Examples

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Why not Symbolic <strong>Differentiation</strong><br />

A Raytrac<strong>in</strong>g Example<br />

1.0<br />

0.5<br />

0.0 8<br />

6<br />

−0.5<br />

1<br />

3<br />

5<br />

7<br />

9<br />

Cyl<strong>in</strong>drical mirror described by 0 = g(x) = x 2 1 + x2 2 − 1,<br />

laser beam enters at x = (0, −1) and direction v.<br />

Recursive algorithm for next reflection po<strong>in</strong>t x + and<br />

direction v + :<br />

„ x +<br />

v + «<br />

0<br />

B<br />

= F(x, v) = @ x +<br />

r !<br />

“ ” x T 2<br />

v ‖x‖<br />

‖v‖ − 2 −1<br />

2 ‖v‖ 2 − xT v<br />

‖v‖ 2<br />

P(x + )v<br />

4<br />

2<br />

0<br />

−1.0<br />

−1.0 −0.5 0.0 0.5 1.0<br />

where P(x + ) = I − 2 wwT<br />

‖w‖ 2 , w = w(x + ) = ∇ xg(x + )<br />

Goal: compute sensitivity of the 10’th reflection po<strong>in</strong>t x (10) w.r.t. <strong>in</strong>itial<br />

direction v (0) , i.e. dx(10)<br />

dv (0) .<br />

Sebastian F. Walter, Humboldt-Universität zu Berl<strong>in</strong> <strong>Algorithmic</strong> () <strong>Differentiation</strong> <strong>in</strong> <strong>Python</strong> <strong>with</strong> <strong>Application</strong> <strong>Examples</strong>Wednesday, 10.07.2010 5 / 27

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!