Skip to content

Lotka–Volterra equations #989

Answered by guyer
beantsja asked this question in Q&A
Jan 2, 2024 · 2 comments · 6 replies
Discussion options

You must be logged in to vote

You can write it either way, but it matters. ImplicitSourceTerm(coeff=f, var=g) represents $f g$. f can be anything, but the expression can only be implicit (linear) in one variable, g.

By choosing

eqn0 = TransientTerm(var=x) == ImplicitSourceTerm(coeff=a, var=x) - ImplicitSourceTerm(coeff=b * x, var=y)
eqn1 = TransientTerm(var=y) == ImplicitSourceTerm(coeff=d * y, var=x) - ImplicitSourceTerm(coeff=c, var=y)

I chose to represent

$$ \begin{align} x' &= a x - (b x) y \\ y' &= (d y) x - c y \end{align} $$

or

$$ \begin{align} (\partial_t - a) x - (b x) y &= 0 \\ -(d y) x + (\partial_t - c) y &= 0 \end{align} $$

which creates a (very simplified) block matrix

$$ \left[\begin{array}{c|c} \partia…

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@guyer
Comment options

@guyer
Comment options

@beantsja
Comment options

@guyer
Comment options

Answer selected by beantsja
@guyer
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants