Rouben Rostamian

MaplePrimes Activity


These are replies submitted by Rouben Rostamian

@nm You wrote: If Maplesoft is determined to make less and less people use Maple, they are really doing a very good job at it. 

I agree.  I have no idea whom the 2D input is targetted to.  It may appeal to high school students, but I doubt that high school students form a large subset of Maple users.

What is worse, the beginner is more confused than helped by the 2D input, as a plethora of questions in this forum demonstrates.  Hobbling the beginner with the arcane intricacies of the useless 2D input is a disservice.

It seems to me that the vast majority of regular Maple users prefer the 1D input.  I think it will be an improvement if Maplesoft makes the 1D input the default and focuses on 1D in help pages and presentations.  If someone at Maplesoft is overlyl enamored with the 2D input, he may consider keeping it on the side, and out of the way, as a weird curio.

@Kitonum You are right; my z was not as it was supposed to be.  I was careless.

It would help if you explain why are you interested in these equations.  The first one is partial differential equation in the unknown M(a,b).  (The c enters the equation as a parameter, so writing M(a,b,c) is somewhat misleading.)  You need to supply initial and/or boundary conditions to obtain a well-posed problem.

The second equation is an ordinary differential equation in the two unknowns a(t) and b(t).  You need to supply a second differential equation in the unknowns a(t) and b(t) in order to form a well-posed system of two equations in two unknowns.

The question is a bit muddy, especially in view of your comment at the end of the worksheet where you write:

In what way is that a "solution"?  The solution of you system of ODEs should be something like

     u(y) = some function of y

theta(y) = some function of y

What you have shown is nothing like that.  Perhaps you are looking for something else?

 

 

Posting a picture of your equations is not very productive.  I have a couple of ideas toward the solution but I am surely not going to retype your equations.

Consider uploading a maple worksheet so that people can work with it.  Look for the large green up-arrow in the screen where you post/edit your question.

In the mean time, you should also think about the following:

  1.  You say the derivatives of u are small.  What about u itself?  Is it small as well?  (I am writing u for your uu0 for simplicity.)
  2.  You say beta is small.  Are the derivatives of beta small as well?  Note that a function may be small but its derivative may be quite large;  think of y(x) = 1/k *  sin(k^2*x) when k is large.
  3. How does the smallness of beta compare to the smallness of u?  Suppose the smallness is measured by a small number, let's say h.  Compare the case when
        u = u0 + h*u1,   beta = beta0 + h*beta1,
    versus
        u = u0 + h*u1,   beta = beta0 + h^2*beta1.
    These will lead to two different linearizations in general.

@acer I did not know about Explore, I am sure it will come in handy for me in the future.  That's the sort of thing I had in mind when I referred to Maplets.

@Kitonum That's nice.  I should remember to say "uses" instead of with(...) in my procs.

@brian bovril Suppose that a point moves on the plane so that its polar coordinates are (r(t)),θ(t)).  Then its Cartesian coordinates are x = r cos θ, y = r sin θ, whence its velocity components are

  x' = r' cos θ - r θ' sin θ,
  y' = r' sin θ + r θ' cos θ.

were x' means dx/dt, etc.  Squaring and adding up we get x'^2 + y'^2 = r'^2 + r^2 θ'^2.

As to our pirate ship, we have x'^2 + y'^2 = V^2, and  r(t) = v t. therefore  V^2 = v^2 + v^2  t^2 θ'^2, as asserted.

