No real roots equation error

No real roots equation error - I am having the No real roots error while trying to solve an equation - Сообщения

#1 Опубликовано: 26.08.2022 16:56:08
MaLe24

MaLe24

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

Группа: User

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 (4 КиБ) скачан 42 раз(а).
#2 Опубликовано: 26.08.2022 20:12:31
overlord

overlord

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

Группа: Moderator

In times of these, al_nleqsolve() is your friend.
Or you can use maple or maxima solvers.

Regards

NoRealRootsError_solved.sm (8 КиБ) скачан 42 раз(а).

2022-08-27_02-11.png
2 пользователям понравился этот пост
sergio 27.08.2022 06:25:00, NDTM Amarasekera 27.08.2022 08:57:00
#3 Опубликовано: 26.08.2022 20:16:08
churichuro

churichuro

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

Группа: User

maybe

with maple
#4 Опубликовано: 27.08.2022 08:20:52
MaLe24

MaLe24

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

Группа: User

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 me


#5 Опубликовано: 27.08.2022 08:27:37
MaLe24

MaLe24

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

Группа: User

Wrote

In times of these, al_nleqsolve() is your friend.
Or you can use maple or maxima solvers.

Regards

NoRealRootsError_solved.sm (8 КиБ) скачан 42 раз(а).

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?
#6 Опубликовано: 27.08.2022 08:49:25
MaLe24

MaLe24

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

Группа: User

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?
#7 Опубликовано: 27.08.2022 09:03:52
Jean Giraud

Jean Giraud

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

Группа: User

Wrote

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 (12 КиБ) скачан 33 раз(а).
#8 Опубликовано: 27.08.2022 09:41:29
MaLe24

MaLe24

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

Группа: User

Wrote

Wrote

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 (12 КиБ) скачан 33 раз(а).



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?
#9 Опубликовано: 27.08.2022 10:12:46
overlord

overlord

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

Группа: Moderator

Wrote

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

Wrote

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.

Wrote

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
#10 Опубликовано: 27.08.2022 12:01:41
Jean Giraud

Jean Giraud

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

Группа: User

Wrote

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.

#11 Опубликовано: 27.08.2022 14:24:11
MaLe24

MaLe24

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

Группа: User

Цитата

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?

Цитата

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?

Цитата

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().
#12 Опубликовано: 27.08.2022 18:05:38
Jean Giraud

Jean Giraud

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

Группа: User

... 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 (39 КиБ) скачан 36 раз(а).
#13 Опубликовано: 27.08.2022 18:26:37
overlord

overlord

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

Группа: Moderator

Wrote

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 (14 КиБ) скачан 34 раз(а)..

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
#14 Опубликовано: 28.08.2022 00:59:33
Alvaro Diaz Falconi

Alvaro Diaz Falconi

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

Группа: User

A semi numerical-symbolic plugin less version of the solution.

RealRoots.sm (26 КиБ) скачан 46 раз(а).
RealRoots.pdf (126 КиБ) скачан 36 раз(а).

Best regards.
Alvaro.
#15 Опубликовано: 28.08.2022 10:19:22
Jean Giraud

Jean Giraud

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

Группа: User

Thanks Alvaro.
You are the Grand Doctor in Smath Community.
So much maths involved ... 10 decimals !!!
Hola ... Jean.

AccurateSolve.PNG
#16 Опубликовано: 28.08.2022 11:58:50
MaLe24

MaLe24

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

Группа: User

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 .

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.
#17 Опубликовано: 28.08.2022 12:42:46
Jean Giraud

Jean Giraud

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

Группа: User

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.
#18 Опубликовано: 28.08.2022 12:43:52
MaLe24

MaLe24

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

Группа: User

I tried another equation to solve, but get the norealroots error. What would be the way to go here?
Norealroots
#19 Опубликовано: 28.08.2022 14:09:08
overlord

overlord

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

Группа: Moderator

Wrote

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
#20 Опубликовано: 28.08.2022 14:10:39
overlord

overlord

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

Группа: Moderator

Wrote

I tried another equation to solve, but get the norealroots error. What would be the way to go here?


Click to expand
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений