Skip to main content
100%

just took the derivative of rk4 by hand...

✓ Published0🌍 Public
Aandyreagan
Last edited Dec 11, 2013
Created on Dec 11, 2013

This example shows the step-by-step derivation of the Jacobian matrix update for the Runge-Kutta 4 (RK4) method, displayed as MATLAB code. It first presents the full, unwieldy one-line expression for the derivative, then reorganizes it into a clearer, more readable sequence of intermediate variables. The code computes the local error propagation by multiplying Jacobian evaluations (via `feval` with a function handle `J`) at successive RK4 stages, accumulating products with identity matrices scaled by step size `h`. The final result updates the matrix `L` using the weighted sum of these Jacobian products, demonstrating how to propagate sensitivities through the RK4 integrator.

AI-generated description

Similar vizzes