Vectorization of expressions containing dot products

Vectorization of expressions containing dot products - Сообщения

#1 Опубликовано: 16.08.2023 15:49:01
Martin Kraska

Martin Kraska

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

Группа: Moderator

This topic is an offspring of this topic on equation solving.

The problem is that the cross product in SMath can't handle operators which aren't vectors but for instance a product of a symbolic name and a normalized vector.

The initial proposal: Mark the symbolic names as units (these are always applied stored as part of the elements, never as a common factor)

This, however, excluded solvers like FindRoot() and roots().

Alvaro demonstrated a way to handle the issue without using Maxima and without marking the unknowns as units. (row 2 column 2 in the attached grid of tests)

Yet, even though this is a remarkable example SMath command, I am reluctant to recommend that approach to my students.
The issue is that this approach requires the vectorize() function combined with very special conditions:
- a very special way to normalize vectors
- at a certain step the expression must be stored in a variable.
If one of these conditions isn't met, then applying vectorize() silently produces wrong results.

On the other hand, when accepting unit-like unknowns, then you have no restrictions except that you are forbidden to apply vectorization to expressions which are itself vector operations (e.g. the normalization). Plus, you are restricted to either matrix inversion or Maxima Solve()

So I still recommend two adjustments:
- Improve the SMath cross product. The sheet below shows that with a proper cross product we don't need to mark the unknowns as units.
- Accept units as names of unknowns in the FindRoot() solver (if specified at the left hand side of the unknown=guess equations).

Still, unit-shaped unknowns are a bit strange to me, so a robust alternative is still welcome.

2023-08-16 20_38_40-SMath Solver - [issues.sm].png
issues.sm (103 КиБ) скачан 30 раз(а).







Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 пользователям понравился этот пост
Alvaro Diaz Falconi 17.08.2023 06:34:00
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений