fixed two big errors in dynamics implementation: 1) the optimization logic in the render loop was being called with the incorrect values of M, C, and G because I was pulling them from the precomputed sequences rather than detrmining the values that correctly corresponded to the current state. i modified the stepPhysics() implementation to account for this oversight, and the system is much more stable/predictable. 2) i realized that the implementation of the analytic equations from the reading treated g as a 'scalar...acceleration of gravity along the negative y-axis', whereas my implementation was treating it as a signed value. this led to incorrect physics, and fixing the problem made the system behave more predictably for a given torque input sequence. despite these two changes, the optimization is still not working, and it seems to be replacing the initial estimate with very, very small numbers, essentially putting no torque into the system. this may be a product of the lambda(t_final) being used to initiate the backwards integration. will follow up with dr. lane