Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline steveswin  
#1 Posted : 23 March 2012 06:23:46(UTC)
steveswin


Rank: Member

Groups: Registered
Joined: 01/09/2011(UTC)
Posts: 11
Man
Location: Cyberjaya, Malaysia

Was thanked: 2 time(s) in 1 post(s)
Hi,

I'm sorry if this is a dumb question, but is there a way to have raised indices, just as there is with lowered indices?



Also is there a way to sum over two or more indices?

Thanks

Steve

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline omorr  
#2 Posted : 23 March 2012 10:27:53(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Hello Steve,

I can not see your image, sorry.
steveswin wrote:
I'm sorry if this is a dumb question, but is there a way to have raised indices, just as there is with lowered indices?
The question is, why do you need raised indices? If this is like literal lower index (obtained with dot) I think that raised indices will make confusion with power operator.
steveswin wrote:
Also is there a way to sum over two or more indices?
I hope I understood your question and yes, there is. You can use summation operator from the palette or loops like "for" or "while". Visit the Wiki, there you will find Tutorials and Examples about it.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline steveswin  
#3 Posted : 23 March 2012 11:19:12(UTC)
steveswin


Rank: Member

Groups: Registered
Joined: 01/09/2011(UTC)
Posts: 11
Man
Location: Cyberjaya, Malaysia

Was thanked: 2 time(s) in 1 post(s)
Radovan,

Sorry about that, should have read the Wiki more carefully on inserting images. Anyway what I am trying to do is manipulate tensors in General Relativity and need to combine contra and covariant tensors, such as the metric tensor.
Hopefully you can see what I mean in the image below.



Steve
Offline mr_raf  
#4 Posted : 23 March 2012 12:41:24(UTC)
mr_raf


Rank: Member

Groups: Registered
Joined: 06/02/2012(UTC)
Posts: 13
Man
Location: Poland / Wroclaw

Was thanked: 1 time(s) in 1 post(s)
Hi there.
I guess that for B You should use:

B:sum((el(y,i)^i),i,0,n)

As below


As You see C value is different than You wrote.

Edited by user 23 March 2012 14:40:37(UTC)  | Reason: Not specified

Best regards.
Rafal
Offline steveswin  
#5 Posted : 23 March 2012 14:36:55(UTC)
steveswin


Rank: Member

Groups: Registered
Joined: 01/09/2011(UTC)
Posts: 11
Man
Location: Cyberjaya, Malaysia

Was thanked: 2 time(s) in 1 post(s)
Rafel, thanks, but that is not exactly what I want.

[/img]

As you can see I am after something that expands like contravariant tensors. Not sure if it possible or not.

Regards

Steve
Offline mr_raf  
#6 Posted : 23 March 2012 14:42:14(UTC)
mr_raf


Rank: Member

Groups: Registered
Joined: 06/02/2012(UTC)
Posts: 13
Man
Location: Poland / Wroclaw

Was thanked: 1 time(s) in 1 post(s)
Ok. I thought a little bit, and i think that this should do the trick



Risen_indices - wiki_upload_file

Although still does not have a "nice" (transparent) appearance. Perform calculations correctly.

Something simpler. I went to far with "n" variable.


Risen_indices_2 - wiki_upload_file

Edited by user 23 March 2012 16:54:04(UTC)  | Reason: Not specified

Best regards.
Rafal
Offline omorr  
#7 Posted : 23 March 2012 19:08:38(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Hello,

By following this discussion it crossed my mind something. It is quite questionable that this will work in SMath
A:sum(el(x,i),i,0,3)
A=el(x,0)+el(x,1)+el(x,2)+el(x,3)
But, on the other hand, there is no way that the vector element of x with zero index can get a value, neither numerical nor symbolical. In SMath the minimal matrix index is one but in these cases SMath will not complain if you put any index value.
Do not know how to explain this.

Regards,
Radovan

