Question: Issues with Uploading and Running Document in Maple 2024.1

I have created a document on my computer that runs normally in Maple 2024.1. However, when I upload this document to MaplePrimes, it shows an error or behaves unexpectedly. The document contains a system of differential equations, which I solved numerically and plotted, but the plots and equilibrium points do not display correctly after uploading.

 

When I run this code on my local machine, it works perfectly. However, after uploading the document to MaplePrimes, it does not run as expected. What could be causing this issue? Is there a known problem with Maple 2024.1 when uploading documents, or could there be a compatibility issue with MaplePrimes?

Any help or suggestions would be greatly appreciated. Thank you!

This project discusses the predator-prey system, particularly the Lotka-Volterra equations, which model the interaction between two species: prey and predators. Let's solve the Lotka-Volterra equations numerically and visualize the results.

NULL

NULL

alpha := 1.0; beta := .1; g := 1.5; delta := 0.75e-1; ode1 := diff(x(t), t) = alpha*x(t)-beta*x(t)*y(t); ode2 := diff(y(t), t) = delta*x(t)*y(t)-g*y(t); eq1 := -beta*x*y+alpha*x = 0; eq2 := delta*x*y-g*y = 0; equilibria := solve({eq1, eq2}, {x, y}); print("Equilibrium Points: ", equilibria); initial_conditions := x(0) = 40, y(0) = 9; sol := dsolve({ode1, ode2, initial_conditions}, {x(t), y(t)}, numeric); eq_points := [seq([rhs(eq[1]), rhs(eq[2])], `in`(eq, equilibria))]

[[0., 0.], [20., 10.]]

(1)

plots[odeplot](sol, [[t, x(t)], [t, y(t)]], t = 0 .. 100, legend = ["Rabbits", "Wolves"], title = "Prey-Predator Dynamics", labels = ["Time", "Population"])

 

``

NULL

NULL

sol_plot := plots:-odeplot(sol, [[x(t), y(t)]], 0 .. 100, color = "blue"); equilibrium_plot := plots:-pointplot(eq_points, color = "red", symbol = solidcircle, symbolsize = 15); plots:-display([sol_plot, equilibrium_plot], title = "Phase Portrait with Equilibrium Points", labels = ["Rabbits", "Wolves"])

 

Now, we need to handle a modified version of the Lotka-Volterra equations. These modified equations incorporate logistic growth fot the prey population.

 

 

restart

alpha := 1.0; beta := .1; g := 1.5; delta := 0.75e-1; k := 100; ode1 := diff(x(t), t) = alpha*x(t)*(1-x(t)/k)-beta*x(t)*y(t); ode2 := diff(y(t), t) = delta*x(t)*y(t)-g*y(t); eq1 := alpha*x*(1-x/k)-beta*x*y = 0; eq2 := delta*x*y-g*y = 0; equilibria := solve({eq1, eq2}, {x, y}); print("Equilibrium Points: ", equilibria); initial_conditions := x(0) = 40, y(0) = 9; sol := dsolve({ode1, ode2, initial_conditions}, {x(t), y(t)}, numeric); eq_points := [seq([rhs(eq[1]), rhs(eq[2])], `in`(eq, equilibria))]

[[0., 0.], [100., 0.], [20., 8.]]

(2)

plots[odeplot](sol, [[t, x(t)], [t, y(t)]], t = 0 .. 100, legend = ["Rabbits", "Wolves"], title = "Prey-Predator Dynamics", labels = ["Time", "Population"])

 

``

 

 

plots:-odeplot(sol, [[x(t), y(t)]], 0 .. 50, color = "blue"); equilibrium_plot := plots:-pointplot(eq_points, color = "red", symbol = solidcircle, symbolsize = 15); plots:-display([plots:-odeplot(sol, [[x(t), y(t)]], 0 .. 50, color = "blue"), equilibrium_plot], title = "Phase Portrait with Equilibrium Points", labels = ["Rabbits", "Wolves"])

 

NULL


 

Download predator_prey.mw

Please Wait...