SharedCeline.sagewsOpen in CoCalc
#6
var("x,y")
plot3d(x^2+y^2, (x,-10,10),(y,-10,10), opacity=0.5)+plot3d(2*(x-1)-2*(y+1)+2, (x,-10,10),(y,-10,10), opacity=0.5, color="grey")+point3d((1,-1,2),size=20, color="black")

(x, y)
3D rendering not yet implemented
#8
xprime (x,y)=0.2*x*(1-x/7)-x/(1+x)*y
yprime (x,y)=1/10*y*(1-y/x)
plot_vector_field((xprime,yprime),(x,0,0.3),(y,0,0.3))+point([0.239,0.24])

#The equilibrium point is stable

#9
f1=0.2*x*(1-x/7)-x/(1+x)*y
f2=1/10*y*(1-y/x)
a=jacobian([f1,f2],[x,y])

show(a)

$\displaystyle \left(\begin{array}{rr} -0.0571428571428571 \, x - \frac{y}{x + 1} + \frac{x y}{{\left(x + 1\right)}^{2}} + 0.200000000000000 & -\frac{x}{x + 1} \\ \frac{y^{2}}{10 \, x^{2}} & -\frac{y}{5 \, x} + \frac{1}{10} \end{array}\right)$
#10
m=a.subs({x:0.239,y:0.24})

m.eigenvalues()

[-1/27240646557740*I*sqrt(11258216119645872304850111) - 2336015071/65957981980, 1/27240646557740*I*sqrt(11258216119645872304850111) - 2336015071/65957981980]
#This is a stable spiral

#11
plot_vector_field([-0.357142857142857*x-0.5*y, (2/5)*x-(3/10)*y], (x,-1,1),(y,-1,1))

#This behavior is consitent with the stable equilibrium spiral behavior seen in the previous exercise.