Product Tips & Techniques

Tips and Tricks on how to get the most about Maple and MapleSim
MathWorld: the web's most extensive mathematics resource. Created, developed, & nurtured by Eric Weisstein with contributions from the world's mathematical community.
The server time seems to be (at least) 5 minutes off. Alec
p >Hello. I'm still kind of new to the practice of using a computer program to manipulate equations. I knew that one way to define an ellipse is as the locus of points P such that for 2 fixed points F1 and F2 the sum PF1 + PF2 is constant. I also know that in Cartesian coordinates, we get a formula of the form Ax2 + By2 = 1. If we set up our coordinate system such that F1 and F2 are on the x axis each a distance c from the origin and the maximum width of the ellipse is 2a, let's try to figure out A and B using MAPLE.

> Maple Equation

The following equation cannot be plotted correctly in the usual 3 dimensional plot with Cartesian coordinates. eq := (x^2+y^2+z^2-1)^3 - x^2*z*3 - y^2*z^3 = 0; Either a 3 dimensional implicit plot, or a spherical coordinates plot is needed. What surprised me was how long Maple 10.06 took to produce the latter with very roughly the same amount of detail as the former: 454 s versus 0.7 s. It seems as though one should always prefer the implicit plot to the spherical plot if the 3 dimensional Cartesian plot fails. I would be grateful for any thoughts about this and any improvements to the code below. (Apologies for not posting the worksheet – I think that File Manager might object to its 10MB size!)
Occasionally Maple does not make me happy, if I want numerical integrals with more than the 14 digits which are supplied through the NAG libraries - that may be rather slow. So I wrote my own solution using LCC-WIN32 (a (free) compiler system allowing 104 decimal points of precision), where I coded the double exponential integration method. That gives me what I want to have in reasonable time. Details are sketched in the uploaded zip-file (it contains all what is needed to run the stuff). Some draw-back: this is for Windows only and because of OpenMaple at least Maple 9 is need.
Pari is a C library mainly for Number Theory, but it has excellent numerics, both real and complex case and with arbitrary precision. As it seems not to use much symbolics for that it is quite fast. This can be useful for some special functions or integration, see the appended example worksheets (and may be Linear Algebra a bit later these days).
I did that for matrix inversion:

Here is some stuff for doing that by calling Maple from Excel. The reason
is that one could care for extreme cases, where a really good precision
is needed. I included an example how to switch to rationals, where the
inversion can even be done exactly (do not use it for dimensions to high
and then it would be better to do it solely in Maple + cut&paste).
From time to time people ask on this site or elsewhere whether modules in Maple can be used the same way as objects in object oriented languages. The answer is yes and no. Yes - because OOP behavior can be simulated with modules - certainly not with full blown functionality, but still. No - because that is usually not the best way to do things in Maple. Here is an example of creating a type and an 'object' exploring it, with few 'methods'.
Recently, working on Nested Verification, I took a look at the whattype procedure. First, I couldn't find any use of local variables t1, t2, L, k1, k2 declared in it. That seems odd. Second, the order of types in it seems to be not exactly right. In particular, symbol is located earlier than `module`. Also, some types are missing, record for example. That leads to not recognizing modules and records,
r := Record( 'a', 'b' ):
m := module() end:
whattype(r);
                                symbol
whattype(m);
                                symbol
Similarly to the compact and efficient version of Nested Verification, I wrote a "compact and efficient" version of whattype,

Nested verification can be done in Maple using the following command,

VerifyTools:-AddVerification('nested'=proc(x,y,ver::verification)
if whattype(x)=whattype(y) then 
if x::Vector then verify(x,y,'Vector'('nested'(args[3..-1])))
elif x::Matrix then verify(x,y,'Matrix'('nested'(args[3..-1])))
elif x::Array then verify(x,y,'Array'('nested'(args[3..-1])))
elif x::array then verify(x,y,'array'('nested'(args[3..-1])))
elif x::set then verify(x,y,'set'('nested'(args[3..-1])))
elif x::list then verify(x,y,'list'('nested'(args[3..-1])))
elif x::relation then verify(x,y,'relation'('nested'(args[3..-1]))) 
elif x::range then verify(x,y,'range'('nested'(args[3..-1]))) 
else verify(x,y,args[3..-1]) fi 
else verify(x,y,args[3..-1])
fi end);

UPDATE!!! I found that my blogpost appers in Maple reporter. You should know, that this blogpost was just a question about how to solve my problem better. Alec Mihailovs gave me and aswer and his solution of testing nested objects is much better. If you still want to use my piece of code, you should remove "set object" form "convertAMVStolist" procedure and replace all occurrences of "hastype" with "type" (as mentioned in comments below).


This piece of code should be able to test two objects (not of every type) for equivalence (like testeq() does). The benefit is, that it should be able to test also nested objects. Is there any other and more simple way how to do that? How to test nested objects in sets?

Hi everyone, I am an undergraduate studying Stochastic Financial Modelling. I am currently writing up a simple brownian motion as shown on the attachment. I have difficulty in simulation a number of these paths and displaying 5 or so of them on the graph with the average path of all simulated paths. In this case, i would expect the average to be a straight line along the axis. Can anyone help me with this as i am only a novice in maple programming? Thanks, Steve
Hello i wonder whether its possible to solve elliptic pdes numerically in Maple10. I didnt succeed. I have a 2dim. poisson equation with the source term being the output from an other pde, i.e the source term can not be given in closed form so how to integrate this? i always get the message that Maple10 can not solve elliptic pdes Thanks for any ideas
The question of how to scale the x-axis with intervals of Pi has been raised on a number of occasions. Inspired by a contribution from Will, I produced the procedure and examples shown in the worksheet attached below. Hopefully, Maple users will find it useful. J. Tarr View 724_Pi axes.mw on MapleNet or Download 724_Pi axes.mw
View file details
Does anybody know why Maple's support of PDF is so poor? I posted a forum topic entitled "PDF support" in the past but didn't get any satisfactory answers. Suppose that I want to automatically generate a bunch of PDF files in Maple and manually saving each one as PDF isn't an option because it is too time consuming? Am I the only Maple user who has ever encountered this option? A search of the web seems to indicate that this is the case. I want to use Maple over Mathematica, but this is one issue that has prevented me from making the switch (permanently) so far. I am currently running Maple 10.04 for Mac on OS 10.4.8 on a G4.
First 56 57 58 59 60 61 62 Page 58 of 65