Ask Your Question

Revision history [back]

You can not use functions (like M1 and M2) as variables (as you did in plot_vector_field). They are not interchangeable. Instead you can do

    M1,M2 = var('M1,M2')

    de1 = a1 * M2 - b1 * M1 + g1
    de2 = a2 * M1 - b2 * M2 + g2

    plot_vector_field((de1,de2),(M1,-3,3),(M2,-3,3)).show()

(without the .show() I did not get any picture)

You can not cannot use functions (like M1 M1 and M2) M2) as variables (as you did in plot_vector_field). plot_vector_field). They are not interchangeable. Instead you can do

    M1,M2 M1, M2 = var('M1,M2')
var('M1 M2')
  de1 = a1 * M2 - b1 * M1 + g1
 de2 = a2 * M1 - b2 * M2 + g2

    plot_vector_field((de1,de2),(M1,-3,3),(M2,-3,3)).show()
plot_vector_field((de1, de2), (M1, -3, 3), (M2, -3, 3)).show()

(without the .show() .show() I did not get any picture)picture).