[SS-2411] Symbolic evaluation of vectors

[SS-2411] Symbolic evaluation of vectors - Сообщения

#1 Опубликовано: 03.10.2016 03:27:50
frapuano

frapuano

13 сообщений из 115 понравились пользователям.

Группа: User

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 .

_Silvy5.png

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
#2 Опубликовано: 03.10.2016 05:24:03
Davide Carpi

Davide Carpi

1416 сообщений из 2873 понравились пользователям.

Группа: Moderator

At first glance seems a bug in symbolic evaluation...

2016-10-03 10_22_35-SMath Studio Desktop - [vectors.sm].png
vectors.sm (8 КиБ) скачан 48 раз(а).
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#3 Опубликовано: 03.10.2016 07:37:56
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: Moderator

I also think that it is a bug, has been introduced after 97.5737

Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#4 Опубликовано: 03.10.2016 10:47:05
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Wrote

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 (103 КиБ) скачан 65 раз(а).


#5 Опубликовано: 03.10.2016 15:25:58
frapuano

frapuano

13 сообщений из 115 понравились пользователям.

Группа: User

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
#6 Опубликовано: 04.10.2016 14:51:36
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

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


#7 Опубликовано: 04.10.2016 17:44:55
frapuano

frapuano

13 сообщений из 115 понравились пользователям.

Группа: User

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 :

_Silvy6.png

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
#8 Опубликовано: 04.10.2016 18:27:55
Davide Carpi

Davide Carpi

1416 сообщений из 2873 понравились пользователям.

Группа: Moderator

Wrote

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.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 пользователям понравился этот пост
frapuano 05.10.2016 00:51:00
#9 Опубликовано: 04.10.2016 19:30:45
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

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

Forum Wrong Vector.gif

Forum Wrong Vector [Sum dot].gif
#10 Опубликовано: 05.10.2016 12:07:14
Andrey Ivashov

Andrey Ivashov

2269 сообщений из 3734 понравились пользователям.

Группа: Super Administrator

Thank you!
Actually extremely serious bug found:

err_098_1.png

It can be any function, not only vector.

Fixed.

Regards.
2 пользователям понравился этот пост
frapuano 05.10.2016 13:08:00, Mike Kaganski 05.10.2016 18:26:00
#11 Опубликовано: 05.10.2016 18:24:18
frapuano

frapuano

13 сообщений из 115 понравились пользователям.

Группа: User

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


_Silvy7.png
#12 Опубликовано: 11.10.2016 02:52:44
frapuano

frapuano

13 сообщений из 115 понравились пользователям.

Группа: User

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:

_Silvy8.png


what I guess is the correct behavior is shown in WxMaxima too



_Silvy9.png

Davide,Martin what do you think about ?

Best regards

Franco
#13 Опубликовано: 11.10.2016 04:51:11
Davide Carpi

Davide Carpi

1416 сообщений из 2873 понравились пользователям.

Группа: Moderator

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.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#14 Опубликовано: 11.10.2016 07:34:00
frapuano

frapuano

13 сообщений из 115 понравились пользователям.

Группа: User

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
#15 Опубликовано: 11.10.2016 10:39:43
NDTM Amarasekera

NDTM Amarasekera

130 сообщений из 352 понравились пользователям.

Группа: User

Just for information. I am not sure whether this is helpful.

Symbolic Calc.jpg
Look within!... The secret is inside you. Best Regards Eng. NDTM Amarasekera - Sri Lanka
1 пользователям понравился этот пост
frapuano 11.10.2016 14:37:00
#16 Опубликовано: 11.10.2016 12:54:50
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

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".
#17 Опубликовано: 11.10.2016 13:06:31
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Why should there be more arguments ?

Forum Franco_2.gif
#18 Опубликовано: 11.10.2016 14:55:35
frapuano

frapuano

13 сообщений из 115 понравились пользователям.

Группа: User

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
#19 Опубликовано: 11.10.2016 23:28:54
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Vector Suite.gif
#20 Опубликовано: 12.10.2016 00:44:06
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Vector Suite 2.gif
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений