Axel Vogt

5821 Reputation

20 Badges

20 years, 357 days
Munich, Bavaria, Germany

MaplePrimes Activity


These are answers submitted by Axel Vogt

the question is unclear for me, may be you say what your array is, just using mathematical terms
and what you want to 'see'

if you have a 2-dimensional array (not to large) Maple shows it directly and if  it is larger you can use
a command like 'interface(rtablesize=50)' to see more (if you think that makes sense)

if for example your array is something like Array( 1..3,1..4,1..2) you could try 'painting' it within in a cube,
but for higher dimension there is no way i guess (except you have a prefered method which is ok for
you, if you are left with paper and pencil)

if you want to see the row or column numbers you may want to put them into your array to be displayed
through the same processing

whatever: have in mind that Maple is not a typesetting system ...

That's what Gamsiz wants to show in his uploaded document: www.mapleprimes.com/files/102_gamsiz.gif

have you tried to use 'gc()' and 'forget' - this gives some reset and quite often normes

f[b] is neither a function (look up in the manual how to define them) nor does it contain any 'b'

note that Maple works with symbolics, so you may try  evalf( b_new) > evalf( b_old - 0.001) or similar
which gives sense to some 'break'

in harder cases you may want to look up 'fnormal' or checking signs of differences instead of > or <

the easiest: tell the user of your package to use that precision (if it makes sense)

the other:: just use that command on entering a proc within your package

or: use it as parameter

or: make it a global variable (not sure whether a good idea for packages)

@  lemelinm
I think you asked (in another thread) how to post by copy & paste. The easy way - which works in ASCII
groups as well: use a sheet in Classic Mode, copy input AND output (using the mouse to select, then copy)
paste the stuff and selct 'formatted' as format through editor's menu of this board. You may try it first
with a simple ASCII editor, the only difference to here is you have to select formating.
Strange formulation for homework at least for me and my Germish ...

So here you go: you need 'D', look up the help:

  D[1,1,2](g)(x,y): convert(%,diff);

                               3
                              d
                            ------ g(x, y)
                                 2
                            dy dx

Hence you should be able to understand: what is D, what is meant by the
'indexing sequence' in the brackets and how it translates to a common
notation.

Now you should be able to work with it for your task, where I suppose
that it is asked to reply by the result of D[........](f).


PS: you are supposed to add to your exercise you received help through
Maple Primes, be aware that lecturers may read here as well, so dont
be stupid.

PPS: please note that Maple uses commuting derivatives in that way,
so do not use it blindly.
taylor(F(x), x=0,10) = 1/5*x^5+1/21*x^7+2/135*x^9+O(x^11) and there are
two ways to use that up to first order: either substract or divide. 

It turns out, that divide is better (here):

  'f(x)/(x^5/5) - 1';
  my:=chebpade(%, x=0 .. 1/3, [4,4]); # at most degree = 8

  plot(f(x)-(my+1)*(x^5/5),x=0..0.2); # abs(error) < 1e-15


  f(0.1);
  eval((my+1)*(x^5/5), x=0.1);
                                          -5
                         0.200477661686 10
                                          -5
                         0.200477661688 10



Of course one could also use a Pade approximation instead of Taylor.
The documentation does not say much, indeed it is more a draft ...

Not so sure whether I would call the 'algebraic' Pade better. If
used as an approximation there is always a region where it becomes
useless.

The same for the Chebyshev-Pade approximation: the documentation
says "... is not specified then the interval -1..1 is understood",
so one would have to compare both of them on that interval.

Now plot([f(x)-chp, f(x)-p], x=-1 .. 1) shows the truth: close to
0 the pure Pade approximation is better, beyond 1/2 certainly not
and the error 'explodes'.

For the problem degree and Digits ... the error means, that degree
of numerator + denominator has to be less then 9 (for Digits=12).

As the function f (defined below Pi/2) increases here I would use
degree(numerator) > degree(denominator), the simpliest choice is
already good enough using chpp:=chebpade(f(x), x=0 .. 1/3, [5,4]),

with abs(error) <= 6e-13 (we have 12 Digits):   f(0.1);
  eval(chpp, x=0.1);
                                          -5
                         0.200477661686 10

                                          -5
                         0.200477699620 10


After having some coffee here is an answer to that: If you do L:= ... 
then it is evaluated, which is not what the procedure expects
  a:=1;
  assume(c,'constant');
  L := [a,b,c];
  map(getassumptions,L); getassumptions(c);

                                a := 1
                            L := [1, b, c]
                       [{}, {}, {c::constant}]

  MyReset(L); getassumptions(c); about(L);
                            {c::constant}

      L:
        nothing known about this object

However the following call works
  a:=1;
  assume(c,'constant'); getassumptions(c);
  MyReset([a,b,c]); getassumptions(c);
                                a := 1
                            {c::constant}
                                  {}

Yes, you must know the names ...
Once I was told "Pack the arguments into a list, declare it to be unevaluated, and then
map unassign over it: MyReset:= (L::uneval)-> map(unassign, L)[] "
Let us see what it does:
  f:=x->x^2; a:=1; b:=.99;
                                        2
                             f := x -> x
                                a := 1
                              b := 0.99

  MyReset([r,a,b,c,f]);

  r,a,b,c,f(t);

                           r, a, b, c, f(t)



how about a:='a' ?

to get better help you should say what is your function

even better: put your data into a worksheet - together with what you have done - and upload it, so others can see it.

using 14 Digits in Maple 11 i have no problems, however chebpade has larger approximation error in the plotted range

I think one should specify a range, chpp:=chebpade(f(x), x=0 .. 1/3, [5,5]) works quite well

just want to point out, that these days there was a quite similar task at the Maple NG, where the
poster was looking for the numerical value (but never said why)

groups.google.de/group/comp.soft-sys.math.maple/browse_thread/thread/b3710ca0dc842857/#

First 78 79 80 81 82 83 84 Last Page 80 of 92