SOE findroot question: is there an order for vars?

SOE findroot question: is there an order for vars? - different vars order, same result value - Сообщения

#1 Опубликовано: 11.05.2022 00:02:05
John

John

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

Группа: User

Hi, Guys:

I'm using FindRoot for SOE solution,but something make me confusion. for example:

smath soe q1.jpg

the same SOE with different variables, different result, and the second is wrong.

I think maybe I have something wrong. please help me, how to use the FindRoot?

Thanks a lot!

John

attach the file
soe.sm (6 КиБ) скачан 22 раз(а).
#2 Опубликовано: 11.05.2022 00:24:23
Alvaro Diaz Falconi

Alvaro Diaz Falconi

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

Группа: User

Hi. You must to sort the variables in the same order than Unknowns.

Clipboard02.jpg

Best regards.
Alvaro
1 пользователям понравился этот пост
sergio 11.05.2022 04:02:00
#3 Опубликовано: 11.05.2022 01:49:05
John

John

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

Группа: User

Wrote

Hi. You must to sort the variables in the same order than Unknowns.

Clipboard02.jpg

Best regards.
Alvaro



Hi, is there any rules for the order?

smath soe q2.jpg

Thanks alot
John
#4 Опубликовано: 11.05.2022 03:32:40
Alvaro Diaz Falconi

Alvaro Diaz Falconi

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

Группа: User

Hi. You can't redefine Unknowns. Well, you can, but isn't the best idea. Unknowns is a function in the same plugin than FindRoots, SpecialSolvers. I don't know the internals of the plugin. My guess that the general rule is sort the variable names in lexical order, but if the name has unicode characters or some unusual ASCII character, it is best to make sure of the order to follow by evaluating Unknows(eq).

Best regards.
Alvaro.
#5 Опубликовано: 11.05.2022 05:30:29
John

John

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

Группа: User

okay, I got it. but a new question, why I can't got the result as your picture?

smath soe q3.jpg

would you mind post the sample sm file ?

Thanks a lot!
John
#6 Опубликовано: 11.05.2022 06:22:01
Alvaro Diaz Falconi

Alvaro Diaz Falconi

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

Группа: User

Wrote

okay, I got it. but a new question, why I can't got the result as your picture?



SMath have two "=": Numerical and Symbolical. With numerical evaluation you can only obtain numerical values, that is, without undefined variables. Rigth click to change it to symbolic equals, or use Ctrl+period instead "=", or click symbolic evaluation in the right panel.

Wrote


would you mind post the sample sm file ?



Sorry, I forgot to post it, and right now can't.

Best regards.
Alvaro.

#7 Опубликовано: 11.05.2022 06:36:21
John

John

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

Группа: User


thank you!

I got it.

Thanks a lot!
John
#8 Опубликовано: 11.05.2022 08:31:04
Jean Giraud

Jean Giraud

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

Группа: User

OBSERVE ... so much from so little

Solve Algebraic, NON-Algebraic Read first.sm (69 КиБ) скачан 26 раз(а).
#9 Опубликовано: 11.05.2022 08:56:57
Jean Giraud

Jean Giraud

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

Группа: User

This multi solve companion is 3 x 3
Make it 2 x 2 ... n x n ... as per your project.

Solve Algebraic, MULTISOLVE Companions.sm (17 КиБ) скачан 32 раз(а).
#10 Опубликовано: 11.05.2022 15:32:03
overlord

overlord

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

Группа: Moderator

You can automate assigning guesses to unknowns.
By this way, you won't care order of them.

Regards

findroot_auto.sm (4 КиБ) скачан 32 раз(а).

2022-05-11_21-29.png
2 пользователям понравился этот пост
sergio 11.05.2022 16:22:00, churichuro 11.05.2022 21:11:00
#11 Опубликовано: 12.05.2022 08:44:12
Jean Giraud

Jean Giraud

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

Группа: User

Wrote

For your example, make it algo style for local infinite use.
Observe ... sols:=U^-1*V is universal outside of Smath Plugin(s)


... your question about order of vars
solutions are by convention in descending order of the pair wise u, v
no matter the names you give.
I can't explain the decimals difference between MCD 11/Smath.
There are other constants that can't be found exactly ...
Pitot constant, Goat radius constant ...
That remark applies to any solvers [Smath and wrt any CAS]
The U^1*V is the core component of the Cholesky solver
as applied to fitting model function to a data set.
In that case, best fit is obtained by iterating the Genfit.
Chers ... Jean.

Solve Algo.PNG
#12 Опубликовано: 12.05.2022 09:46:19
Jean Giraud

Jean Giraud

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

Группа: User

... here, you can push the cork in the bottle to accommodate irrational pi.
as well ignore epsilon.

Solve f(x,y,z).PNG
#13 Опубликовано: 12.05.2022 10:11:31
Jean Giraud

Jean Giraud

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

Группа: User

... as it looks, the max I could push the cork in the bottle
y≡0.279339266990994 ... sanity f(x,y,z)=-0.000000000001344
Confirms impossible exactly solving irrational numbers.
#14 Опубликовано: 12.05.2022 18:51:29
overlord

overlord

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

Группа: Moderator

Long word short, there is an order for vars.
You can either avoid it manually or automatically.
It is up to users choice which suits them most.
Either one has advantages over other.

Regards
#15 Опубликовано: 15.05.2022 08:04:08
John

John

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

Группа: User

Thank you all so much!

a nice forum
#16 Опубликовано: 15.05.2022 11:21:14
churichuro

churichuro

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

Группа: User

I never thought the time would come when I would become an expert at ignoring specific comments on a forum...thanks Jean!
1 пользователям понравился этот пост
Oscar Campo 16.05.2022 14:07:00
#17 Опубликовано: 15.05.2022 13:20:51
Jean Giraud

Jean Giraud

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

Группа: User

Wrote

Thank you all so much !


Solving is very important in Engineering Projects.
Reserve ... solve, roots, FindRoots and more to specific applications
Solving a square matrix goes via the conventional solver, no flaw.
This didactic document has been refreshed.
Cheers ... Jean.

Solve Algebraic, MULTISOLVE DIDACTIC.sm (21 КиБ) скачан 32 раз(а).

#18 Опубликовано: 15.05.2022 15:26:39
Jean Giraud

Jean Giraud

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

Группа: User

Wrote

I never thought the time would come when I would become an expert at ignoring specific comments on a forum.
...Thanks Jean!


Many of the advanced Smath documents are join venture.
Adapted/exemplified from various sources.
Download: Samples, Utilities Most used_3.
If something is not clear, please don't hesitate.
You have more, please offer.
Take care Amigo ... Jean.

#19 Опубликовано: 15.05.2022 15:34:46
overlord

overlord

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

Группа: Moderator

No churichruo, dont.
If you will post same worksheets 600 times, (satire here)
and then you will tease how less another one contributed,
and how your post statistic is 18.3% of entire forum,
Please don't.

You will just make a fool of yourself.
1 пользователям понравился этот пост
Oscar Campo 16.05.2022 14:08:00
#20 Опубликовано: 16.05.2022 10:35:46
Jean Giraud

Jean Giraud

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

Группа: User

Wrote

No churichruo, dont.
...
You will just make a fool of yourself.


Do you mean churichruo will make a fool of himself
from reputed contributors in this document:
Mathsoft, Robert Adair, Carlos, Martin, Viacheslav, Romberg,
Riemann FD, Hermite Polyline, Legendre, Gram_Schmidt,
Guiseppe Borzi [simplex], Mathsoft Collaboratory Convolution ...
I will add Fresnel [Clothoid].
churichruo wrote Tanks Jean
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений