## 6547 Reputation

17 years, 195 days
University of British Columbia
Associate Professor Emeritus

## Eigenvector Complex Phase...

Any nonzero constant multiple of an eigenvector is also an eigenvector. The real question, I think, is "how does Maple normalize its eigenvectors?" From a few tests (using LinearAlgebra[Eigenvectors]), it seems to me (for a Matrix with floats, possibly complex) that Maple chooses an eigenvector of length 1 (i.e. the sum of the squares of the absolute values of the entries is 1), and the entry that is largest in absolute value (or one of those in case of a tie) is real. That entry can be either positive or negative, so this isn't a complete specification, but perhaps it's a start.

## It seems to work, or does it?...

Perhaps that's hinted to by the following cryptic statement in the ?rtable_elems help page: Only the elements that explicitly need to be specified, taking into account storage, are returned. In any case, it does seem that (even though storage is rectangular rather than sparse for this Array) zeros are not returned by rtable_elems, and in fact the examples in the help page show this. I don't know if there's a work-around [other than kludgy things like adding epsilon to all the elements first].

## rtable_elems...

... or in John's application,
```> map([lhs], select(t -> type(rhs(t),posint), rtable_elems(A)));
```
Yes, that's a better way of doing it. Somehow I missed rtable_elems.

## Re: Second thoughts...

Your "christoffel" is not an Array. It is a module. AFAIK there is no problem in converting a 3-dimensional Array to an array.

## Tip: Index an Array...

```> select(t -> type(A[op(t)], posint),   {indices(convert(A,array))});
```

## Bug in Maple 9.5?...

It works fine for me in Maple 9.5. Can you show us a specific example of this problem?

## Bug in Maple 9.5?...

It works fine for me in Maple 9.5. Can you show us a specific example of this problem?

## Using nested seq(...)'s...

Or even simpler: [seq(seq(seq([a,b,c],a=A),b=B),c=C)];

## Using nested seq(...)'s...

Or even simpler: [seq(seq(seq([a,b,c],a=A),b=B),c=C)];

## Still possible......

That problem with < bites again... I think what you meant was something like
```> inequalities({x^2 + y^2 <= 2, x^2 + y^2 >= 1},
x = -2 .. 2, y = -2 .. 2);
```

## Still possible......

That problem with < bites again... I think what you meant was something like
```> inequalities({x^2 + y^2 <= 2, x^2 + y^2 >= 1},
x = -2 .. 2, y = -2 .. 2);
```

## The problem...

Allan, I think what you're seeing there for small values of r is just roundoff error, exacerbated by the fact that floats are being used. Consider: > rxpr:= convert(xpr, rational); series(rxpr, r); # returns quickly > evalf(%); series(2.720294101+.2646772639e-1*r^2-.5606773957*r^4+O(r^5),r,5) > limit(rxpr, r=0); # blows up

## Plotting residuals after fitting with LS...

Perhaps you're looking for something like this? ``` > Data := [[1,3],[2,1],[3,2],[4,3],[5,5]]; P := t -> a + b*t + c*t^2; L := map(u -> u[2] - P(u[1]), Data); Res := Optimization:-LSSolve(L); plots[pointplot](zip((u,r) -> [u[1],r], Data, subs(Res[2], L))); ```

## Bug, feature, or oversight? You decide...

Of course it's not the same thing. The rules for 2D math entry in Standard GUI are different. That's how you can get all those fancy characters. This is the way it was designed to work.

## Using DEplot3d...

The error message in Maple 11 is `Error, (in DEtools/DEplot/CheckDE) derivatives must be given explicitly` Now if you look at the system of DE's you're giving to DEplot3d, it looks like this: diff(w(t),t) = (complicated function of t and w(t)), w(t) = diff(z(t),t), D(x)(t) = -sin(t), D(y)(t) = cos(t) but actually x(t) and y(t) have already been defined. The unknown functions in DEplot really need to be undefined, so change x to X and y to Y in the left sides of your equations and in the specification of variables. You'll also need initial conditions for X and Y. So try X(0) = 0, Y(0) = 0. Now you get a warning: `cannot evaluate the solution past the initial point, problem may be complex, initially singular or improperly set up` Examining the system at the initial conditions, I see that the right side of the first DE involves the square root of an expression that will be 0 at t=0. This could be bad news as far as differential equations are concerned, because the square root function is not Lipschitz at 0. It's not even certain that the solution is unique. If you change the initial condition to w(0) = 1.001 instead of w(0) = 1, DEplot3d does work, but you run into another apparent singularity (with w(t) blowing up) around t = .93724871.
 First 183 184 185 186 187 Page 185 of 187
﻿