Maple 2015 Questions and Posts

These are Posts and Questions associated with the product, Maple 2015

I have lots of subsections for organization and have all the outputs at the end...  is there any way to force all/any sections/subsections to remain closed while the whole page is being evaluated? I still want the section to evaluate, but I want it to stay closed.

Hi,

I'm trying to fill an Array but I don't know the correct syntax, and Maple help isn't much use.

How do I form an Array, A, which has 10 rows and 2 columns. Where one column is say the row number squared and the other column is the row number cubed. 

So A would be:

[1 1]
[4 8]
[9 27] .....

Also, I'm using the square and cube numbers as an example. But is there a general format for doing this, whatever the values I want to put in the array are?

Thanks

I am faced by the problem where I used Grid:-Seq()---locally---to do some long time computation and I am faced by the exhaustion of memory problem. I think the problem itself is related to the memory management in maple.

So the problematic function is

# Procedure: ComputeEventsCTypeGrid
#   Compute events such that three quadrics intersects in a point.
#
# Parameters:
#   Q          - a set of quadrics
#
# Output:
#   Indexes of quadrics which intersect in a point.
# TODO:
#  - Memory
#  - Cleanups
ComputeEventsCTypeGrid := proc( Q )
  local s, cType, i, j, k, rootNb, univ, sys;
  s := proc (i, j, k)
    sys := [ Q[i], Q[j], Q[k] ];
    univ := PolynomialIdeals[UnivariatePolynomial]( indets( sys )[1], sys );
    if not type( univ, constant ) then
      rootNb := nops(select(proc(x)op(x)[2]>0;end proc,RootFinding:-Isolate( univ, [ op( indets(univ ) ) ] )) ):
      if rootNb > 0 then
        return [ univ, rootNb, sys ];
      end if:
    end if:
  end proc;
  cType := [Grid:-Seq(seq(seq(s(i,j,k),k=j+1..nops(Q)),j=i+1..nops(Q)),i=1..nops(Q))];
  return cType;
end proc:

A dump from top after calling ComputeEventsCTypeGrid for some data(total amount of memory on this machine is 251G + 48G swap)

VIRT    RES    SHR S  %CPU %MEM     TIME+

33.007g 0.031t   3676 S   0.0 12.5   2606:20
31.137g 0.029t   3436 S   0.0 11.7   2274:34
8645756 4.984g   2840 S   0.0  2.0  32:06.40
28.798g 0.026t   1968 S   0.0 10.7   1821:16
26.650g 0.024t   1968 S   0.0  9.8   1520:54
25.346g 0.023t   1968 S   0.0  9.2   1236:44
23.296g 0.021t   1968 S   0.0  8.4   1004:52
20.498g 0.018t   1968 S   0.0  7.4 790:30.81
16.799g 0.014t   1968 S   0.0  5.9 625:28.12
15.011g 0.013t   1968 S   0.0  5.2 469:36.27
7678444 4.149g   1968 S   0.0  1.6 104:34.22
6734804 623904   1968 S   0.0  0.2  73:13.13
4327420 132516   1968 S   0.0  0.1  24:11.51
3420712 111336   1968 S   0.0  0.0  11:26.16
13.671g 0.011t   1964 S   0.0  4.6 380:15.13
11.771g 9.831g   1964 S   0.0  3.9 274:25.59
9936056 7.769g   1964 S   0.0  3.1 201:13.94
8805512 3.394g   1964 S   0.0  1.3 148:09.53
5077056 1.500g   1964 S   0.0  0.6  42:19.29
2384784  82040   1832 S   0.0  0.0   3:56.57

Size of output data calculated with

> length(sprintf("%m", eval(cType)));

> 326260610

Also, I called gc() at the end of the computations but memory allocated by instances of mserver were not released. Does it mean gc() should be called from each instance separately? My final point is that I have to run some other calculations for different and bigger dataset (It will probably take 2 days to finish -- Q has around 700 polynomials of degree 2) and for this moment I cannot do this because I've gotten an error about not enough amount of memory.

I have 2 questions.

 

1) The help pages discuss the use of functions described by piecewise when using dsolve. The examples are clear enough but nothing is said about using the numeric option and piecewise. I get an error message for a very simple example: y' +R(t) y^2 = 0. Are I correct in assuming that dsllve numeric cannot deal with piecwise continuous functions?

2) I tried to solve a system of 2 second order constant coefficient linear ODEs using dsolve. After a very long wait (over an hour) I gave up. I tried again using "method=laplace" and got an instant answer. I did not bother to mention it here but it occurred again, this time with a fourth order and second order constant coefficient system. Very strange! I know that the laplace transform is a very useful tool; shouldn't Maple also know that?


with(PDEtools, casesplit, declare)
``

L := 1651.12; m := 3205.12; r1 := .1875; r2 := 2; z1 := 0; z2 := 12; ld := 4.5

NULL

declare(u(r, z), w(r, z))``

with(DEtools, gensys)

rr := (L+2*m)*(diff(u(r, z), r))+L*(diff(w(r, z), z))+L*u(r, z)/r

zz := L*(diff(u(r, z), r))+(L+2*m)*(diff(w(r, z), z))+L*u(r, z)/r

