Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


2 Pages12>
Options
Go to last post Go to first unread
Offline MaLe24  
#1 Posted : 26 August 2022 22:56:08(UTC)
MaLe24

Rank: Newbie

Groups: Registered
Joined: 26/08/2022(UTC)
Posts: 9

Hi all,

I am trying to solve an equation with the unknown "d". I have attached my Smath file and hope someone can help me with this.

Thanks a lot.

NoRealRootsError.sm (5kb) downloaded 16 time(s).

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

Offline overlord  
#2 Posted : 27 August 2022 02:12:31(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,126
Turkey

Was thanked: 507 time(s) in 338 post(s)
In times of these, al_nleqsolve() is your friend.
Or you can use maple or maxima solvers.

Regards

NoRealRootsError_solved.sm (9kb) downloaded 17 time(s).

2022-08-27_02-11.png
thanks 2 users thanked overlord for this useful post.
on 27/08/2022(UTC),  on 27/08/2022(UTC)
Offline churichuro  
#3 Posted : 27 August 2022 02:16:08(UTC)
churichuro


Rank: Advanced Member

Groups: Registered
Joined: 27/03/2019(UTC)
Posts: 75
Mexico
Location: coah

Was thanked: 27 time(s) in 22 post(s)
maybe

with maple
Offline MaLe24  
#4 Posted : 27 August 2022 14:20:52(UTC)
MaLe24

Rank: Newbie

Groups: Registered
Joined: 26/08/2022(UTC)
Posts: 9

Thank you all for the replies.

As I am not that familiar with Smath yet some questions have raised to me.

Why does the equation needs to be re-written to f(d)? And what's the reason f(0) has to be calculated? How do I need to interpetret the things below the graph? I am sorry but it looks like magic to meOh my


Edited by user 27 August 2022 14:23:27(UTC)  | Reason: Resolve picture error

Offline MaLe24  
#5 Posted : 27 August 2022 14:27:37(UTC)
MaLe24

Rank: Newbie

Groups: Registered
Joined: 26/08/2022(UTC)
Posts: 9

Originally Posted by: overlord Go to Quoted Post
In times of these, al_nleqsolve() is your friend.
Or you can use maple or maxima solvers.

Regards

NoRealRootsError_solved.sm (9kb) downloaded 17 time(s).

2022-08-27_02-11.png


Hi overlord, thanks for your help.

Could you elaborate on what is described in the grey area?

Why did you re-write the equation to f(d)? And why is in the equation f(d) equ(d) added?
What is the function of step:=0?
Offline MaLe24  
#6 Posted : 27 August 2022 14:49:25(UTC)
MaLe24

Rank: Newbie

Groups: Registered
Joined: 26/08/2022(UTC)
Posts: 9

Sorry, coming back on this. What is the meaning of 0.033*i? I can't see what in the end is the solution to d?
Offline Jean Giraud  
#7 Posted : 27 August 2022 15:03:52(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: MaLe24 Go to Quoted Post
Why does the equation needs to be re-written to f(d)? And what's the reason f(0) has to be calculated? How do I need to interpret the things below the graph? I am sorry but it looks like magic to me

1. If you plot the function first, that will help bracketing the solve bloc.
2. F(0) ... just to see its min datum.
3. Nice maple, al_nleqsolve ... not needed vs the built-in solve(,,,,)
Enjoy Smath ... Jean.

NoRealRootsError Doctored.sm (13kb) downloaded 5 time(s).
Offline MaLe24  
#8 Posted : 27 August 2022 15:41:29(UTC)
MaLe24

Rank: Newbie

Groups: Registered
Joined: 26/08/2022(UTC)
Posts: 9

Originally Posted by: Jean Giraud Go to Quoted Post
Originally Posted by: MaLe24 Go to Quoted Post
Why does the equation needs to be re-written to f(d)? And what's the reason f(0) has to be calculated? How do I need to interpret the things below the graph? I am sorry but it looks like magic to me

1. If you plot the function first, that will help bracketing the solve bloc.
2. F(0) ... just to see its min datum.
3. Nice maple, al_nleqsolve ... not needed vs the built-in solve(,,,,)
Enjoy Smath ... Jean.

NoRealRootsError Doctored.sm (13kb) downloaded 5 time(s).


