Solve problem

Solve problem - Detect "No real roots" message. - Сообщения

#1 Опубликовано: 27.10.2015 06:13:44
Veldirn

Veldirn

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

Группа: User

Is there way to detect that function gives error, or more accurately when Solve() gives "No real roots" error?
#2 Опубликовано: 27.10.2015 13:16:14
Jean Giraud

Jean Giraud

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

Группа: User

Wrote

Is there way to detect that function gives error, or more accurately when Solve() gives "No real roots" error?



_________________________________

Most likely that is because your solve range does not bracket the
function crossing Xaxis. Before solving, always plot.
Don't be shy, attach the work sheet, just minute job to tutor it back.

Jean
#3 Опубликовано: 28.10.2015 03:23:49
Veldirn

Veldirn

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

Группа: User

I think you don't understand what I wish to know. Let me rephrase my question is: is there a way to detect that two functions are NOT CROSSING without error. I was thinking maybe there is a function that detects errors so I could write something like: If_Error(Solve(f1(x);f2(x),x))= 1 if f1 and f2 are not crossing.
#4 Опубликовано: 28.10.2015 23:39:42
Jean Giraud

Jean Giraud

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

Группа: User

Wrote

I think you don't understand what I wish to know. Let me rephrase my question is: is there a way to detect that two functions are NOT CROSSING without error. I was thinking maybe there is a function that detects errors so I could write something like: If_Error(Solve(f1(x);f2(x),x))= 1 if f1 and f2 are not crossing.



________________________________

Your question is now different, but the answer is same: plot your functions, doing that
you will kow the bracket range for root(s),i.e: the abscissa where they cross each other.

Again: attach your work sheet, few seconds job I will return,
but I visit this forum only at night [generally every day].
If you agree to attach your work sheet, I will catch it sooner.

Jean

#5 Опубликовано: 29.10.2015 14:13:49
Martin Kraska

Martin Kraska

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

Группа: Moderator

Wrote

I think you don't understand what I wish to know. Let me rephrase my question is: is there a way to detect that two functions are NOT CROSSING without error. I was thinking maybe there is a function that detects errors so I could write something like: If_Error(Solve(f1(x);f2(x),x))= 1 if f1 and f2 are not crossing.



You can assign the result of solve to a variable and check if that variable is defined. If not, you can check lastError.

solve.PNG
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений