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

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline Abhi  
#1 Posted : 18 June 2011 16:01:27(UTC)
Abhi

Rank: Newbie

Groups: Registered
Joined: 18/06/2011(UTC)
Posts: 4
Location: Bombay

Hi,

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

Thanks in advance,

Abhi

Edited by user 18 June 2011 16:11:51(UTC)  | Reason: Not specified

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

Offline omorr  
#2 Posted : 18 June 2011 17:40:07(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
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:
a←1b←263.84c←-61463
f(x)←a*x^2+b*x+c
solve(f(x),x,-450,150)=#@#
solve() will probabely fail. Therefore, you can try to find the roots one by one:
solve(f(x),x,-500,-300)=-412.7507
solve(f(x),x,100,200)=148.9107
or using roots()
roots(f(_x),_x,-400)=-412.7507
roots(f(_x),_x,150)=148.9107

Regards,
Radovan

Edited by user 18 June 2011 17:47:58(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Abhi  
#3 Posted : 19 June 2011 17:02:07(UTC)
Abhi

Rank: Newbie

Groups: Registered
Joined: 18/06/2011(UTC)
Posts: 4
Location: Bombay

OK, got it.

Thanks
Users browsing this topic
Guest
Similar Topics
Problem with solver functions (Questions)
by oscampo 18/09/2023 17:31:30(UTC)
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.