Axel Vogt

5936 Reputation

20 Badges

20 years, 256 days
Munich, Bavaria, Germany

MaplePrimes Activity


These are replies submitted by Axel Vogt

Well deserved and nice to read you!

1 posting for each of you ...

I think dsolve (in the linked example) is not good enough for taking
numerical derivatives - it oscillates around the actual solution:

  Digits:=14;

  # formal solution
  q:='q':
  dsolve({diff(q(x),x) = q(x)*cos(x), q(-1) = 1}):
  q:=unapply(rhs(%),x);
  plot(q(x), x=-1..1);

  # numerical solution
  dsol := dsolve({diff(p(x),x) = p(x)*cos(x), p(-1) = 1},
      numeric, output=listprocedure);
  p:=eval(p(x),dsol);

  plot([q(x)-p(x)],x=-1..1); # shows the oscillation

To check, what happens for derivatives define

  dq:=proc(x,n::posint) fdiff(q,[1$n],x); end proc;
  dp:=proc(x,n::posint) fdiff(p,[1$n],x); end proc;

and use it as 

  n:=1;
  plot([(D@@n)(q)(x)-'dp'(x,n)],x=-1..1);
  plot([(D@@n)(q)(x)-'dq'(x,n)],x=-1..1);

For n=2 the problem increases and for n=3 everything is trash:

  n:=3;
  [(D@@n)(q)(0), dq(0,n), dp(0,n)]: evalf(%);

                                  -13                     7
         [0., -0.23000000000000 10   , 0.53100000000000 10 ]

But in any case fdiff is OK (applied to the symbolic solution).
Alec,

This is certainly a good thing - though I still would not call the behaviour wrong.

From Math I would say they use IR x exterior(M), where in the 2nd component they
work with a basis and shift scalars to the 1st (they=authors of Vessiot package?).

Especially multiplication by scalars should be done only at the 1st component,
your example shows that this concept does not hold for 0 in IR.

'Never' worked with that mighty package ... however I ask myself, how they treat
0-forms, i.e. scalars.

dx &wedge (3*dy); %; lprint(%); gives _DG([["form", M, 2], [[[1, 2], 3]]]) and
evalf for this does not work (try a fraction or Pi instead of 3).


Conversely entering _DG([["form", M, 0], [[[1], r]]]); returns r, but also
_DG([["form", M, 0], [[[], 17.0/2]]]); returns 8.5, so the later seems to be
the 0-form. 

Actually _DG([["form", M, 0], [[[], 0]]]); comes up as 0.

_DG([["form", M, 0], [[[], 0]]]) &wedge (dx &wedge dx) show as `0`*dx*`^`*dy,
as desired. And finally also 0 &wedge (dx &wedge dx) equals `0`*dx*`^`*dy.


So for me it seems, that for staying in the context of desired indicative notations
one has to use '&wedge' as multiplication by scalars, not the usual '*'.

Perhaps the help or Vessiot manuals tell more.

Axel

Well, I do not use it often in then I call it from Maple and aborted (after a longer time for dim=5).

Pari is written in C, so I guess that the algorithm counts (however have not tried to look for it).

Well, I do not use it often in then I call it from Maple and aborted (after a longer time for dim=5).

Pari is written in C, so I guess that the algorithm counts (however have not tried to look for it).

0 * v is the zero in any vector space or module, so it is correct for me

however one looses the 'easy' information, which zero is meant in terms of that base

The Maple command is limit( sqrt(4 - x^2), x=-2, left), etc, and
the help page for 'limit' will tell you a bit more.


What Alec wants to say is a bit difficult to understand, if you
have not had an Complex Analysis course (and quite difficult to say
it in a pricise and understandable way for that background).

You book may mean the following (let us think in intervals):

In *Real* Analysis sqrt(t) is defined for 0 < t= 4 - x^2. 

Which is to say, that x lives in the (open) interval ]-2, +2[.

Let us think in sequences for taking limits in a point t. Then you
can not use negative values in your sequence for sqrt(t_n), due to
the domain of definition for sqrt.

However a limit here always means to allow all sequences - but you
have only those 'from the right' in t=0.

Translated to t= 4 - x^2 it means one can only achieve by sequences
from *within* the interval. That's what your book intends to say.


Now Alec wanted to tell you in short: Maple does not restrict to
Real Analysis, but uses Complex Analysis.

So in sqrt(t) we can have t to be a complex number t = u + v*I,
where u and v are Reals, i.e. t is in the complex plane.

But for v=0 one has: sqrt allows negative inputs (using Complex
Analysis, the result however will be a complex number).

But then you *can* take a both sided limit for sqrt(t) and this
is what Maple does.

You just observed that everything fits together.


However sqrt in the complex plane behaves not as nice you might
expect: it should be solve the equation y=t^2 and one has always
2 solutions (except for y=0).

A sound way is to consider sqrt as a function not in the plane,
but as a function on a surface to live 'above the plane' and you
will learn more in the according course.


PS: this is an example for a possible dilemma for the depth of the
help pages in Maple - how much Math should be assumed or explained?

"gutes Auge" as we say in German ...

"gutes Auge" as we say in German ...

  f:= (i,j) -> M[i,j]:
  smallM:=Matrix(5,f);
  MatrixInverse(smallM): #MatrixInverse(smallM, method='pseudo'); do not use pseudo!
  `length of entries`=map(length,%);
  #`example using data`=eval(%%,data);
For dim=5 the average entry has length ~ 20.000 characters, for dim=6 I aborted
Trying a Pari interface I gave up as well (due to time, memory, patients and skill).
  f:= (i,j) -> M[i,j]:
  smallM:=Matrix(5,f);
  MatrixInverse(smallM): #MatrixInverse(smallM, method='pseudo'); do not use pseudo!
  `length of entries`=map(length,%);
  #`example using data`=eval(%%,data);
For dim=5 the average entry has length ~ 20.000 characters, for dim=6 I aborted
Trying a Pari interface I gave up as well (due to time, memory, patients and skill).

Sigh, for Nr-4*Dr I used convert/tan and arccos (+ steps inbetween + discarding + the above just discussed) ... not that elegant  (.-

Sigh, for Nr-4*Dr I used convert/tan and arccos (+ steps inbetween + discarding + the above just discussed) ... not that elegant  (.-

I did it similar, but different (getting inspired by 3d plotting, choosing 1 parameter by random [which may lead to a way as well]):

differentiate w.r.t. to the parameters shows it to be monotonous, so x=y=1 is the maximum.

BTW: after transformation and a step inbetween that's the original example (in your sharpened version) ...

I did it similar, but different (getting inspired by 3d plotting, choosing 1 parameter by random [which may lead to a way as well]):

differentiate w.r.t. to the parameters shows it to be monotonous, so x=y=1 is the maximum.

BTW: after transformation and a step inbetween that's the original example (in your sharpened version) ...

First 170 171 172 173 174 175 176 Last Page 172 of 209