Rouben Rostamian

MaplePrimes Activity


These are replies submitted by Rouben Rostamian

The problem lies in a shortcoming (or bad design) of convert(f, elsymfun).  Compare that to the behavior of type(f, symmfunc), which requires the names of the polynomial's variables as argument:

u := a*(x+y) + b*(x^2+y^2) + a*b*(x^3+y^3);
type(u, symmfunc(x,y));

                                                    true

With a proper redesign of convert(f, elsymfun) we should be able to do:

convert(u, elsymfun(x,y));

 

You need to be a little more specific.  What do you know of the surface?  Is it given by an equation like z=f(x,y)?  Or is it defined parametrically?  What do you mean by a projection?  Will you be happy if we map the entire plane to a single point on the surface?  If not, then what would you wish to have?

@fairuzalwani Your equation is:
    y:=y[t+1] +e(x[t]) mod N
but in your explanation you write:
    y[1] congruent to y[0]+e(x[0]) mod 8=6-1 mod 8=5
Where does that y[0] come from? How do you get there from y[t+1]?

Things may make better sense if you change your first equation to
    y:=y[t] +e(x[t]) mod N
although even then I am not happy with the clumsy formulation.  I assume that what you really have in mind is:
    y[i+1] = y[i] + e(x[i]) mod N
    x[i+1] = x[i] + y[i+1] mod N

I have made a worksheet in accordance with this latter formulation.  I will post it on this page as an Answer.

I don't understand the meaning of the iteration
y:=y[t+1] +e(x[t]) mod N
x:=x[t]+y[t+1] mod N

Pick an N, let's say N=8.  Pick initial data, let's say x[0]=5, y[0]=6.  Can you show me how you calculate x[1] and y[1]?  I mean by hand, not by Maple.

 

@mehdi jafari Your stated goal of "fitting the answer to a specific diagram" is too vague, making it difficult to provide a good advice. If you post the data that you have in mind, then perhaps some people may have a go at it.

 

I don't know about you, but I would hate to wade through the sort of worksheet that you have presented because I find it totally unreadable.

Advice: Your interface is set for 1-D input which is good.  It is set to Document Mode, which is bad.  Try the Worksheet Mode instead.  You will find it under Tools->Options->Interface.  Change it, then click on Save Globally to make it the default.

It is too late to rescue your existing worksheet.  Fix the interface as above, exit Maple, restart, create a new worksheet from scratch, and type your program there.  Do not copy/paste from your previous worksheet because that will import the mess into the new one.

One last thing:  Enter each statement in its own execution group.  Do not put several statements in one execution group because that appears to be your downfall.

See the attached sample worksheet (based on your own work) to see what things should really look like.

sample-worksheet.mw

 

@Kitonum and @vv, thanks for your answers to my question. These do more than I had expected can be done with the available tools.

I must note that your two solutions are effectively the same because min(a,b) is by definition piecewise(a<b, a, b).

@Carl Love I didn't know about InertForm:-Parse.  Thanks for pointing it out.

@vv I like your approach very much.  It's very clever and insightful.

In your procedure I think the definition of c may be shortened to
c := 1/eval(F, [X,Y]);
because the proc is fundamentally based on the identity
F(x,y) = F(a,y)*F(x,b)/F(a,b)
which holds for any function F(x,y)=f(x)*g(y), and any a and b.

It's a pity that sometimes the user needs to supply very special a and b values to produce the simplest results.  I am still impressed by Mathematica's Simplify which does not require such a hint.

@Kitonum I have no idea at all how Mathematica figures that out.  It is very impressive that a machine can be so clever.

It is likely that you already know that there is no analytic solution to your equations, that is, no solution in terms of elementary function.  You may expect a solution expressed in the Fourier series, or a numerical solution.

Currently Maple has no capability for solving Laplace's equation either numerically or in Fourier series.  Maybe in a future version it will.

However you may solve your problem by implementing your own solver.  The Fourier series solution is not difficult; it is done pretty much in every textbook on introductory PDEs.  A numerical solution with finite differences is also quite straightforward.  Doing one or the other, (or both!) can be good learning exercises.

If you attempt to do these, I suggest that you do a simpler problem first.  Solve the PDE with a given right-hand side such as diff(u(x,y),x,x) + diff(u(x,y),y,y) = -1, and zero boundary conditions on all four sides.

 

You seem to know the difference between a colon ":" and a semicolon ";" for terminating Maple statements, but just in case you don't, let me explain.

Statements terminated by either a colon or semicolon are evaluated fully in Maple.  The only difference is that the result of the evaluation is not shown when the statement is terminated with a colon.

Is there a reason why you have terminated two of your statements with colons?  Don't you want to see the result? Why not? The results can be very informative.

For instance, it seems that you expect your yy to be a pair of partial differential equations.  Is it?

In Maple 2016 I get the expected answer.  Perhaps you have other stuff in your worksheet that interferes with the calculation.  Try it on a fresh worksheet.

The question as stated is incomplete, to say the least.

  1. One solves a PDE on a prescribed domain.  What is the domain of your function u(x,t)?  You need to say something like x is in the interval [-1,1] and t > 0.
  2. You need to specify boundary conditions.
  3. You need to specify an initial condition.
  4. I can make no sense of your condition x=0.  What is it saying?
  5. I can make no sense of your statement that t is a step function. If t is a function, then it must be a function of something.  What is that something?

 

@nm OK, your latest version looks good.

As to your comment: "Maybe mapping the interval first from -1..1 to 0..2 and then mapping again solution back to -1..1 at the end is a simpler method", yes, it is.  Not only the calculation is significantly easier (by hand, or by Maple), the solution is more compact, and the distinction between odd and even indices does not arise.  It is simply:

where

First 71 72 73 74 75 76 77 Last Page 73 of 99