Thanks.

It looks like the outcome isn't correct. If I check the equation with d=0.2551 it doesn't correspond with the equation?
Offline overlord  
#9 Posted : 27 August 2022 16:12:46(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,126
Turkey

Was thanked: 507 time(s) in 338 post(s)
Originally Posted by: MaLe24 Go to Quoted Post
Hi overlord, thanks for your help.

Could you elaborate on what is described in the grey area?

Why did you re-write the equation to f(d)? And why is in the equation f(d) equ(d) added?
What is the function of step:=0?

step is max solving steps of al_nleqsolve(), zero means unlimited steps.
guess is a starting point for variable. eps is tolerance for solver.
You can read more about al_nleqsolve() function from Reference Book.

Click to expand

f(d) is common usage of function, not necessary.
Just added for correspondence for functions help sheet.
Can be written as this too, but g(v)=f(v1) is necessary.

2022-08-27_15-53.png

Originally Posted by: MaLe24 Go to Quoted Post
Sorry, coming back on this. What is the meaning of 0.033*i? I can't see what in the end is the solution to d?

i means imaginary number if (-1)^(1/2).
Fourth power of all solutions of d makes function zero.
NaN actually in your case, division by zero.
But numeric solver takes this as a result I guess.

Originally Posted by: MaLe24 Go to Quoted Post
It looks like the outcome isn't correct. If I check the equation with d=0.2551 it doesn't correspond with the equation?

It is correct, check more carefully.

2022-08-27_15-58.png

Regards
Offline Jean Giraud  
#10 Posted : 27 August 2022 18:01:41(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: MaLe24 Go to Quoted Post
Sorry, coming back on this.
What is the meaning of 0.033*i ?
I can't see what in the end is the solution to d?

Maple collects all possible solutions, including pure imaginary.
Best respond is the solve(,,,,) bloc, just real intersections.

Offline MaLe24  
#11 Posted : 27 August 2022 20:24:11(UTC)
MaLe24

Rank: Newbie

Groups: Registered
Joined: 26/08/2022(UTC)
Posts: 9

Quote:
step is max solving steps of al_nleqsolve(), zero means unlimited steps.
guess is a starting point for variable. eps is tolerance for solver.
You can read more about al_nleqsolve() function from Reference Book.


Thanks for your explanation, some things are strange to me a bit:
1. How can I setup such a grey block as you did?
2. eps should be the tolerance for the solver, I change it to for example to 10 (instead of 14), but the outcome didn't change anyway?
3. Why isn't the jacobi matrix used in the al_nleqsolve()?
4. What does g(v):=f(v1) mean?

Quote:
It is correct, check more carefully.

2022-08-27_15-58.png

Regards

Where is the value of 1000 based on in this equation? I doesn't see the reference?

Quote:
i means imaginary number if (-1)^(1/2).
Fourth power of all solutions of d makes function zero.
NaN actually in your case, division by zero.
But numeric solver takes this as a result I guess.

I can't follow along with the maple(solve) function yet, why does it end up with 6 values?

Where could I find the reference book? I think I found it within Smath itself as a plugin but couldn't find the topic about al_nleqsolve().

Edited by user 27 August 2022 20:30:07(UTC)  | Reason: Asked for reference book al_nleqsolve

Offline Jean Giraud  
#12 Posted : 28 August 2022 00:05:38(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
... here is an example of al_nleqsolve to fit
a data set via support points selected by user.
Too noisy data are a bit more difficult to manage.
They can be smoothed via Genfit.

Mal.024 al_nleqsove.sm (40kb) downloaded 7 time(s).
Offline overlord  
#13 Posted : 28 August 2022 00:26:37(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,126
Turkey

Was thanked: 507 time(s) in 338 post(s)
Originally Posted by: MaLe24 Go to Quoted Post
Thanks for your explanation, some things are strange to me a bit:

1. How can I setup such a grey block as you did?
It is just an empty text region placed under the equations. Check the file NoRealRootsError_solved_v2.sm (15kb) downloaded 5 time(s)..

2. eps should be the tolerance for the solver, I change it to for example to 10 (instead of 14), but the outcome didn't change anyway?
It relates decimal accuracy, 10^14 means it will numerically check solvers epsilon till it won't change for 10^14 digits.

