problem with solving a system of equations

problem with solving a system of equations - Messages

#1 Posted: 8/17/2024 12:07:15 AM
Prmtv

Prmtv

0 likes in 49 posts.

Group: User

Hello!

Such a problem appeared. Please tell me what's the matter

00.png


00.sm (9 KiB) downloaded 34 time(s).


Thanks!
#2 Posted: 8/17/2024 5:49:32 AM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

roots() in this case needs a custom initial guess.

00_Kr.sm (13 KiB) downloaded 27 time(s).
2024-08-17 00_46_56-SMath Solver - [00.sm_].png
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#3 Posted: 8/18/2024 12:20:41 AM
Prmtv

Prmtv

0 likes in 49 posts.

Group: User

Wrote

roots() in this case needs a custom initial guess.

00_Kr.sm (13 KiB) downloaded 27 time(s).
2024-08-17 00_46_56-SMath Solver - [00.sm_].png



how to choose the right one initial guess?
#4 Posted: 8/18/2024 4:15:52 AM
overlord

overlord

547 likes in 1330 posts.

Group: Moderator

Wrote

how to choose the right one initial guess?


What I can suggest is to use right solver.

2024-08-18_00-07.png

2024-08-18_00-13.png

#5 Posted: 8/18/2024 7:25:46 PM
Prmtv

Prmtv

0 likes in 49 posts.

Group: User

Wrote

Wrote

how to choose the right one initial guess?


What I can suggest is to use right solver.

2024-08-18_00-07.png

2024-08-18_00-13.png



how is the order of output of variables determined? From function "Unknowns"?

2024-08-18_00-13.png
#6 Posted: 8/18/2024 7:51:08 PM
overlord

overlord

547 likes in 1330 posts.

Group: Moderator

Wrote

how is the order of output of variables determined? From function "Unknowns"?[/attach]


My guess and and experience is they are ordered alphabetically.
#7 Posted: 8/22/2024 11:23:22 PM
Prmtv

Prmtv

0 likes in 49 posts.

Group: User

Wrote

Wrote

how to choose the right one initial guess?


What I can suggest is to use right solver.

2024-08-18_00-07.png

2024-08-18_00-13.png



Thanks!

But when creating exe-file required variables a, b, B, t = 1. Why does this happen? Or is this a feature of the plugin "Nonlinear solvers"?

0000.PNG
#8 Posted: 8/23/2024 12:05:06 AM
overlord

overlord

547 likes in 1330 posts.

Group: Moderator

I can't know what you have done without your sheet.
However, this was not an issue when I saved it as an exe.

Regards

Click to expand
#9 Posted: 8/23/2024 3:42:01 AM
Prmtv

Prmtv

0 likes in 49 posts.

Group: User

Wrote

I can't know what you have done without your sheet.
However, this was not an issue when I saved it as an exe.

Regards

Click to expand



If I use the function "al_nleqsolve" then everything really works


The problem occurs when using the function "FindRoot"

00.PNG
#10 Posted: 8/23/2024 4:11:17 AM
overlord

overlord

547 likes in 1330 posts.

Group: Moderator

It is due to some bug or miscode for FindRoot().
Or this is totally SMath result parse method.
Your solution (A) is stored symbolic.
Make it totally numeric by eval().
Exe file can show correct results after that.

Regards

Click to expand
#11 Posted: 8/26/2024 1:33:45 AM
Prmtv

Prmtv

0 likes in 49 posts.

Group: User

Wrote

It is due to some bug or miscode for FindRoot().
Or this is totally SMath result parse method.
Your solution (A) is stored symbolic.
Make it totally numeric by eval().
Exe file can show correct results after that.

Regards

Click to expand



Thanks!
  • New Posts New Posts
  • No New Posts No New Posts