Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

We’re kicking off 2018 right, with another Meet Your Developers interview! This edition comes from Erik Postma, Manager of the Mathematical Software Group.

To catch up on previous interviews, search the “meet-your-developers” tag.

Without further ado…

 

  1. What do you do at Maplesoft?
    I’m the manager of the mathematical software group, a team of 7 mathematicians and computer scientists working on the mathematical algorithms in Maple (including myself). So my work comes in two flavours: I do the typical managerial things, involving meetings to plan new features and solve my team’s day to day problems, and in the remaining time I do my own development work.
     
  2. What did you study in school?
    I studied at Eindhoven University of Technology in the Netherlands. The first year, I took a combined program of mathematics and computer science; then for the rest of my undergrad, I studied mathematics. The program was called Applied Mathematics, but with the specialization I took it really wasn’t all that applied at all. Afterwards I continued in the PhD program at the same university, where my thesis was on a subject in abstract algebra (Lie algebras over finite fields).
     
  3. What area(s) of Maple are you currently focusing on in your development?
    I’ve spent quite a bit of time over the past two years making the facilities for working with units of measurement in Maple easier to use. There is a very powerful package for doing this that has been part of Maple for many years, but we keep hearing from our users it’s difficult to use. So I’ve worked on keeping the power of the package but making it easier to use.
     
  4. What’s the coolest feature of Maple that you’ve had a hand in developing?
    This was actually working on a problem in a part of the code that existed long before I started with Maplesoft. We have a very clever algorithm for drawing random numbers according to a custom, user-specified probability distribution. I wrote about it on MaplePrimes in a series of four blog posts, here. I’ve talked at various workshops and the like about this algorithm and how it is implemented in Maple.
     
  5. What do you like most about working at Maplesoft? How long have you worked here?
    I love working at the crossroads of mathematics and computer science; there aren’t many places in the world where you can do that as much as at Maplesoft. But the best thing is the people I work with: us mathematicians are all crazy in slightly different ways, and that makes for a very interesting working environment.
     
  6. Favourite hobby?
    Ultimate frisbee. I captain a mixed (i.e., coed) team called The Clockwork. (We play in orange jerseys – it references the book/movie A Clockwork Orange.) We play in a couple of local leagues, and some of the other members also work here. We don’t win much – but we work hard and have fun!
     
  7. What do you like on your pizza?
    Mushrooms. Mushrooms on everything!
     
  8. What’s your favourite movie?
    Probably Black Book, a dark movie about the Dutch resistance in the second world war from 2006, directed by Paul Verhoeven. I think what I like best about it is that it highlights the moral shades of grey in even so morally elevated a group as the resistance.
     
  9. What skill would you love to learn? Why?
    I’d love to learn to speak Russian! I’m trying, but I have a very hard time with it. It would allow me to communicate with my in-laws more easily; they speak Russian.
     
  10. Who’s your favourite mathematician?
    Oh, so many to choose from! I’m torn between:
  • Ada Lovelace (1815-1852), known as the first programmer.
  • Felix Klein (1849-1925), driving force behind a lot of research into geometries and their underlying symmetry groups.
  • Wilhelm Killing (1847-1923), a secondary school teacher who made big contributions to the theory of Lie algebras.

Or wait, can I choose my wife?

FLRW_Metric.mw

I have been tasked with calculating all the non-vanishing Christoffel symbols (first kind) of a metric and have done these long-hand using the Lagrangian method and shown my working. However, for peace of mind I would like to run the metric through Maple and double-check that it returns the same answers (going back through my calculations if I have missed anything). I have attached the code I have written at the bottom.

I have no trouble defining the metric and the manifold but I receive an error message when I try to compute the Christoffel symbols 'improper op or subscript selector'. Could someone point out where I have made a mistake. The metric is the FLRW metric if that helps.

with(DifferentialGeometry):with(Tensor);

g1:=evalDG(-(dt)^2 +a(t)^2*((dx)^2+(dy)^2+(dz)^2)/(1+(k/4)*(x^(2)+y^(2)+z^2))^2 );

