Uppgift 6.3: 33 

restart; -1; with(DEtools); -1; with(LinearAlgebra); -1 

`:=`(f, `+`(`*`(30, `*`(x)), `-`(`*`(2, `*`(`^`(x, 2)))), `-`(`*`(x, `*`(y))))) 

`+`(`*`(30, `*`(x)), `-`(`*`(2, `*`(`^`(x, 2)))), `-`(`*`(x, `*`(y)))) (4.1)
 

`:=`(g, `+`(`*`(80, `*`(y)), `-`(`*`(4, `*`(`^`(y, 2)))), `*`(2, `*`(x, `*`(y))))) 

`+`(`*`(80, `*`(y)), `-`(`*`(4, `*`(`^`(y, 2)))), `*`(2, `*`(x, `*`(y)))) (4.2)
 

`:=`(jmv, solve({f, g})) 

{y = 0, x = 0}, {y = 0, x = 15}, {x = 0, y = 20}, {x = 4, y = 22} (4.3)
 

Linearisering i de fyra jämviktspunkterna 

`:=`(L, Matrix(%id = 7535600)) 

Matrix(%id = 6516764) (4.4)
 

for j to 4 do `:=`(P[j], map(eval, L, jmv[j])); `:=`(ev[j], Eigenvalues(P[j])) end do 

Vector[column](%id = 7226156) (4.5)
 

Alla maplesystem skriver inte ut värdena när loopen körs. DÃ¥ kan man göra det efterÃ¥t. 

seq([jmv[j], ev[j]], j = 1 .. 4) 

[{x = 0, y = 0}, Vector[column](%id = 22373820)], [{x = 15, y = 0}, Vector[column](%id = 6670852)], [{x = 0, y = 20}, Vector[column](%id = 6673508)], [{x = 4, y = 22}, Vector[column](%id = 6673716)]
[{x = 0, y = 0}, Vector[column](%id = 22373820)], [{x = 15, y = 0}, Vector[column](%id = 6670852)], [{x = 0, y = 20}, Vector[column](%id = 6673508)], [{x = 4, y = 22}, Vector[column](%id = 6673716)]
(4.6)
 

evalf(ev[4]) 

Vector[column](%id = 7557380) (4.7)
 

Alla punkter är instabila utom (4,22) som är asymptotiskt stabil. 

Kontrollera gärna genom att rita riktningsfältet. 

`:=`(fcn, {x = x(t), y = y(t)}) 

{y = y(t), x = x(t)} (4.8)
 

`:=`(syst, [(D(x))(t) = eval(f, fcn), (D(y))(t) = eval(g, fcn)]) 

[(D(x))(t) = `+`(`*`(30, `*`(x(t))), `-`(`*`(2, `*`(`^`(x(t), 2)))), `-`(`*`(x(t), `*`(y(t))))), (D(y))(t) = `+`(`*`(80, `*`(y(t))), `-`(`*`(4, `*`(`^`(y(t), 2)))), `*`(2, `*`(x(t), `*`(y(t)))))] (4.9)
 

DEplot(syst, [x(t), y(t)], t = -3 .. 8, x = -10 .. 20, y = -10 .. 30, arrows = MEDIUM, stepsize = 0.1e-1) 

Plot_2d