Solutions to Attendance Quiz for Lecture 19 of Dr. Z.’s Dynamical Models in Biology class

Name: Dr. Z.

1. Write the Maple command for the following mathematical expressions

\frac{∂^{2}f}{∂x^{2}} + \frac{∂^{2}f}{∂y^{2}} + \frac{∂^{2}f}{∂z^{2}} ,

Sol:

diff(f,x,x)+diff(f,y,y)+diff(f,z,z);

∫_{x=−∞}^{∞} ∫_{y=5}^{∞} e^{−x^{2}/2−y^{2}/2} dx dy

Sol int(int(exp(-x**2/2-y**2/2),y=5..infinity),x=-infinity..infinity);

Comment: I was wrong when I said that in Maple infinity is abbreviated to infty. You spell out the whole word.

2. Write the Maple command to solve the following system of two differential equations with two unknowns functions, with the given initial conditions

\frac{dx}{dt} = 5x + 7y , \frac{dy}{dt} = −5x + 9y , x(0) = 5 , y(0) = 3

Sol.: dsolve(diff(x(t),t)=5*x(t)+7*y(t), diff(y(t),t)=-5*x(t)+9*y(t),x(0)=5, y(0)=3,x(t),y(t));

.

3. In the Maple package DMB.txt

Let’s define A:=proc(x):SSSg(HWg(u,v,[[1,x,1],[1,1,1],[1,1,1]]),[u,v])[1][1]:  end:

that tells you the ultimate fraction of the genotype AA if all matings are equally likely except that the mating of Ae with each other is x times more likely then all the other mating. How would you plot a graph of A(x) from x=2 to x=30.?

Sol. plot([seq([x,A(x)],x=2..30)]);

A more detailed plot is

plot([seq([0.1*x,A(0.1*x)],x=20..300)]);

(but it takes longer). Note that

plot(A(x),x=2..30);

does not work, since A(x) is not an explicit function of x it is given via a user’s defined numerical procedure.