A13 Numerical methods · Practice
Automatic differentiation
Problems dealt one at a time, with new numbers every time. The kinds you miss come back more often, and you can keep going as long as you like.
0 solved
0 in a row
0 of 8 kinds solid
Check
What is the part of ?
Check
Feeding with = 1 into , what is the part of the result?
Check
Write a class Dual(a, b) with +, -, *, / (each also with a plain number on either side), and functions dsin, dexp that act on duals. Then set val, der to the value and derivative of at x0 = 1, by evaluating f(Dual(x0, 1)).
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Solve for the diode voltage with Newton's method, getting by evaluating on a dual number instead of by hand ( A, = 0.02585 V, Vs = 5 V, R = 220 Ω). Start from and limit each step to . Set v to the result and I to the current.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
A function maps 100 inputs to 2 output(s). How many forward-mode passes does its full Jacobian need?
Check
Run reverse mode on at = 1, = 3, with intermediates and .
(a)
What is , collecting the adjoints that flow into from and from ?
(b)
What is ?
Check
What is the part of ?
Check
Feeding into with = 0.8, what is the part?
A kind of problem counts as solid once you've got it right on the first try twice in a row. Back to the lesson · Practice every topic in A13