rz := m*(diff(u(r, z), z))+m*(diff(w(r, z), r))

BCS := {rr(r1, ld) = 0, rz(r1, z) = T, w(r, 0) = 0, zz(r, z2) = 0}

{3205.12*(diff(u(r, z), z))(.1875, z)+3205.12*(diff(w(r, z), r))(.1875, z) = T, 8061.36*(diff(u(r, z), r))(.1875, 4.5)+1651.12*(diff(w(r, z), z))(.1875, 4.5)+1651.12*(u(r, z))(.1875, 4.5)/r(.1875, 4.5) = 0, 1651.12*(diff(u(r, z), r))(r, 12)+8061.36*(diff(w(r, z), z))(r, 12)+1651.12*(u(r, z))(r, 12)/r(r, 12) = 0, w(r, 0) = 0}

(1)

``

NULL

sys3 := [(L+2*m)*(diff(u(r, z), r, r))+(L+m)*(diff(w(r, z), r, z))+(L+2*m)*(diff(u(r, z), r))/r-(L+2*m)*u(r, z)/r^2+m*(diff(u(r, z), z, z)) = 0, (L+m)*(diff(u(r, z), r, z))+m*(diff(w(r, z), r, r))+(L+2*m)*(diff(w(r, z), z, z))+(L+m)*(diff(u(r, z), z))/r+m*(diff(w(r, z), r))/r = 0]

pdsolve(sys3, BCS, numeric)

 

 

``

``


Download PDE_equation2.mw

Hi all,

I have the following PDE, is it solveable by Maple or not. Do I need a boundary condition and how many or I can get a general solution? I am new to Maple. Any help will be appreciated.

Thank you.

 

 

 

Hello.

I want to to evalute a picewice variable for a vector of values (like t=<0,0.1,0.2,0.3,...,10>) through a button action's code, but i do not know how can i do that. I have attached a picture of my problem. Could you please help me to solve it?

Thank you.

 

Hello,

I am new to Maple. I am working on PDE and I wanted to try an easy example to know how to work with Maple. So, I startted with the example from the HELP, but still get error as shown below. Can someone guides me.

Thank you.

How can I make tick marks on the 2-D plot more visible. Attached is a figure created using my maple 2015 student edition

 

Think I've solved my problems, thanks.

objectiveproc := proc(mmm)
...
return Trace(abs(M));
end proc:
with(Optimization):
i := 0:
t := 1:
Minimize(objectiveproc(x)-abs(Trace(abs(MA))));

Error, (in objectiveproc) invalid subscript selector

 

Hi, I'm having trouble with print doing strange things:


a:=1235
                1235

b:=751
                751


p:=1601
                1601



print(The solution `to` a^x = b (`mod ` p) is x = 1323)

                              1601 The solution to (1235^x) = 751 mod is x = 1323


Why has the 1601 gone to the beginning, and how do I make it go to the correct place?

Also is it possible to remove the brackets from around 1235^x?

And is it possible to make the brackets (that I have put in) go around the `mod` p?

EDIT:

If I do: print(The solution `to` a^x = b (`mod ` ,p) is x = 1323)

I get:  The solution to (1235^x) = 751 (mod, 1601) is x = 1323

So is there a way to just remove the comma on the output?


Thanks.

Hi, I need help finding the index of a given element in a list?

Say I have A:=[2,4,6,8,10,12], I want something that can do something like this:

index(A,6) 
                      3

 

EDIT:

Thanks, and sorry if my questions are trivial but I'm (clearly) not great with maple.

Now say I had two lists:

A:=[5,10,15,20,25,30,35,40,45,50]

B:=[7,14,21,28,35,42]

How would I get maple to return the index of the first element in list B that matches an element in list A, and the index of said element in list A? 


So something (remotely) like:

FirstMatch(B,A)
                        B[5], A[7]

(So I'm not looking for the first case of A[i]=B[i]. I just want i, j where A[i]=B[j])

Hello,

I'm sorry to bother you but I have a problem with the numeric resolution of a system of 3 differential equations. The system is as follows  : sysdif :=

As you can see the system is composed of 3 differential equations, and I enter initial conditions in the object "sysd". Then I try a numeric resolution by executing the following command (I give a value to parameters before)  :

Then Maple's answer is : Error, (in dsolve/numeric/process_input) missing differential equations and initial or boundary conditions in the first argument: sysdif.

I can't see where I'm wrong, does anyone notice something that could explain this error message ? There's no help page about this error so I ask the question here.

Thank you very much for your time if you answer this,

Louis

In this course you will learn automatically using Maple course Statics applied to civil engineering especially noting the use of components properly. Let us see the use of Maple to Engineering.

Static_for_Engineering.mw

(in spanish)

Atte.

Lenin Araujo Castillo

Ambassador of Maple

Hi,

restart;
.123456789*.123456789;
                                               0.01524157875

i need Maple to respond   0.015241578750190521 by adjusting Digits number dynamically. I don't want to adjust  the Digits Number to a fixed value.

Thanks!

First 49 50 51 52 53 54 55 Last Page 51 of 71