Problem with solve

Problem with solve - Сообщения

#1 Опубликовано: 18.06.2011 09:01:27
Abhi

Abhi

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

Группа: User

Hi,

I've found what looks like a bug in solve(). Could anyone please help?

Thanks in advance,

Abhi

#2 Опубликовано: 18.06.2011 10:40:07
Radovan Omorjan

Radovan Omorjan

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

Группа: Moderator

Hello,

There is already mentioned few times about solving equations with solve() and roots().
The solve() function has a searching algorithm trying to find all the real roots in the given range, and it can fail like most of the numerical procedures. It is advisable to use 4 arguments solve(). The default range is set by default to [-20,20] - Tools|Options|Calculation|Roots range - where it is not suitable in some cases (like in yours)

In your case:
[MATH=eng]a←1[/MATH][MATH=eng]b←263.84[/MATH][MATH=eng]c←-61463[/MATH]
[MATH=eng]f(x)←a*x^2+b*x+c[/MATH]
[MATH=eng]solve(f(x),x,-450,150)=#@#[/MATH]
solve() will probabely fail. Therefore, you can try to find the roots one by one:
[MATH=eng]solve(f(x),x,-500,-300)=-412.7507[/MATH]
[MATH=eng]solve(f(x),x,100,200)=148.9107[/MATH]
or using roots()
[MATH=eng]roots(f(_x),_x,-400)=-412.7507[/MATH]
[MATH=eng]roots(f(_x),_x,150)=148.9107[/MATH]

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#3 Опубликовано: 19.06.2011 10:02:07
Abhi

Abhi

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

Группа: User

OK, got it.

Thanks
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений