Question: How to combine the result of an animated odeplot with an ordinary animated plot into one single plot

Dear Maple users

I am looking at the problem of a throw with air resistance and trying to compare the resulting trajectory with the case with no air resistance. I have solved the first one using dsolve (numeric) and even made an animation by specifying the frames rate. Now the easy problem without air resistance has an analytic solution, so I just need to plot the parametric solution curve and animate it. In the case with air resistance the object hits the ground before the object not subjected to air resistance. What I want is to combine the two animations into one plot in such a way that the animations are each executed in a real time way. Here are some details:

After the system of differential equations have been solved by means of the rkf45 method, I am saving the animated odeplot in the variable plot1: 

> plot1 := odeplot(solution, [x1(t), x2(t)], t = 0 .. t1, scaling = constrained, labels = ["", ""], frames = 50)

The parametric solution of the case without air resistance is stored in [x(t), y(t)]. Here I am saving the animated plot in the variable plot2:

> plot2 := animate(plot, [[x(s), y(s), s = 0 .. t]], t = 0 .. tmax, scaling = constrained, frames = 50)

Finally I am combining these two plots into one using:

> display([plot1, plot2])

The problem is: The first plot should end after time t1, whereas the second plot is supposed to end after time tmax. The above code will make them end at the same time! I hope someone can help me doing this properly!!

Regards, Erik V.

 

Please Wait...