SMath Studio Forum
»
SMath Studio
»
Questions
»
[SS-2411] Symbolic evaluation of vectors
Rank: Advanced Member Groups: Registered
Joined: 01/08/2010(UTC) Posts: 115 Location: Rome Was thanked: 13 time(s) in 13 post(s)
|
Hi Martin, Davide I am still working about Vectors and what make me wonder is why using symbolic optimization I do not have a correct result for what concern the dot product (Scalar product) of 2 vectors . There is something that for sure I am missing ..or I am asking too much to Smath ( I was starting to try the same in WxMaxima , if it works with this tool probably using the Maxima plug-in it should work from within Smath too) Best regards Franco Edited by moderator 05 October 2016 00:42:46(UTC)
| Reason: discussion moved from this point on
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,725 Location: Italy Was thanked: 1393 time(s) in 909 post(s)
|
At first glance seems a bug in symbolic evaluation... vectors.sm (9kb) downloaded 32 time(s). |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 2,046 Was thanked: 1176 time(s) in 752 post(s)
|
I also think that it is a bug, has been introduced after 97.5737
|
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 983 time(s) in 811 post(s)
|
Originally Posted by: frapuano There is something that for sure I am missing ..or I am askingtoo much to Smath You are not asking too much to Smath, but you seem not to follow rules that apply to 1D, 2D, 3D vectors. Those rules are prescribed by convention. The rules are: Vector * function ... NOT the other way around. Forum Franco Vector Rules.sm (104kb) downloaded 44 time(s).
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 01/08/2010(UTC) Posts: 115 Location: Rome Was thanked: 13 time(s) in 13 post(s)
|
Sorry Jean but I am not able to understand your answer even reading the .sm file you attached. I am not using/defining any function in my example I am just multiplying in a scalar way same vectors ..or at least I guess so. Best regards Franco
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 983 time(s) in 811 post(s)
|
Are you reporting that your Smath version does not open my attachment ?
In your example, you mutiply whatever Ax is by a vector. This produces nothing. Let's assume to make it productive by having A(x):= fnct(x). This would be wrong. You multiply vector by function [1D,2D,3D vectors] by [1D,2D,3D functions]. That's what the work sheet exemplies by universal maths rules "convention".
Take another example from your book, so more collabs can contribute.
Cheers, Jean
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 01/08/2010(UTC) Posts: 115 Location: Rome Was thanked: 13 time(s) in 13 post(s)
|
Jean, I am able to open your example but I simply do not understand the relationship of you example with the issue I am reporting. As already stated I don't want with my calculations to come up with a number but I would like to see in Smath that the scalar product ( or dot product ) of 2 vectors is the sum of the products of the components on each axis i.e that what should comes up from the symbolic calculations of the product is what is highlighted in yellow herewith : I don't know if this request is too much for the internal Symbolic engine. Moreover despite what is shown in the Davide's e-mail I can't evaluate numerically the expression of vector A but I have the expression in red with the error message A.x is not defined ( even because it would be impossible to evaluate it numerically ..I guess or I don't understand clearly the meaning of the "=" operator ). I am using Smath Studio 0.98 build 6103. I am pushed to think that Smath does not recognize that the expression of A is the definition of a vector as well the definition of B; so that when I apply the dot vector operator on these structure doesn't happen anything and are not applied the correct simplification rules ( but this is just my modest opinion about what is happening ). Best regards Franco
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,725 Location: Italy Was thanked: 1393 time(s) in 909 post(s)
|
Originally Posted by: frapuano Moreover despite what is shown in the Davide's e-mail I can't evaluate numerically the expression of vector A but I have the expression in red with the error message A.x is not defined ( even because it would be impossible to evaluate it numerically ..I guess or I don't understand clearly the meaning of the "=" operator ). "=" is the evaluation symbol (may be numerical or symbolical); type = to request a numerical evaluation, CTRL+ . to request a symbolic evaluation (the one in my screenshot), You can even change the requested evaluation by context menu (right click -> optimization) P.S. I've moved here OT messages from the original topic. Edited by user 05 October 2016 19:54:30(UTC)
| Reason: marked as fixed |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
1 user thanked Davide Carpi for this useful post.
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 983 time(s) in 811 post(s)
|
Franco, No matter what A,B,C will be, from the onset your attempt is wrong. Why wrong ? You have valued e(x,y,z). So, the next WHATEVER can't be [A,B,C]*e(x,y,z) but e(x,y,z)*[A,B,C]. That's what the work sheet previousely attached demonstrates for the 1D, 2D, 3D applications. I don't understand "projection on axes...". There are 24 ways of representing a 3D axis sytem. Mathematica and Mathcad don't have identical system. Smath has no 3D system except the one from "CreateMesh" or its native 3D plot. The 3 orthogonal directions result from "monkey business creation". Jean
|
|
|
|
Rank: Administration Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member Joined: 11/07/2008(UTC) Posts: 1,636 Was thanked: 2007 time(s) in 677 post(s)
|
Thank you! Actually extremely serious bug found: It can be any function, not only vector. Fixed. Regards.
|
2 users thanked Andrey Ivashov for this useful post.
|
on 05/10/2016(UTC), on 06/10/2016(UTC)
|
|
Rank: Advanced Member Groups: Registered
Joined: 01/08/2010(UTC) Posts: 115 Location: Rome Was thanked: 13 time(s) in 13 post(s)
|
Hi Andrey Thanks a lot for the new RC5 it improves on the previous one but I guess that there are still some refinements to accomplish ...if possible. See herewith , hoping that I was able to explain correctly the issue . Thanks again and best regards Franco
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 01/08/2010(UTC) Posts: 115 Location: Rome Was thanked: 13 time(s) in 13 post(s)
|
Sorry for bothering again on this topic but I guess that still some basic improvement has to be done in multiplying a number by a vector , see herewith: what I guess is the correct behavior is shown in WxMaxima too Davide,Martin what do you think about ? Best regards Franco
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,725 Location: Italy Was thanked: 1393 time(s) in 909 post(s)
|
I think this is not safe until you assume that every unknown is always a scalar (that might cause several troubles) or there is some way to declare the type of an unknown (scalar/matrix/vector). About the previous post, by default SMath tries to returns the most compact result; I guess might be matter for the expand() function. Edited by user 11 October 2016 10:54:45(UTC)
| Reason: Not specified |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 01/08/2010(UTC) Posts: 115 Location: Rome Was thanked: 13 time(s) in 13 post(s)
|
Davide,
for what concern your 1st point I guess that instead of declaring a variable a similar result can be accomplished using a different operator . In WxMaxima I see that the multiplication of a scalar by a vector is done using the "*" while the dot product of vectors is through "." ; in Smath there is just one operator for everything and this probably my be an issue.
Your 2nd point due to my ignorance is not very clear; at least to me the Smath result doesn't look the most compact one when I multiply something that should be a scalar by a vector.
Best regards
Franco
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 05/06/2014(UTC) Posts: 349 Location: Colombo Was thanked: 128 time(s) in 82 post(s)
|
Just for information. I am not sure whether this is helpful. Edited by user 11 October 2016 16:44:26(UTC)
| Reason: Not specified |
Look within!... The secret is inside you. Best Regards Eng. NDTM Amarasekera - Sri Lanka |
1 user thanked ndtma for this useful post.
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 983 time(s) in 811 post(s)
|
Helpful in the "way to please". But from the onset this all Vector stuff is WRONG, WRONG ....! From the onset you have a vector that could be 1D only, that could be 2D, that could be 3D. From there apply the the rules: vector*function. I Have posted a demo sheet for 1D, 2D, 3D It won't work the other way around "function*vector" because the rules "vector*function" is the rule, not commutative like 3-2 is not equal to 2-3.
As long as Smath is correct: it can rotate 2D, 3D by the rules rather than by "user invented rules".
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 983 time(s) in 811 post(s)
|
Why should there be more arguments ?
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 01/08/2010(UTC) Posts: 115 Location: Rome Was thanked: 13 time(s) in 13 post(s)
|
Hello NDTMA,
yes your feedback is helpful , I do not use Mathcad but I see that its symbolic evaluation is correct and leads to a vector and the application of the Vectorize tecnique in Smath is a good approach to address my issue ( but to tell the truth I consider this a good tip more than a proper solution ) , need to study and understand it better, I have never used it extensively. What make me wonder is what Mathcad uses to do the dot product of 2 vectors whose result is a scalar, it has to be something different from "." I guess ( probably a wrong guess)
Thanks a lot
Franco
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 983 time(s) in 811 post(s)
|
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 983 time(s) in 811 post(s)
|
|
|
|
|
SMath Studio Forum
»
SMath Studio
»
Questions
»
[SS-2411] Symbolic evaluation of vectors
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.