C1:=Christoffel(g1, "FirstKind");

 

 

Please take a look at the attached document, a partial design for a power supply I'm working on.  I find I am spending a lot of time reformatting results with units to look as nice as what you see here.  For every result, I need to do Units Formatting, change to a sensible unit like uH instead of 10^-6 H, and then do Numeric Formatting to change the number to show just three significant digits.  That requires from 0 to 2 decimals, in fixed point.

This is the way engineering documents should look.  You want to see a fixed point number from 1.00 to 999, with a certain number of significant digits (not decimal points), and have the unit scaled accordingly.  You want to see 12.3 uA, not 1.23402 x 10^-5 A.

I would like to see Maple add "N significant digits" to its Numeric Formatting options and auto-scale results with units to the appropriate multiplier.  If I could set that as my default result formatting it would save a huge amount of work.  Often as a design progresses the multiplier will change, also.  A result may initially come out in mA but later change to uA.  Not only do I have to do them all manually now, but I have to go back and change them.  Automating all that would be a great help.

(You may also notice that my vector results with units are not scaled like I describe here.  If anyone can tell me how to do that I would appreciate it.  Otherwise, it looks like a bug to me.)

Example_Document.zip

Plot3d in this worksheet calls a procedure which conditionally returns the values for a parametrically defined ellipsoid, but the plot command fails. However the procedure passes the correct list of parametric values when it is called directly.

Is there a way to call a procedure within plot3d which successfully plots a parametrically defined surface?

Plot3d_proc_parametric.mw

Can we overide Maple default dot derivative with 'tau' instead of 't'?

When I use listcontplot, the tickmarks on the axis show the ordinal of the point plotted, so if I have 20x50 points, it shows (1 to 21)x(1 to 51).

Is there any way to reescalate the axis to show the actual units of the points?, so for example (0.3 to 0.7)x(2.2 to 3.7).

Thanks.

Can anyone figure this out? Just getting solutions may have been lost :/ 

 


Kabel FeAl35
restart;
r[FeAl] := .51;
x[FeAl] := I*.38;
c[FeAl] := 9.5*10^(-9);
l[12] := 14;

PEX 240 Al
r[PEX] := 0.8e-1;
x[PEX] := I*.32;
c[PEX] := 11.4*10^(-9);
l[23] := 5;

Beregner Admittanser
X[12] := x[FeAl]*l[12];
R[12] := r[FeAl]*l[12];
Z[12] := R[12]+X[12];
X[23] := x[PEX]*l[23];
R[23] := r[PEX]*l[23];
Z[23] := R[23]+X[23];
C[12] := c[FeAl]*l[12];
C[23] := c[PEX]*l[23];
X[C1] := -I/(50*Pi*C[12]);
X[C2] := -I/(50*Pi*C[23]);
YC1 := 1/X[C1];
YC2 := 1/X[C2];
Y12 := 1/Z[12];
Y23 := 1/Z[23];
Y11 := Y12+YC1;
Y22 := Y12+YC1+Y23+YC2;
Y33 := Y23+YC2;
Y13 := 0;
Y := Matrix([[Y11, -Y12, -Y13], [-Y12, Y22, -Y23], [-Y13, -Y23, Y33]]);
PL2 := 5000000;
PL3 := 3000000;
PG3 := 2300000;
PF := .98;
P2 := -PL2;
Q2 := P2*tan(arccos(PF));
P3 := PG3-PL3;
Q3 := P3*tan(arccos(PF));
V1 := 22000;
eq1 := conjugate(V2)*V2*V2 = ((P2-I*Q2)*V2-conjugate(V2)*V2*(V1*Y12+V3*Y23))/Y22;
eq2 := conjugate(V3)*V3*V3 = ((P3-I*Q3)*V3-conjugate(V3)*V3*(V1*Y13+V2*Y23))/Y33;
solve({eq1, eq2}, {V2, V3});
 

I know it is very basic but…: I need the remainder of a division. I read about the "mod" operator in the Maple guide but I could not understand if it is what I need and if it works like it does in some other programming environments (i.e. Xojo).

