Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I built the shock model in MapleSim

model

then I got the response accleration

result

For this curve, I want to solve its fourier series in Maple.

Do it work?

thinks in advance.

this is the msim file

test.msim

Perhaps you have heard the terms "ordering difference" or "session dependent" applied to results of some Maple computation. It used to get heard more often back before Maple 12, when elements of sets in Maple were ordered according to address.

What would typically happen would be something like this. A computation gets done by looping either over the variables (symbol indets) of an expression, or over named elements of some set. And the computation happens to be very sensitive to which variables get chosen and used first. But the order in which they get chosen is according to the rule by which the elements of Maple sets are ordered. So if the address in memory of some of the variable names just happens to be different, then they get selected in an different order, and an entirely different computation path might get taken.

Now, merely using a name at some apparently unrelated earlier point in the Maple session can cause that name to get a different memory address than if the name is first used later on. The upshot was that apparently innocuous and unrelated use of variables at some earlier stage in a session could actually completey change a later result of an algorithm which happened to be sensitive to the order of set member access.

Since the difference in the final result in such cases would depend on ostensibly harmless earlier activity in the session, the whole effect was labelled "session dependence". And it caused a lot of grief.

As a wild (ficticious) example, you merely enter the name `x` early in a worksheet, and somehow the later result of an integral has a totally different (valid, but more complicated or unsimplified) form.

But since Maple 12 sets' entries are "ordered" (internally, by Maple's kernel) and a reduction in the appearance of session dependence has come about. But I was reminded recently (on usenet) that ordering differences can also apply to adding and multiplying expressions. And by coincidence this also ties in to something else that I've been thinking about: roundoff error.

Here's the simple example that came up. When you enter x/y you form a Maple expression whose internal representation (DAG) stores it as the product of x and of y^(-1). But which of those two multiplicands is stored first? It matters! When x and y get evaluated at floating-point values then it matters which is evaluated first. If y^(-1) gets evaluated first then roundoff error may occur. But if x is evaluated first then the float division might happen to occur without roundoff error.

Let's look closely at the example that came up.

> restart:

> ee := x/y;
                               x
                               -
                               y

> eval(ee, [x=2.1, y=2.4]);
                          0.8750000000

> restart:

> invee:=y/x:

> ee:=1/invee;
                               x
                               -
                               y

> eval(ee, [x=2.1, y=2.4]);
                          0.8750000001

In both sessions above, ee equals x/y. But only the second incurs roundoff error. The second result differs from the first, in the last decimal digit. It turns out that the order in which x and y^(-1) get stored in the product DAG is different in these two examples. If y^(-1) gets evaluated at y=2.4 before x gets evaluated, then Maple computes the intermediary term 1/2.4 = 0.4166666667 which of course has roundoff error. But if x gets evaluated first them Maple sees 2.1/2.4 as the division to compute, and that can get done with no roundoff due to fortuitous cancelation of factors of 3, ie. it is the same as 0.7/0.8=0.875.

You can see the internal storage distinction, as follows. I'll repeat the above pair of examples, but this time also dismantling `ee` to show its structure. Notice the order of `x` and y^(-1) insides the printed DAG.

> restart:
> ee := x/y;
                               x
                               -
                               y
> dismantle(ee);

PROD(5)
   NAME(4): x
   INTPOS(2): 1
   NAME(4): y
   INTNEG(2): -1

> eval(ee, [x=2.1,y=2.4]);
                          0.8750000000

> restart:
> invee:=y/x:
> ee:=1/invee;
                               x
                               -
                               y

> dismantle(ee);

PROD(5)
   NAME(4): y
   INTNEG(2): -1
   NAME(4): x
   INTPOS(2): 1

> eval(ee, [x=2.1,y=2.4]);
                          0.8750000001

Ok, so perhaps you are thinking: who cares, the difference is tiny. Well, small differences are easily isolated and magnified if they occur inside compound expressions. And so the ensuing results might be entirely different.

Take just a slightly more involved example,

> restart:
> ee := 1/(sqrt(0.8750001 - x/y)) - 3162;

                           1                 
                  -------------------- - 3162
                                 (1/2)       
                  /            x\            
                  |0.8750001 - -|            
                  \            y/            

> eval(ee, [x=2.1,y=2.4]);

                            0.277660

> restart:
> invee:=y/x:
> ee := 1/(sqrt(0.8750001 - 1/invee)) - 3162;

                           1                 
                  -------------------- - 3162
                                 (1/2)       
                  /            x\            
                  |0.8750001 - -|            
                  \            y/            

> eval(ee, [x=2.1,y=2.4]);
                            1.859986

Look at what caused the difference. All I did was assign y/x to invee and then re-use that to form `ee`. The expression `ee` looks the same on the surface. But inside it, the term x/y is stored with a different order of its multiplicands. And the final results are really different.

I suspect that an improvement might be had if evaluation at a point (2-argument eval) were instead done by substituting floats into numerator terms (positive integer exponent) before denominator terms (negative integer exponent). But investigation would have to precede that.