Regarding animation, Kitonum and acer have posted nice responses although those do not quite parallel the mathematical details of the solution that I had posted.   Here is how I did my animation.  (I have added markers for the ships following Kitonum's idea.)  This one may be easier to follow if you want to match with my explanation.

restart;
with(plots):
pirate_pursuit := proc(V, v, L, a, nframes)
  local b, T, t_capture, P_r, P_a, M_r, M_a, frames;

  T := L/(V+v);
  b := t -> sqrt((V/v)^2-1) * ln((V+v)/L*t);
  t_capture := solve(b(t)=a, t);

  # pirate's polar radius and polar angle as functions of time
  P_r := unapply(piecewise(t < T, L - V*t, v*t), t);
  P_a := unapply(piecewise(t < T, 0, b(t)), t);

  # merchant's polar radius and polar angle as functions of time
  M_r := t -> v*t;
  M_a := t -> a;

  # animation frames
  frames := seq(
    display([
      plot([P_r(s), P_a(s), s=0..t], coords=polar, color=red, thickness=5),
      plot([M_r(s), M_a(s), s=0..t], coords=polar, color=blue, thickness=5),
      pointplot([[P_r(t), P_a(t)], [M_r(t), M_a(t)]],
        coords=polar, color=[red,blue ], symbol=solidcircle, symbolsize=30)
    ]) , t=0.. evalf(t_capture), evalf(t_capture/(nframes-1)));

  # animate the paths of the two ships:
  display([frames], insequence, scaling=constrained, axes=normal);

end proc:

# do a demo:
pirate_pursuit(3, 1, 1, 2*Pi-Pi/4, 50);

@gkokovidis The article you have cited is unrelated to the problem at hand.  That article assumes that the persuer can see the persued at all times.  In our problem the persued disappears in the fog.  A different strategy is required.

@wolverine Yes, that is a terrible mistake -- there are no t1 and t2 in your worksheet.

Since you haven't used any words to explain what it is that you want, I am attempting a guess here in total darknes.

restart;

de := diff(y(t),t,t) - e*(1-y(t)^2)*diff(y(t),t) + y(t) = 0;

de1 := subs(y(t) = eta[0](t) + e*eta[1](t), de);

de2 := collect(de1, e);

coeff(lhs(de2), e, 0) = 0;

coeff(lhs(de2), e, 1) = 0;

@Markiyan Hirnyk Acer's post shows much more than just Maple skills.  There is a darn good deal of mathematical inventiveness there.  Same goes for Axel's approach.

@patient I am a bit suspicious of the solution in your worksheet.  There you set b[] equal to the initial condition, and b[] does not change during the rest of the computation.  Do you really mean that?  That looks very odd to me.

Aside: Your calculations may be simplified quite a bit if you compute the matrix P explicitly, as I outlined earlier.  Since P is constant, its inverse, let's call it Pinv, can be calculated just once, as in Pinv := P^(-1), before the iteration begins.  Then the main loop of the computation takes the form

    set U = a  # Initial condition   
    p := plot(<X|U>;
    for i from 1 to N do
      Q := RightHandSide(U);   # RightHandSide() produces the right hand side of the equation
      U := Pinv.Q;
      p := p, plot(<X|U>;
    end do;

Upon exit from that loop, p will contain a sequence of plots.  To see an animation, do

    plots:-display([p], insequence=true);

@Preben Alsholm That's very clever.  I believe that this is just the right way of solving the problem although I don't quite understand the solution's method.  In order to gain a better understanding, I attempted to modify it slighltly in a way that is more comprehensible to me, but I got answers which were obviously wrong.  I will think about this some more and ask you for help if needed.

@Carl Love  At first reading I thought that your comment was tongue-in-cheek, but then I realized that perhaps you are bring serious.  Like you, I haven't had a need for programmatic use of the with command.  I do, however, find with's output in case of a less-frequently used package quite handy.  I know, for example, that the Laplace transform is in the inttrans package. Now, is it "laplace" or "Laplace"?  And what is the command for the inverse Laplace transform?

Another use of with's command is for classroom teaching.  I don't expect an undergraduate student who is taking four other courses besides mine to remember why I load the plots package when doing a demo for them.  Letting with(plots)'s output to spill onto the screen gives me the opportunity to remind the class that this is so that we may access the display and pointplot commands because they may not remember that from the previous demo from two weeks ago.

 

First 81 82 83 84 85 86 87 Last Page 83 of 91