3. Why isn't the jacobi matrix used in the al_nleqsolve()?
Sometimes you need Jacobian matrix sometimes you don't.

4. What does g(v):=f(v1) mean?
It is how it is used in al_nleqsolve(). v is gathered from guess matrix. v1 is first element of guess matrix.
If a system of two unknown would be solved than it will be used as in Reference Book.

5. Where is the value of 1000 based on in this equation? I doesn't see the reference?
1000 is used instead of your 400*10^6, just to show solver is finding results correctly.

6. I can't follow along with the maple(solve) function yet, why does it end up with 6 values?
maple plugin is more capable than SMath's other functions at certain areas, sometimes it can find more results.
It is much more reliable at symbolic results for example.

7. Where could I find the reference book? I think I found it within Smath itself as a plugin but couldn't find the topic about al_nleqsolve().
Check the video below.

Click to expand

Edited by user 28 August 2022 01:13:42(UTC)  | Reason: Not specified

Offline Razonar  
#14 Posted : 28 August 2022 06:59:33(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
A semi numerical-symbolic plugin less version of the solution.

RealRoots.sm (27kb) downloaded 13 time(s).
RealRoots.pdf (127kb) downloaded 8 time(s).

Best regards.
Alvaro.

Edited by user 28 August 2022 07:33:27(UTC)  | Reason: Not specified

Offline Jean Giraud  
#15 Posted : 28 August 2022 16:19:22(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Thanks Alvaro.
You are the Grand Doctor in Smath Community.
So much maths involved ... 10 decimals !!!
Hola ... Jean.

AccurateSolve.PNG
Offline MaLe24  
#16 Posted : 28 August 2022 17:58:50(UTC)
MaLe24

Rank: Newbie

Groups: Registered
Joined: 26/08/2022(UTC)
Posts: 9

I would like to thank you all! I wanted to give a "thank" notification but I get an error: "en.smath.com says: Error Occurred".

I am trying to get familiar with it a bit now Good.

From the latest files, some questions:
  1. Why did you define the ao:= .... equation? (@Alvaro)
  2. FindRoots What's meant with "finding roots"? Why do I need to find roots? (@overlord)
  3. d.result What is the reason this function is used? What does that 0.2551 value say to me?
  4. How can I get more number of digits behind the comma? (@overlord)



Thanks.
Offline Jean Giraud  
#17 Posted : 28 August 2022 18:42:46(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Thanks button does not work for ~ 8 years.
You won't get more decimals than snippet above, 10 D.
Too many numerical maths involved.
Cheers ... Jean.
Offline MaLe24  
#18 Posted : 28 August 2022 18:43:52(UTC)
MaLe24

Rank: Newbie

Groups: Registered
Joined: 26/08/2022(UTC)
Posts: 9

I tried another equation to solve, but get the norealroots error. What would be the way to go here?
Norealroots
Offline overlord  
#19 Posted : 28 August 2022 20:09:08(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,126
Turkey

Was thanked: 507 time(s) in 338 post(s)
Originally Posted by: MaLe24 Go to Quoted Post
From the latest files, some questions:

2. What's meant with "finding roots"? Why do I need to find roots? (@overlord)
root of a function is what it makes 0 when given to unknown.
for example; take f(x)=x^2+3*x+2.
f(x) results zero when x is equal to -2 and -1.
solve(), roots(), FindRoot(), al_nleqsolve() are simply trying to find that zero makers.
main purpose of solvers are trying to find the root of given function.

3. What is the reason this function is used? What does that 0.2551 value say to me?
this function finds x value which makes equ(x) is equal to 1000.
solve(), roots(), FindRoots() etc could be used too.
I used it just to show you smath can solve your function, correctly.

4. How can I get more number of digits behind the comma? (@overlord)
right click to result, hover to decimal places, choose how many digits you want to show.

Click to expand
Offline overlord  
#20 Posted : 28 August 2022 20:10:39(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,126
Turkey

Was thanked: 507 time(s) in 338 post(s)
Originally Posted by: MaLe24 Go to Quoted Post
I tried another equation to solve, but get the norealroots error. What would be the way to go here?

Click to expand
Users browsing this topic
2 Pages12>
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.