Finally, you might wonder what can be done with the errant version of `ee` from the last example. Simplification may or may not help,

> eval(simplify(ee), [x=2.1,y=2.4]);

                          0.2776606276

> eval(fnormal(ee), [x=2.1,y=2.4]);
                            0.277660

Are either of those last two results correct to ten places, you might ask? Well, no.

> Digits:=5000:

> eval(ee, [x=2.1,y=2.4]): evalf[10](%);
                          0.2776601684

acer

Have anyone toldl me how to find the family of curve at Maple 14

ax^2 + B*x*y+cy^2= D

with A=1, B=1, C =1 and D =2010

Can someone send me a clear step by step instruction to install Maple 13 for 32 bit Linux?

My OS is Ubuntu 10.04 LTS netbook edition.

I don't want to install it in home folder,instead I want to create a folder(say,MAPLE) in a partition with a lot of space and then install Maple13 inside this folder.

I have a worksheet that contains various pieces of a robot's dynamic and kinematic equations.  I want to perform different design tasks, taking the base model and working off of it.  I'd like to have only 1 model of the robot and not duplicate it across all of my different design worksheets because things change in the robot model as I switch up tooling, find better means of performing a system identification, etc.

Is there any functionality that would allow...

 Here is a example of a cesaro sum used when a series fails to converge in the usual sense of a sum.

sum((-1)^n*(n^(1/n)-a), n = 1 .. infinity) has a cesaro sum of 1/2*(a+2MRB constant-1).

Proof:

We are given that                            S=  sum((-1)^n*(n^(1/n)-a), n = 1 .. infinity) .

Expanding the infinite series we get         S=(a-1)+(2^(1/2)-a)+(a-3^(1/3))+(4^(1/4)-a)+... .

Collecting the a's and the surds we see that S=a-a+a-a+...+(-1+2^(1/2)-3^(1/3)+4^(1/4)...) .

By Grandi's series  we know that             S=1/2*a+(-1+2^(1/2)-3^(1/3)+4^(1/4)...) .

Collecting the infinite series we get        S=1/2*a+ sum((-1)^n*(n^(1/n)), n = 1 .. infinity).

Which can be shown to be                     S=1/2*a+ sum((-1)^n*(n^(1/n)-1), n = 1 .. infinity)-1/2 .

Thus, by factoring out the 1/2, we get           S=1/2*(a+2 sum((-1)^n*(n^(1/n)-1), n = 1 .. infinity)-1) .

Therefore,                                   S=1/2*(a+2MRB constant-1) .

 

In order to give symbolic results for that familly of sums Maple shouldmake this identify an integral part of maple in future versions!

Marvin Ray Burns

Original investigator of the MRB constant.



Dear Maple lovers,

As a classical worksheet user from the past years, now I'd like to be a "modern" Maple user, using the 2D Input in the modern worksheet mode (I will call it mwm from now on). But, alas, I cannot even solve a simple equation!

To describe my situation let me state the following:

1. I use 64 bit Maple 14 Student Edition (single user) under 64 bit Windows 7.

2....

how can i take any linear ode and make a plot of all its solutions, if its first order and second order?

thanks in advance

I All,

I just startup on Maple and i can't get the result of adding to  matrix. I used a worksheet and the math mode. The input is in 2-D Math Notation. Could Someone help me. 

> a := matrix([[93, 43], [19, 37]]); b := matrix([[48, 20], [19, 37]]);

> a+b;                             a + b

 

Thank You

I want to exactly (well roughly speaking) overlay two lines from different graphs. 

So suppose I had two datasets, 

a:=[1.4,2.1,4.6,3.7,3,2.1,2,1,1.5]:
b:=[78,75,97,98,105,95,88,75,67]:

with(plots):

aa:=listplot(a):
bb:=listplot(b):

I want to overlay the two lines to compare them.  I transformed them into 3d then rotated to overlay but maple keeps scaling the axes to fit. 

Any ideas?

 

I download a maple document from 'Recent Questions',"to find the constants of a equation with data x and y are given", then I open it, and click 'run all' comand in the toolbar. It works very well.

But when I put cursor in one line, and pree 'enter' key, it ruturns a different form of the result, as the picture above shows.

I want to plot a piecewise function, F(x,y), so I look for piecewise command in help page, there are a lot of examples for one-variable piecewise functions, but lack of examples for two-variable piecewise functions. I don't know how to input a two-variable piecewise function and how to plot it, can you help me? Thank you very much.

 

Hi,

I am new to maple and this is my first question in this forum.

Please help me in finding an analytical solution to the 2nd order ode.

ode:=diff(y(x),x$2) -( a y(x) - y(x)^3 + y(x)^5 ) = 0

bcs:= D(y)(0) = 0, y(2) = 0, y(0) = 1.31

where a is a constant.

I am bit confused about the boundary conditions. I have three boundary conditions instead of two.

The first two boundary conditions yield trivial y(x) = 0 solution.so added the third bc.

First 1761 1762 1763 1764 1765 1766 1767 Last Page 1763 of 2224