Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

In attempting to store procedures in a table to create an extensible module, I used the following procedure to test whether a procedure could be queried from the table and executed.

proc() print("Metric is default") end proc;

The result was proc () print("Metric is default") end proc

I have checked the statement with mint in the code editor, but it reports no errors. I get the same result when I use an eval statement around the procedure.  I would be very interested in understanding what is wrong with the procedure as defined.

 


 

Do implicit plots need to be strictly real valued because of the multivalued problem with complex functions? because i get this really funny output for this one, and if I increase Digits, it produces a blank axis for some reason.



 

Hi everyone, now I try to plot a graph by varying more than one variable. Is it possible to vary for more than one variable at a time (vary the two or more variable at one once) Please anybody can help in this regard?
 

``

``

``

``

w := .572433:

``

for j to nops(N) do sol1 := dsolve([diff(diff(diff(f(eta), eta), eta), eta)+w*x(f(eta)*(diff(diff(f(eta), eta), eta))-(m*m)*(diff(f(eta), eta))-(diff(f(eta), eta))^2) = 0, y*(diff(diff(theta(eta), eta), eta))/(pr*z)-b*f(eta)*(diff(f(eta), eta))*(diff(theta(eta), eta))-b*f(eta)^2*(diff(diff(theta(eta), eta), eta))+f(eta)*(diff(theta(eta), eta)) = 0, f(0) = N[j], (D(f))(0) = 1, (D(f))(20) = 0, theta(0) = 1, theta(20) = 0], numeric, method = bvp); plots[odeplot](sol1, [eta, ((D@@2)(f))(eta)], color = red); plots[odeplot](sol1, color = red); plots[odeplot](sol1, [eta, theta(eta)], color = K[j], linestyle = L[j]); fplt[j] := plots[odeplot](sol1, [eta, f(eta)], color = K[j], axes = boxed, linestyle = L[j]); tplt[j] := plots[odeplot](sol1, [[eta, theta(eta)]], color = K[j], axes = box, linestyle = L[j]) end do:

 

 

sol1(0)

[eta = 0., f(eta) = HFloat(29.999999999999986), diff(f(eta), eta) = HFloat(0.9999999999999996), diff(diff(f(eta), eta), eta) = HFloat(7.515045554999997), theta(eta) = HFloat(0.9999999999999996), diff(theta(eta), eta) = HFloat(-0.42693869190857225)]

(1)

odeplot(sol1, [x, y(x)], -4 .. 4, numpoints = 25)

odeplot(sol1, [1.32156, 5.29387], -4 .. 4, numpoints = 25)

(2)

 

 

``

``

NULL

NULL

NULL

NULL

``


 

Download MHD_cchf.mw
 

``

``

``

``

w := .572433:

``

for j to nops(N) do sol1 := dsolve([diff(diff(diff(f(eta), eta), eta), eta)+w*x(f(eta)*(diff(diff(f(eta), eta), eta))-(m*m)*(diff(f(eta), eta))-(diff(f(eta), eta))^2) = 0, y*(diff(diff(theta(eta), eta), eta))/(pr*z)-b*f(eta)*(diff(f(eta), eta))*(diff(theta(eta), eta))-b*f(eta)^2*(diff(diff(theta(eta), eta), eta))+f(eta)*(diff(theta(eta), eta)) = 0, f(0) = N[j], (D(f))(0) = 1, (D(f))(20) = 0, theta(0) = 1, theta(20) = 0], numeric, method = bvp); plots[odeplot](sol1, [eta, ((D@@2)(f))(eta)], color = red); plots[odeplot](sol1, color = red); plots[odeplot](sol1, [eta, theta(eta)], color = K[j], linestyle = L[j]); fplt[j] := plots[odeplot](sol1, [eta, f(eta)], color = K[j], axes = boxed, linestyle = L[j]); tplt[j] := plots[odeplot](sol1, [[eta, theta(eta)]], color = K[j], axes = box, linestyle = L[j]) end do:

 

 