Could you help me and, in case it's not what I need, tell me how to get said remainder?

Thank you

Hello

Equal_products_16.mw

I think this code was written (Joe Riel/C.Love) on Maple 16 platform back in 2013, but I want it to work in my currrent version.

I think I had to set up a compiler, which was a bit of an ordeal.

compiler setup?

I have installed MS Visual Studio. 

Now in Maple I try:

>Compiler:-Setup()

i put vcvars64.bat and vcvarsx86_amd64.bat (from Microsoft Visual Studio folder) in my C:\Program Files\Maple 2017\bin.X86_64_WINDOWS and locate them

I get error

Error, (in Compiler:-Setup) unable to write to initialization file, C:\Program Files\Maple 2017\bin.X86_64_WINDOWS/launch.ini, possibly due to insufficient permissions
 

@

Hi,

Does anyone know how to use applyrule to generic functions? I have a set of functions in 4D of the form name(t,x,y,z) and I would like to replace all of them by taking

name(t,x,y,z)-> name_1(t,x)*name_2(y,z)

I think I can use ApplyRule to do this but I am not sure how.

Thanks!

 

Hi. 

 

When I make calculations I often get a result such as: 1.061153846*10^7.

 

I would like to make Maple always show this result as 10611538. I can get this by right-clicking on the original number and choose Integer -> Round. But can I make Maple show it by default?

Hello everybody.

Maybe I'm so lucky but I found again the problem connected with "Kernel connection lost"; error (see one of my previous post regarding this ). But now I used Intel-based processor.

Here the simple code of my program:

restart;
R0 := exp((2*Pi*I)*n^2*z);
R1 := sum(R0, n = -infinity .. infinity);
R1 := abs(R1)^2;
R2 := exp((2*Pi*I)*(n+1/2)^2*z);
R2 := evalf(sum(R2, n = -infinity .. infinity));
R2 := abs(R2)^2;
R := evalf(sqrt(Im(d))*(R1+R2));
plot(R, k = 1 .. 10);

After this I got message from Windows 7 (64 bit) that mserver.exe has stopped and then above mentioned error with Kernel connection lost. Anybody knows what is the problem?

P.S. Maple 17 (64 bit).

Dear bright people of MaplePrimes, 

I'm stuck in a problem with dsolve.

I have a ODE system that I would like to solve numerically (because it's huge) in vars: var1(t), var2(t), var3(t), etc... Inside the ODE there are procedures with arguments like proc(f(x,y), a, b, c, etc...) where f(x,y) is a function for a curve (so x and y are variables) and a,b,c are numeric. 
Procedures have been written as indicated in the help page, i.e. differentiating whether the procedures are called with symbolic arguments or numeric arguments. So I call dsolve specifying the "known" procedures and a numeric method. Maple sets the problem correctly. However, when it tries to solve the equations numerically it points out that in the ODE ys there are some undefined parameters. Specifically, those parameters are x, y. But, again, x and y are not parameters but variables that are used in the procedures within the ODEs. 

I tried to include x and y as parameters and solve the system. However, before retrieving the solution, a numerical value must be given to all the parameters. 

What should I do if I need to keep f(x,y) symbolic in my procedures but I want to solve my ODE numerically? 

Thank you for supporting me. 
Thank you so much. 

Andrea



 

 

I have lists like below, how to compute the size of such lists.

Y := {Theta[i, j, 2]+2*Omega[i, j, 2]+4*GAMMA[i, j, 2], Omega[i, j, 1]+3*GAMMA[i, j, 1]+Omega[i, j, 2]+3*GAMMA[i, j, 2], -Theta[i, j, 1]+2*GAMMA[i, j, 1]+Omega[i, j, 2]+3*GAMMA[i, j, 2]}

Size of Y is 3 as you see, but Dimension and Count commands failed to return it. 

Hello, everybody,

If I had the graph of a function just like plot(sin(x), x=-2..2)

The question is I want to plot this function is discrite form    by the pair of points (x[i], sin9x[i]) and i=1...N, where N is an integer number

First 875 876 877 878 879 880 881 Last Page 877 of 2231