I need to optimize three parameters (k1,k2,k3) by solving two ODEs.
C2' = k1*C1 - k3*C3 - k2*C2
C3' = k3*C3 - C2
C_total = C2 + C3
C_total and C1 are known data.
The only approach I can think of right now is to try different k-values using gradient method and find k-values that minimize SSE (sum(C_total_true - C_total_pred)^2) since I have C_total data avaiable.
How can I define a gradient function that can update k values after each iteration?