Edited by user 23 March 2012 22:25:54(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline mr_raf  
#8 Posted : 23 March 2012 22:00:39(UTC)
mr_raf


Rank: Member

Groups: Registered
Joined: 06/02/2012(UTC)
Posts: 13
Man
Location: Poland / Wroclaw

Was thanked: 1 time(s) in 1 post(s)
Hello Radovan.
From what I know matrixes and vectors elements position variable needs to be defined as a positive integers. It is questionable if zero is an integer. In my opinion zero is zero, a strange structure which does not fit into any other sets of numbers.
In Smath as I noticed matrixes and vectors start from number 1. Thats why i used i:=1.
Using i:=0 generates an error, that there is no such element. Which is understandable, because in our vector there is no element x,0.

Radovan said:
Quote:
But, on the other hand, there is no way that the vector element of x with zero index can get a value, neither numerical nor symbolical. In SMath the minimal matrix index is one but in these cases SMath will not complain if you put any index value.
Do not know how to explain this.


Exacly, using summation of matrix/vector elements alows to put i:=0, but creating matrixes/vectors requires usage of elements number i≥1.

Edited by user 23 March 2012 22:10:42(UTC)  | Reason: Not specified

Best regards.
Rafal
thanks 1 user thanked mr_raf for this useful post.
on 23/03/2012(UTC)
Offline omorr  
#9 Posted : 23 March 2012 22:35:36(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Hello Rafal,

Thanks for the reply. On my second thoughts, I think that nothing is strange if we look at this like a symbolic expression. For instance:
sum(el(x,i),i,-3,2)=el(x,-3)+el(x,-2)+el(x,-1)+el(x,0)+el(x,1)+el(x,2)
Therefore, we can accept that symbolic engine accepts any index number, but not numerical. As you sad, only integers greater or equal to 1.
Hope I am right about all of this.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline mr_raf  
#10 Posted : 23 March 2012 23:05:23(UTC)
mr_raf


Rank: Member

Groups: Registered
Joined: 06/02/2012(UTC)
Posts: 13
Man
Location: Poland / Wroclaw

Was thanked: 1 time(s) in 1 post(s)
omorr wrote:
Hello Rafal,

Thanks for the reply. On my second thoughts, I think that nothing is strange if we look at this like a symbolic expression. For instance:
sum(el(x,i),i,-3,2)=el(x,-3)+el(x,-2)+el(x,-1)+el(x,0)+el(x,1)+el(x,2)
Therefore, we can accept that symbolic engine accepts any index number, but not numerical. As you sad, only integers greater or equal to 1.
Hope I am right about all of this.

Regards,
Radovan


If we assume that the indicator of the element is a number lying on the axis of integers, and we treat it as an ordinal it seems to me that, yes, ther`s nothing strange.
On the other hand, assuming that it is an element in the first quadrant of the Cartesian, that is part of the real numbers possible to the physical, "touchable" definition, than it is not.
The real thing is to have (n>0) or not have (n=0) an apple, it isn`t physically possible to have negative number of apples (n<0), this statement is a virtual, contractual. While looking at the table You can only say if ther`s an apple (or more apples), or ther`s none. Therefore, while building a vector/matrix, an element can either exist or not, you can not build a matrix for which the indicator of elements will not be possible for defining, that is they will lay in negative part of Cartesian.

I hope that my understanding isn`t wrong.
Best regards.
Rafal
Offline steveswin  
#11 Posted : 25 March 2012 03:19:16(UTC)
steveswin


Rank: Member

Groups: Registered
Joined: 01/09/2011(UTC)
Posts: 11
Man
Location: Cyberjaya, Malaysia

Was thanked: 2 time(s) in 1 post(s)
Thanks guys for your comments. I tend to agree with Omorr, the indices are only markers and can take any integer form including zero. Anyway it doesn't get me any closer to raised indices so I think I will give that up for the time being.

Steve
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.