Skip to content

Instantly share code, notes, and snippets.

@danieljfarrell
Created June 30, 2020 14:06
Show Gist options
  • Save danieljfarrell/2c785dedd3f1e63f5bee704bc2c7225f to your computer and use it in GitHub Desktop.
Save danieljfarrell/2c785dedd3f1e63f5bee704bc2c7225f to your computer and use it in GitHub Desktop.
Solve chemical reaction for steady-state using Mathematica
ClearAll["Global`*"];
eqns = {X'[t] == P - (k1 + k2) X[t] + A k1 X[t], Y'[t] == k1 X[t] - A k1 X[t] - k3 Y[t], X[0] == 0, Y[0] == 0}
s = Assuming[k0 > 0 && k1 > 0 && k2 > 0 && k3 > 0 && P > 0 && A >= 0 && A < 1, Limit[DSolveValue[eqns,{X[t], Y[t]}, t], t -> \[Infinity]]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment