You are using * rather than . as the product. So things do not work. Plus, you should just use Transpose(X,'conjugate'=false). Or do assume(a>0,b>0,c>0) at the top [as they are all lengths]. Then it seems to work for me.
sqrt(a*b) is not equal to sqrt(a)*sqrt(b), especially when one (or both) of a and b are negative reals. So the correct answer probably depends on the sign of s-a, s-b and s-c. That is why you can't get it to work, and why the nice formula has the minus under the square root.
I think that the triangle inequality implies that s-a, s-b and s-c are all positive. Each of these differences is the sum of two sides minus the third, quantity divided by 2. s-c is (a+b-c)/2.
The factor a-c-b above must be negative since c+b-a must be positive. All the other factors must be positive assuming that it's not a degenerate triangle.
Somehow I sense that a ton of bricks is about to land on me but I am mischievouslyattracted to an expression for the area of a triangle that prominently involves the imaginary unit.
EDIT: OK, if I keep going I end up with an negative area. Perhaps sqrt(a*b) isn't the sqrt(a)*sqrt(b).
That thing at the end of this. I don't know how it got there and I don't know how to get rid of it.
You have to explicitly assume that a>0,b>0, c>0 and that they are the sides of a triangle. That last bit implies a relation that is easy to write down for a right triangle, but involves another quantity (the cosine of an angle) otherwise. So you are right, but so is Maple! The issue is that you have more knowledge, from which what you say can be derived. Without it, there are other cases that need to be accounted for, which is what Maple does [and is the right thing to do].
This is one lesson that most users of computerized mathematics [including myself!] need to learn multiple times before it really sinks in: you need to tell your system all your assumptions, otherwise how else is it going to know what you're talking about? If you listen to yourself explain your mathematical problem (verbally or in writing like you did above) and compare that to what you actually typed in Maple, you'll notice a non-trivial gap. That gap results in the answers you get (sometimes!) being other than what you expect.
Comments
Yes, good catch
The Wikipedia entry for the determinental form is indeed missing a - (minus) sign. The MathWorld entry seems correct.
Highly Symmetrical Form
Jacques,
I tried the "highly symmetric form" in the MathWorks entry and it didn't work for me using Maple. Can you tell me what I did wrong?
View 4937_page 15.mw on MapleNet or Download 4937_page 15.mw
View file details
You used the 'wrong' product
You are using * rather than . as the product. So things do not work. Plus, you should just use Transpose(X,'conjugate'=false). Or do assume(a>0,b>0,c>0) at the top [as they are all lengths]. Then it seems to work for me.
The Square Root Of Minus One
Jacques,
This works:
but I can't get this to work:
Can you help? Here is my worksheet:
View 4937_page 15.mw on MapleNet or Download 4937_page 15.mw
View file details
I think that the later looks cool. I wonder what the Wikipedia folks would like to see in their encyclopedia.
That is because it is false
sqrt(a*b) is not equal to sqrt(a)*sqrt(b), especially when one (or both) of a and b are negative reals. So the correct answer probably depends on the sign of s-a, s-b and s-c. That is why you can't get it to work, and why the nice formula has the minus under the square root.
Triangle Inequality
Jacques,
I think that the triangle inequality implies that s-a, s-b and s-c are all positive. Each of these differences is the sum of two sides minus the third, quantity divided by 2. s-c is (a+b-c)/2.
The factor a-c-b above must be negative since c+b-a must be positive. All the other factors must be positive assuming that it's not a degenerate triangle.
Somehow I sense that a ton of bricks is about to land on me but I am mischievously attracted to an expression for the area of a triangle that prominently involves the imaginary unit.
EDIT: OK, if I keep going I end up with an negative area. Perhaps sqrt(a*b) isn't the sqrt(a)*sqrt(b).
That thing at the end of this. I don't know how it got there and I don't know how to get rid of it.
True, but
You have to explicitly assume that a>0,b>0, c>0 and that they are the sides of a triangle. That last bit implies a relation that is easy to write down for a right triangle, but involves another quantity (the cosine of an angle) otherwise. So you are right, but so is Maple! The issue is that you have more knowledge, from which what you say can be derived. Without it, there are other cases that need to be accounted for, which is what Maple does [and is the right thing to do].
This is one lesson that most users of computerized mathematics [including myself!] need to learn multiple times before it really sinks in: you need to tell your system all your assumptions, otherwise how else is it going to know what you're talking about? If you listen to yourself explain your mathematical problem (verbally or in writing like you did above) and compare that to what you actually typed in Maple, you'll notice a non-trivial gap. That gap results in the answers you get (sometimes!) being other than what you expect.
subscripted package members, in 2D Math output
Does anyone else think that having package member routines get displayed as subscripted names in 2D Math output is unhelpful and misleading?
acer
Yes
I find it absurd applying mathematical typesetting rules to pure computational objects.
But, may be that this issue should be moved to a new thread.
It Works!
Everything works now. Thank you.
View 4937_page 15.mw on MapleNet or Download 4937_page 15.mw
View file details