J. Tarr,
It's having a local variable called Q that breaks it. Sorry - my mess up of writing half my "Q"s as "C"s probably confused you.
So
F := proc(A)
local Q;
JordanForm(A, output='Q')
end proc:
gives an error on execution.
Joe Riel,
Yes indeed - I pointed that out at the end of my original post - perhaps you missed it.
The point I was making is that there would be no problem if the syntax used the string "Q" rather than the (unevaluated) name 'Q'. It seems poor design to me since I can' see any advantage in the syntax as it stands. It's a daft syntax because to make it wor universally one has to use the cumbersome, undocumented (on the JordanForm help page) :- version.

Sorry - the Q's all became C's after the first. Every capital C should be a Q throughout.

Just bumping this one up once since I'm still baffled by it.

I see. I had a blind spot about this. When moving from linalg to LinearAlgebra I took on board the fact that Matrices evaluated to the data structure rather than just to the name (as was the case with matrices).
I'd failed to notice that b:=a where a is a Matrix doesn't create a new Matrix but only a pointer to the same data structure - unlike what happens with a list, for example.
Thanks for clearing that up - I can't imagine why I failed to notice this before.
Toby

Yes, thanks. I was imagining doing something of the sort, but your solution is neater. It would begin to be a bit tiresome if ones expressions involved roots of roots, etc, and of course the "0.1" needs to be chosen according to the example.
I feel it would be quite a useful option to build in to Maple if it were possible. Maybe the handling of branching functions makes it more difficult.

Yes, thanks. I was imagining doing something of the sort, but your solution is neater. It would begin to be a bit tiresome if ones expressions involved roots of roots, etc, and of course the "0.1" needs to be chosen according to the example.
I feel it would be quite a useful option to build in to Maple if it were possible. Maybe the handling of branching functions makes it more difficult.

Indeed so, or better still multiply inside the square root by -1 and outside by -i stops this particular example crossing the branch cut for sqrt at all.
But my colleague has a number of these to evaluate, in not all of which are the branch points quite so easy to locate.
As I said, apparently Mathematica has an option for numeric integration that one specifies to prevent this happening. I assume Maple does not (yet?) have this facility. It would be quite useful.

Indeed so, or better still multiply inside the square root by -1 and outside by -i stops this particular example crossing the branch cut for sqrt at all.
But my colleague has a number of these to evaluate, in not all of which are the branch points quite so easy to locate.
As I said, apparently Mathematica has an option for numeric integration that one specifies to prevent this happening. I assume Maple does not (yet?) have this facility. It would be quite useful.

x := -I*t + (1-t)*2;
y := sqrt( (x+(1/2))*(x-2)*(x+I)*(x-I) ) ;
evalf( Int(y,t=0..1) );
is an example.
Regards,
Toby

x := -I*t + (1-t)*2;
y := sqrt( (x+(1/2))*(x-2)*(x+I)*(x-I) ) ;
evalf( Int(y,t=0..1) );
is an example.
Regards,
Toby

I see. Thanks for that. I see too why you might rather do as in your first example. I wasn't so much intending to do it as using it as an example - I was just trying to understand what can be done.

I see. Thanks for that. I see too why you might rather do as in your first example. I wasn't so much intending to do it as using it as an example - I was just trying to understand what can be done.

Thanks - I'll investigate.