sol1(0)

[eta = 0., f(eta) = HFloat(29.999999999999986), diff(f(eta), eta) = HFloat(0.9999999999999996), diff(diff(f(eta), eta), eta) = HFloat(7.515045554999997), theta(eta) = HFloat(0.9999999999999996), diff(theta(eta), eta) = HFloat(-0.42693869190857225)]

(1)

odeplot(sol1, [x, y(x)], -4 .. 4, numpoints = 25)

odeplot(sol1, [1.32156, 5.29387], -4 .. 4, numpoints = 25)

(2)

 

 

``

``

NULL

NULL

NULL

NULL

``


 

Download MHD_cchf.mw

 

This is a picture of what maple looks like on  my laptop with a 14 inch screen (which ahas a 3200*1800 resolution).

As you can see the icons at the top are small, I'd love to make them permanently bigger; however the larger (smaller) probelm  is the default text size on the plot. Its microscopic. Is there anyway to change it so by default the font is much bigger every time i make a plot?

 

Does anyone know why the following gives an error of invalid loop statement termination?

if true then
  for i from 1 to 2 do
  end do
else
end if

while putting a semicolon after `end do' fixes it.

This seems to only occur in if else statements, when end do appears directly before the else

I can't figure out why this pattern is failing

restart;
r:= y=3;
patmatch(r,y=z::integer,'la');
patmatch(r,identical(y)=z::integer,'la');
patmatch(r,y::anything=z::anything,'la');

What Am I doing wrong?

 

 

I try to calculate the alpha1,alpha2…which were showed in the reference paper.  Actually, the parameter of A and B is identical to the reference result, but the parameter alpha1,alpha2…… do not as same as shown in the reference paper. The attachment is my Maple code about this problem. Please tell me why this does not work.  By the way, I can not get the integration result in which the integral function contains the differential, such as  alpha3 and alpha4.
 

 

Download feijisuan.mwfeijisuan.mw

 

 

 

how to massive install 100 maple into amazon to do distributed computing or cluster computing?

and how to write this distributed function to run into 100 maple instance?

assume there is a function with two parameter which is the range of array

and the total number of times of calculations is from 1 to 9^(9^2) and divided this range into many range by  each range length 100,000

how can it write the output into a list of length 9^(9^2) ?

will there limit in length of list or result?

and 100 instance of virtual machine may not enough to calculate, how to allocate the next 100,000 calculations to idle instance which finished previous 100,000 calculations?

 

How do I alter the font style of specific characters in say a plot title in the one below, i want "gcd" to be non itallics, but i want the rest to remain itallics. I need to be able to do this with command line code, because it will be for an animation made frame by frame from still images made in maple.

 




Maple Worksheet - Error
 

HELP.mw

Dear Colleagues!
I want to define a tridiagonal matrix and the entries should have the following form. Please help me in this regard.

Last week, in the first of a series of three articles, I demonstrated the new color syntax highlighting in the command line (TTY) interface of Maple 2018.1. This week, we'll look at a new facility for manipulating the command line history, the history meta-commands.

For the series of screen shots in this article, assume that the .maple_history file in your home directory initially contains the following:

    p1 := plot(sin,color="DeepPink"):
    p2 := plot(cos,color="DodgerBlue"):
    plots[display](p1,p2);

Now we'll start cmaple and execute a series of commands:

    |\^/|     Maple 2018.1 (X86 64 LINUX)
._|\|   |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2018
 \  MAPLE  /  All rights reserved. Maple is a trademark of
 <____ ____>  Waterloo Maple Inc.
      |       Type ? for help.
> y := 1/(x^4+1);
                                     1
                              y := ------
                                    4
                                   x  + 1

> int(y,x);
     1/2           1/2             1/2           1/2
1/4 2    arctan(x 2    + 1) + 1/4 2    arctan(x 2    - 1)

                    2      1/2
            1/2    x  + x 2    + 1
     + 1/8 2    ln(---------------)
                    2      1/2
                   x  - x 2    + 1

> diff(%,x);
          1                       1              1/2
--------------------- + --------------------- + 2
       1/2     2               1/2     2
2 ((x 2    + 1)  + 1)   2 ((x 2    - 1)  + 1)

    /         1/2        2      1/2              1/2 \
    |  2 x + 2         (x  + x 2    + 1) (2 x - 2   )|
    |--------------- - ------------------------------|
    | 2      1/2               2      1/2     2      |
    \x  - x 2    + 1         (x  - x 2    + 1)       /

      2      1/2        /      2      1/2
    (x  - x 2    + 1)  /  (8 (x  + x 2    + 1))
                      /

> simplify(%);
memory used=5.2MB, alloc=41.3MB, time=0.11
                                 4
                                x  + 1
                 -------------------------------------
                   2      1/2     2     1/2    2     2
                 (x  + x 2    + 1)  (x 2    - x  - 1)

> normal(%,expanded);
                                   1
                                 ------
                                  4
                                 x  + 1

There are two parts to the history:

  1. Session history consists of the commands you've entered in the current session.
  2. Command history consists of all commands from previous sessions, together with the session history (up to a maxium specified by interface(historysize), which is 1000 lines by default).

History meta-commands all begin with two exclamation marks at the beginning of the line. The !!= meta-command lists the session history:

> !!=
<< y := 1/(x^4+1);
<< int(y,x);
<< diff(%,x);
<< simplify(%);
<< normal(%,expanded);

Notice that each displayed line of the history is preceeded by << to differentiate it from Maple input and other Maple output. Each meta-command also has a long form. The long form for !!= is !!list:

> !!list
<< y := 1/(x^4+1);
<< int(y,x);
<< diff(%,x);
<< simplify(%);
<< normal(%,expanded);

Most meta-commands can take an argument specifying the amount of history to be affected. For example, a numeric argument refers to the last lines of the command history. Here, !!=8 includes the 3 lines from the previous history, as well as the 5 lines of session history:

> !!=8
<< p1 := plot(sin,color="DeepPink"):
<< p2 := plot(cos,color="DodgerBlue"):
<< plots[display](p1,p2);
<< y := 1/(x^4+1);
<< int(y,x);
<< diff(%,x);
<< simplify(%);
<< normal(%,expanded);

An argument beginning with a forward slash ("/") refers to all history lines beginning with the most recent one that contains the text entered after the slash (if the text to be searched for does not begin with a space or a digit, the slash can be omitted):

> !!=/diff
<< diff(%,x);
<< simplify(%);
<< normal(%,expanded);

We'll quit Maple and start a new session to illustrate another aspect of the history meta-commands.

> quit
memory used=6.4MB, alloc=41.3MB, time=0.14

In the new session, the meta-command !!=/x^4 will list everyting from the previous session starting from the most recent matching line:

    |\^/|     Maple 2018.1 (X86 64 LINUX)
._|\|   |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2018
 \  MAPLE  /  All rights reserved. Maple is a trademark of
 <____ ____>  Waterloo Maple Inc.
      |       Type ? for help.
> !!=/x^4
<< y := 1/(x^4+1);
<< int(y,x);
<< diff(%,x);
<< simplify(%);
<< normal(%,expanded);

If a !!= meta-command with a numeric or search argument is executed as the first command in a fresh session, not only is the specified amount of command history listed, but that part of the history is then considered to be session history. Executing just !!= with no argument shows that this is the case:

> !!=
<< y := 1/(x^4+1);
<< int(y,x);
<< diff(%,x);
<< simplify(%);
<< normal(%,expanded);

The !!! meta-command (long form !!play) re-executes the entire session history:

> !!!
>> y := 1/(x^4+1);
                                     1
                              y := ------
                                    4
                                   x  + 1

>> int(y,x);
     1/2           1/2             1/2           1/2
1/4 2    arctan(x 2    + 1) + 1/4 2    arctan(x 2    - 1)

                    2      1/2
            1/2    x  + x 2    + 1
     + 1/8 2    ln(---------------)
                    2      1/2
                   x  - x 2    + 1

>> diff(%,x);
          1                       1              1/2
--------------------- + --------------------- + 2
       1/2     2               1/2     2
2 ((x 2    + 1)  + 1)   2 ((x 2    - 1)  + 1)

    /         1/2        2      1/2              1/2 \
    |  2 x + 2         (x  + x 2    + 1) (2 x - 2   )|
    |--------------- - ------------------------------|
    | 2      1/2               2      1/2     2      |
    \x  - x 2    + 1         (x  - x 2    + 1)       /

      2      1/2        /      2      1/2
    (x  - x 2    + 1)  /  (8 (x  + x 2    + 1))
                      /

>> simplify(%);
memory used=5.2MB, alloc=41.3MB, time=0.10
                                 4
                                x  + 1
                 -------------------------------------
                   2      1/2     2     1/2    2     2
                 (x  + x 2    + 1)  (x 2    - x  - 1)

>> normal(%,expanded);
                                   1
                                 ------
                                  4
                                 x  + 1

Notice that each command is displayed with a >> prompt. This prompt is used whenever a command in the history is being played back.

History commands can be played back one step at a time using the !!. (or !!step) meta-command. Each command is displayed with the >> prompt, and you are given the opportunity to edit it before pressing Enter to execute it. Here, we've changed the exponent of from 4 to 3 before pressing Enter, and then pressed Enter four more times to re-execute the remaining commands:

> !!.
>> y := 1/(x^3+1);
                                     1
                              y := ------
                                    3
                                   x  + 1

>> int(y,x);
                                                                  1/2
                          2                 1/2        (2 x - 1) 3
  1/3 ln(x + 1) - 1/6 ln(x  - x + 1) + 1/3 3    arctan(--------------)
                                                             3

>> diff(%,x);
                1          2 x - 1               2
            --------- - -------------- + ------------------
            3 (x + 1)       2              /         2    \
                        6 (x  - x + 1)     |(2 x - 1)     |
                                         3 |---------- + 1|
                                           \    3         /

>> simplify(%);
                                   1
                          --------------------
                                    2
                          (x + 1) (x  - x + 1)

>> normal(%,expanded);
                                   1
                                 ------
                                  3
                                 x  + 1

When editing a command prefixed with the >> prompt, the command is edited in-place in the history. In other words, the history is permanently modified. History meta-commands are not played back (or infinite loops could result), and lines containing only comments are displayed but not offered for editing.

Still in the same session, let's use !!. with a search pattern to generate and display the plots from the older history, pressing Enter after each command:

> !!./p1 :=
>> p1 := plot(sin,color="DeepPink"):
>> p2 := plot(cos,color="DodgerBlue"):
>> plots[display](p1,p2);

                                                                        
                                    |                                   
 -*\    /*-*                      1-+*     *-*\                     /*- 
   \   //  \\                    // |\\   /   \                     /   
    \  /    \\                   /  | \  //    \                   /    
    \ /      *                  *   |  * *     \\                  /    
     **      ||                 |   |  |*       *                 *     
     *|       |                |    |   *       ||               ||     
     ||       ||               |    |  |*        |               |      
    |||        |              |     |  | |       |               |      
    | ||       |              |     | || |        |             ||      
    |  |       ||            || 0.5 | |  |        |             |       
   |   |        |            |      | |   |       |             |       
   |   ||       |            |      |||   |        |           ||       
   |    |       ||           |      ||    |        |           |        
  |     |        |          |       ||     |       |           |        
  |     ||       |          |       ||     |        |         ||        
  |      |       ||         |       |      |        |         |         
 ||      |        |        |        |       |       |         |         
 |       ||       |        |        |       |       ||       ||         
 +--------+-------++-------+-------++-------+--------+-------+--------+ 
  -6      |  -4    |    -2|       0||        |2      |   4   |      6|| 
          ||       |      |        ||        |       ||     ||       |  
           |       |      |       | |        |        |     |        |  
           |        |    ||       | |        ||       |     |       ||  
           |        |    |        | |         |       ||    |       |   
            |       |    |       || |         |        |   |        |   
            |        |  ||       |  |         ||       |   |        |   
            |        |  |      -0.5 |          |       ||  |       |    
             |       |  |       ||  |          |        | |        |    
             |        |||       |   |          ||       | |       ||    
             ||       ||        |   |           |       |*|       |     
              |       **       |    |           |        *        |     
              |*      |*       |    |            |      **|      *      
               \     /*\\     *     |            *\     / *      /      
               \\    /  \    //     |             \    // \\    /       
                \\  //   \   /      |             \\   /   \\  //       
                 *-*/    \*-*    -1 |              \*-*     *-*/        
                                    |                                   
                                                                        

>> !! y := 1/(x^3+1);
> _

On the last line above, we typed !! followed by a space (long form !!stop) to tell Maple to stop playing back commands and give a fresh prompt. If we now issue !!=, we see that the session history still contains only the five commands it contained originally. The played back commands were not appended to the history:

> !!=
<< y := 1/(x^3+1);
<< int(y,x);
<< diff(%,x);
<< simplify(%);
<< normal(%,expanded);

Issuing a new command at the regular > prompt adds it to the end of the session history:

> sin(Pi/2) + 1;
                                   2

> !!=
<< y := 1/(x^3+1);
<< int(y,x);
<< diff(%,x);
<< simplify(%);
<< normal(%,expanded);
<< sin(Pi/2) + 1;

The !!- (or !!drop) meta-command deletes one or more commands from the history:

> !!-
> !!=
<< y := 1/(x^3+1);
<< int(y,x);
<< diff(%,x);
<< simplify(%);
<< normal(%,expanded);
> !!-/simpl
> !!=
<< y := 1/(x^3+1);
<< int(y,x);
<< diff(%,x);

In addition to the meta-commands described above for manipulating the history within a session, there are three meta-commands to copy history to and from files:

  • !!> (or !!save ) writes the session history to the specified file.
  • !!< (or !!read ) replaces the session history with the contents of the specified file.
  • !!+ (or !!append ) appends the contents of the specified file to the session history.

Used together, these meta-commands let you save important sessions for later examination or reuse without relying on the .maple_history file, or let you make large changes to the current session history using your favorite text editor.

The !!? (or !!help) meta-command displays a short summary of all the meta-commands:

> !!?

The sequence "!!" at the beginning of a line introduces a history meta-command.
Each has a short or long form (shown below in parentheses). The long form name
may be used instead of the single character appearing after "!!".

!!=specifier    - list session history or specified lines (list)
!!!specifier    - play back session history or specified lines (play)
!!.specifier    - step through session history or specified lines (step)
!!-specifier    - drop one or specified lines from history (drop)
!!<filename     - read file into session history (read)
!!+filename     - append file to session history (append)
!!>filename     - save session history to file (save)
!!?             - help for history meta-commands (help)
!!              - stop the single-step playback in progress (stop)

The 'specifier' is optional. If present, it can be an integer, N, referring to
the N most recent command lines, or a string beginning with a "/" character,
referring to the lines from the most recent one containing that string. The "/"
may be omitted if the search string does not begin with a space or digit.

Detailed information can be found in the ?edit_history help page.

For the past two years the Queen’s College of Guyana Alumni Association (NY) has been hosting its Queen’s College Summer Maths Institute, and Maplesoft has supported this initiative by giving students access to Maple.   With Dr. Terrence Blackman at its helm, the institute aims to sustainably implement a developmentally appropriate and culturally resonant middle school learning environment that engages Guyanese students in a cognitively rich mathematics learning experience.  The experience is intended to place them securely on pathways to STEM (Science, Technology, Engineering and Math) excellence.

The program uses a developmentally appropriate approach that combines significant mathematical content with a setting that encourages a sense of discovery and excitement about math through problem solving and exploration. Program Manager Shindy Johnson, a former student of Queens College, noted that by the end of the first week math sceptics fall in love and gained confidence, and math lovers renew their passion.

As avid Maple users, Dr. Terence Blackman and Cleveland Waddell, one of the main organizers and lecturer,  give the students the opportunity to use Maple. Last year, the students were amazed by Maple's computational power. “It was nothing like they have seen before.  Many students also wrote their first lines of computer code using Maple during the summer camp.  Maple is an invaluable resource for us during the camp,” said Waddell.

Dr. Terence Blackman and Cleveland Waddell

Students receive further enrichment through field trips to broaden their appreciation for education and industry in Guyana.  In addition, Guyanese professionals visit the Institute to share their expertise, career journeys and practical applications of math and other STEM disciplines in their professions.

Field trip to Uitvlugt Sugar Estate

Students who participate ranged from self-professed math lovers to teens who confessed to fearing and even loathing math. By the end of the first week, math lovers had discovered even greater “beauty in the mathematics” and those who quaked at the thought of math were beginning to commit – with confidence – to improving their math grades. This year’s Queen’s College Summer Maths Institute will take place July 26-August 3, 2018 in Georgetown, Guyana.   

hello! i have a problem about DEplot. can some of you help me to solve this problem? I use Maple 18. here the problem I've

restart;
with(DEtools);
 
>DE3:={diff(y(x),x)=y(x)-z(x),diff(z(x),x)=z(x)-2*y(x)};    
>DEplot(DE3,[y(x),z(x)],x=0..3,y=0..2,z=-4..4,arrows=large);

   when i enter it, I dont get the graphic. can you tell me why? thank you!

Here is an list of  expressions

[
k[a1]*C[T]*(R-x[1]-x[2])-k[d1]*x[1],
k[a2]*C[T]*(R-x[1]-x[2])-k[d2]*x[2]
]

I would like to have a counter that counts the number of parameters and variables. In my worksheets Variables always are x or y with a subscript, parameters are anything else.

I can't think of how to do this!

This is my code in which I try to solve the system of differential equations where the unknowns are the vectors x(t),y(t).
eq1:=diff(y(t),t)=-2*f(y(t),y(t))*B.A(t):
eq2:=diff(x(t),t)=2*(-1*B.Vector([1,1,1])+f(x(t),x(t))*B.y(t)-s(t)*f(y(t),y(t))*B.x(t)):
sys:=eq1,eq2;
dsolve({sys, x(0) = Vector([1,1,1]), y(0) = Vector([1,1,1]), eval(diff(x(t),t),t=0) = Vector([0,0,0]), eval(diff(y(t),t),t=0) = Vector([1,1,1])}, type = numeric, output = listprocedure);
The message I get is "Error, (in DEtools/convertsys) invalid input: solve expects its 1st argument, eqs, to be of type {`and`, `not`, `or`, algebraic, relation(algebraic), ({list, set})({`and`, `not`, `or`, algebraic, relation(algebraic)})}, but received {Vector(3, {(1) = YP[1], (2) = YP[2], (3) = YP[3]}, attributes = [coords = cartesian]), Vector(3, {(1) = YP[4]-1, (2) = YP[5]-1, (3) = YP[6]-1}, attributes = [coords = cartesian]), Vector(3, {(1) = YP[1]+1/2-2*((1...."

Any help would be much appreciated!
 

First 785 786 787 788 789 790 791 Last Page 787 of 2217