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 mkraska  
#1 Posted : 16 August 2023 21:49:01(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,988
Germany

Was thanked: 1126 time(s) in 723 post(s)
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 (104kb) downloaded 6 time(s).







Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
thanks 1 user thanked mkraska for this useful post.
on 17/08/2023(UTC)

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

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.