Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

HP 50g fails simple SOLVE. Comparing to TI-89, which succeeds

453 views
Skip to first unread message

JBGM

unread,
Feb 11, 2007, 3:33:10 PM2/11/07
to
Hello everyone. I have a very simple problem in which the HP 50g fails
miserably, and the TI-89 solves only by half. I cannot get the
solution to a simple equation in the HP50g:
SOLVE('LN(X)+SIN(X)+X^2=0', 'X') I receive the error: "SOLVE Error:
Not reducible to a rational expression" I have changed the
configuration parameters in MODE > CAS without success.

Is there any configuration setting or parameter I am missing? Should I
use another function? SOLVE works fine with a trivial equation; when I
enter SOLVE(' X^2-4*X+8=0', 'X'), it returns {X=2-2*I, X=2+2*i}, which
is correct.

The TI-89 finds half the answer to the initial problem using the
complex solver command "cSolve(LN(X)+SIN(X)-X^2=0, X)" The TI-89
returns 0.490672, which is the real root. TI's real solver "solve"
finds the real root too. But the TI-89 fails to return the complex
root 0.8775 + 0.2558i

The tests were done with PC emulators for HP 50g and TI-89. Could
someone help, please? I would expect the HP 50g to actually find the
complex root, or at the very least the real root, since there is
consensus in the scientific community that HP 50g is superior to the
TI-89 for advanced math. Or is the TI-89 superior? I am trying to
decide which one is better for advanced math in order to purchase it.

Before someone answers that I should use Maple or Mathematica (how do
you think I obtained the complex root?), here goes the explanation:
I'm a professional mathematician who wants to use a CAS in a handheld
device for a research project. I have to do massive symbolic
computations while I move across large library's shelves, so carrying
a laptop is simply annoying.

Steen Schmidt

unread,
Feb 11, 2007, 4:45:36 PM2/11/07
to
JBGM wrote:

> Hello everyone. I have a very simple problem in which the HP 50g fails
> miserably, and the TI-89 solves only by half. I cannot get the
> solution to a simple equation in the HP50g:
> SOLVE('LN(X)+SIN(X)+X^2=0', 'X') I receive the error: "SOLVE Error:
> Not reducible to a rational expression" I have changed the
> configuration parameters in MODE > CAS without success.

The SOLVE command on the HP can really only find rational roots unless
the solution variable is easily isolated. The same is the case on the
TI if you want exact answers. When the TI fails to find an exact root,
it tries a numeric approach. On the HP you get an error box instead,
and you'll manually have to try the numeric approach (the ROOT command
on the HP).

Finding the real root 0.490672... takes 14.9 seconds on the TI, while
ROOT does it in 1.1 seconds on the HP. Both only return one root
without an estimate on how many other potential roots exist. I think
the HP is better in this case (same features but faster performance).

> The TI-89 finds half the answer to the initial problem using the
> complex solver command "cSolve(LN(X)+SIN(X)-X^2=0, X)" The TI-89
> returns 0.490672, which is the real root. TI's real solver "solve"
> finds the real root too. But the TI-89 fails to return the complex
> root 0.8775 + 0.2558i

Warning: you are operating with different signs on your 'X^2' term - I
assume you in the latter case mean negative 'X^2', or else your complex
root is wrong. What you need on the HP is the great program SolveSys -
you can find it on hpcalc.org.

Now do X=A+B*i SUBST, copy the expression and do RE on one copy and IM
on the other, plug the two expressions into SolveSys and solve. Presto,
it spits out A=0.877484... and B=0.255824...

It seems complicated but it took me less than 30 seconds. I do not know
how to accomplish the same on my TI89. As with all numerical root
finding the real challenge is to know when you have found all roots and
then finally remove any false roots (the latter is usually easily done
by trial insertion of course).

Cheers,
Steen

Virgil

unread,
Feb 11, 2007, 4:47:19 PM2/11/07
to
In article <1171225989.9...@l53g2000cwa.googlegroups.com>,
"JBGM" <Litera...@gmail.com> wrote:

In the HP48/48/50 series, the ROOT command finds the approximate real
root, as does the numerical solver (accessed by left shift 7 on the 49
and 50) and find the correct real root to 12 significant digits.

If you use the SOLVESYS library, available at http://www.hpcalc.org/,
different versions for the 48 versus the 49/50 series, you can
approximate several complex solutions as well as the real solution by
starting with complex guesses.

One such complex solution is about -1.39010-i*0.98289

Are you sure that X = 0.8775 + 0.2558i is a root?
On my HP49, 'LN(X)+SIN(X)+X^2' evaluates to 1.40912+0.89784*i for that
value of X.

Veli-Pekka Nousiainen

unread,
Feb 11, 2007, 4:57:19 PM2/11/07
to
Have you tried the numerical solvers like ROOT ?
It returns the real root

"JBGM" <Litera...@gmail.com> wrote in message
news:1171225989.9...@l53g2000cwa.googlegroups.com...

Matteo

unread,
Feb 11, 2007, 5:03:04 PM2/11/07
to

JBGM ha scritto:


Hp49g+ (50G) can solve this equation numerically. it is obviusly that
it can. :-)
you must use the command 'root' in this way:
in user rpl mode

3: 'ln(x)+sin(x)+x^2=0' the equation
2: 'x' the indipendent variable
1: 2. the initial value of the
variable
---> root

and you have the solution.
if you want complex solutions you must put a complex initial value for
x. With this command (root) you find only one solution....

About calculator cas : I haven't a TI89, but I think that both ti89
and hp49(50) are the most powerful calc with cas in the world. I like
a lot the hp cas because every day I discover new features like
particular systems flags for solve exact and simbolic big linear
sistems 70*70 :) :) :), ecc....and hp has a so powerful programming
language that the only thing that you can do i to have dreams...

Matteo

unread,
Feb 11, 2007, 5:03:21 PM2/11/07
to

JBGM ha scritto:

Veli-Pekka Nousiainen

unread,
Feb 11, 2007, 5:19:10 PM2/11/07
to
"Veli-Pekka Nousiainen" <DROP...@dlc.fi> wrote in message
news:UiMzh.10681$yD4....@reader1.news.saunalahti.fi...

I tried with checking that REALASSUME list had X and Y defined
and that the last flag in the Flag Browser said the Complex Vars are allowed
Then I tried:
3: ['LN(Z)+SIN(Z)+Z^2']
2: ['Z']
1: [(-1.,-1)]
MSLV
and I got (using FIX 2 setting to ease up the writing here)
1: [(-1.39,-0.98)]

What do you say to that folks?

gei2...@gmail.com

unread,
Feb 11, 2007, 5:31:58 PM2/11/07
to

Or you can use the solve equation screen. Use NUM.SLV (right shift 7),
menu 1, enter into equation 'ln(x)+sin(x)+x^2=0', move cursor to x and
hit solve.

JBGM

unread,
Feb 11, 2007, 5:40:38 PM2/11/07
to
Thank you all for you answers. I confirmed that in deed HP 50g is a
better option than TI-89 for my needs.

Matteo

unread,
Feb 11, 2007, 5:48:34 PM2/11/07
to
Yes. I'm wrong about complex solutions with "root". This command can
find only real solutions. pardon :-)
Without external libraries like the powerful solvesys, the Veli
Pekka's method is perfect. and also in this case the solution to the
problem is around a flag. fine, very fine!


Helen

unread,
Feb 11, 2007, 7:41:34 PM2/11/07
to
On Feb 11, 2:33 pm, "JBGM" <Literatron...@gmail.com> wrote:
> Before someone answers that I should use Maple or Mathematica (how do
> you think I obtained the complex root?), here goes the explanation:
> I'm a professional mathematician who wants to use a CAS in a handheld
> device for a research project. I have to do massive symbolic
> computations

What do you mean by "massive symbolic computations"?
You cannot do massive symbolic computations on a dinky little
calculator.
Besides, the example you give is hardly an example for a "massive
symbolic computation"...

> while I move across large library's shelves, so carrying
> a laptop is simply annoying.

I am sorry, but I have to ask: Do you have to do these calculations
while hanging upside down from those shelves? If so, then I can
understand your request, but I find your line of work, interesting, to
say the least. If not, then I have trouble understanding your
requirements. If you really are a mathematician, and if you really
need to do "massive symbolic calculations", then a calcultaor is not
the right tool. As a mathematician, you should also be more concerned
about using a tool that can do the job you need, than with the
"annoyance" of having to carry a 3-pound laptop, in my humble
opinion...

Virgil

unread,
Feb 11, 2007, 8:06:51 PM2/11/07
to
In article <oDMzh.10692$lM4...@reader1.news.saunalahti.fi>,
"Veli-Pekka Nousiainen" <DROP...@dlc.fi> wrote:

I wasn't even aware of MSLV. Thanks.

JBGM

unread,
Feb 12, 2007, 9:53:09 AM2/12/07
to
Helen, if you MUST know 8-) here is more information:

> What do you mean by "massive symbolic computations"?
> You cannot do massive symbolic computations on a dinky little
> calculator.

'Massive' is manipulation of large polynomials (multiplication,
integration, division) to find irreducible representations. Yes, it
can be done in a handheld. Yes, it is quicker in a full-size computer.

> Besides, the example you give is hardly an example for a "massive
> symbolic computation"...

But just an example of the device's mathematical capability.

> I am sorry, but I have to ask: Do you have to do these calculations
> while hanging upside down from those shelves? If so, then I can
> understand your request, but I find your line of work, interesting, to
> say the least. If not, then I have trouble understanding your
> requirements. If you really are a mathematician, and if you really
> need to do "massive symbolic calculations", then a calcultaor is not
> the right tool. As a mathematician, you should also be more concerned
> about using a tool that can do the job you need, than with the
> "annoyance" of having to carry a 3-pound laptop, in my humble
> opinion...

I'm comparing a new method to do something (sorry... confidential
information) with existing literature. I have about 300 books in my
list for which there is no digital version. I could: (i) checkout
books by the dozen and carry them in a cart to my office, or (ii) I
could find the two pages am interested of each book without leaving
the shelves and do the test I'm interested in. I will save many hours
by doing the test on the spot. That's all the info I'm giving. The
world is fairly rich and complex, so be less surprised when you do not
understand causes and reasons; you might be missing the rest of the
iceberg ;-)

The algorithm is simple: if (estimated hours saved * personal labor
hour cost per hour) - (cost of calculator + time invested in training
* personal labor hour cost per hour) > 0 then go calculator. So far, I
go calculator. BTW TI-89 seems to have superior symbolic manipulation
capabilities FOR MY PURPOSE. Look at http://technicalc.org/tifaq/?tivshp.htm.
HP 50g seems fairly superior in numerics.

John H Meyers

unread,
Feb 12, 2007, 1:24:02 PM2/12/07
to
On Sun, 11 Feb 2007 14:33:10 -0600, JBGM wrote:

> I have a very simple problem in which the HP 50g fails miserably

User error :)

> Should I use another function?

Getting warmer :)

> SOLVE('LN(X)+SIN(X)+X^2=0', 'X')

> Solve(LN(X)+SIN(X)-X^2=0, X) [different EQ on TI]

['LN(X)+SIN(X)+X^2=0']
['X']
[(0,0)]
MSLV ==> [ (.490672430034,0.) ]

['LN(X)+SIN(X)-X^2=0']
['X']
[(0,0)]
MSLV ==> [ (.877484133454,-.255824885891) ]

Better or different initial guesses
will yield faster or additional roots.

[r->] [OFF]

Marcin Witek

unread,
Feb 12, 2007, 2:21:23 PM2/12/07
to
Steen Schmidt wrote:
> Finding the real root 0.490672... takes 14.9 seconds on the TI, while
> ROOT does it in 1.1 seconds on the HP. Both only return one root
> without an estimate on how many other potential roots exist. I think
> the HP is better in this case (same features but faster performance).

What guess value for ROOT are you using on HP?

Wit

Steen Schmidt

unread,
Feb 12, 2007, 4:21:13 PM2/12/07
to
Marcin Witek wrote:

> What guess value for ROOT are you using on HP?

Zero.

Regards
Steen

Marcin Witek

unread,
Feb 12, 2007, 5:16:43 PM2/12/07
to
Steen Schmidt wrote:
>> What guess value for ROOT are you using on HP?
> Zero.

With guess value of 0 my TI-89 Titanium computes this in about 9 seconds,
but with guess value of 1 it does it in just 2 seconds.

Wit

Virgil

unread,
Feb 12, 2007, 6:18:03 PM2/12/07
to
In article <74ddk2t6...@wit.ummagumma>,
Marcin Witek <NOwi...@malenstwo.iinf.polsl.gliwice.pl> wrote:

On my HP49+, the ROOT command finds the real root of the equation in
under 1 second from either guess.

But MSLV won't work with a guess of 0 because LN(X) is not defined there.

John H Meyers

unread,
Feb 12, 2007, 6:51:51 PM2/12/07
to
On Mon, 12 Feb 2007 17:18:03 -0600:

> MSLV won't work with a guess of 0 because LN(X) is not defined there.

Didn't my examples work with one starting guess of [(0,0)] ?

In the real-valued numeric solver,
a single guess of 0 is actually equivalent
to the pair of guesses { 0 1 }
and single non-zero guesses are adjusted
by a very small amount to create a second starting guess.

I don't know anything more about how MSLV works,
but it did produce both real and complex answers
for the original examples, starting from [(0,0)],
although that may not have been the best place to start :)

[r->] [OFF]

Helen

unread,
Feb 12, 2007, 9:20:18 PM2/12/07
to
On Feb 12, 8:53 am, "JBGM" <Literatron...@gmail.com> wrote:
> > Besides, the example you give is hardly an example for a "massive
> > symbolic computation"...
>
> But just an example of the device's mathematical capability.

The example you gave has next to nothing at all to do with symbolics.
Somewhat unexpected if what you are interested in is symbolics.

> The world is fairly rich and complex, so be less surprised when you do not
> understand causes and reasons; you might be missing the rest of the
> iceberg ;-)

I won't comment. How you want to do your work is really none of my
business.
You may disregard my idle comment on this.

> The algorithm is simple: if (estimated hours saved * personal labor
> hour cost per hour) - (cost of calculator + time invested in training
> * personal labor hour cost per hour) > 0 then go calculator. So far, I
> go calculator.

Maybe your algorithm is a bit too simple...

> BTW TI-89 seems to have superior symbolic manipulation

> capabilities FOR MY PURPOSE. Look athttp://technicalc.org/tifaq/?tivshp.htm.


> HP 50g seems fairly superior in numerics.

I am familiar with the differences. I agree that everything depends on
your specific purpose. There are cases where the TI may be the better
choice, for others the HP is better. Since you can try the caluclators
via their emulators, you can find out yourself, and answer your own
question much more reliable than any comparison on some website could.

Good luck with your work!


reth

unread,
Feb 13, 2007, 4:17:15 AM2/13/07
to

Are you married, Helen? I bet you're not and never will be. :)
reth

Veli-Pekka Nousiainen

unread,
Feb 13, 2007, 5:16:57 AM2/13/07
to
"reth" <re...@abv.bg> wrote in message
news:1171358234....@h3g2000cwc.googlegroups.com...

> On Feb 13, 1:20 pm, "Helen" <GHMohia...@yahoo.com> wrote:
>> On Feb 12, 8:53 am, "JBGM" <Literatron...@gmail.com> wrote:
X

> Are you married, Helen? I bet you're not and never will be. :)
> reth

Unless, Reth, you are talking to a male troll,
who has plagued this newsgroup many years...


John H Meyers

unread,
Feb 13, 2007, 5:50:33 AM2/13/07
to
"With malice toward none, with charity for all..."

What a nice bunch of folks!

-[ ]-

Steen Schmidt

unread,
Feb 13, 2007, 6:15:41 AM2/13/07
to
Marcin Witek wrote:

Then you're using nSolve() and not Solve().

Regards
Steen

Marcin Witek

unread,
Feb 13, 2007, 5:16:13 PM2/13/07
to
Steen Schmidt wrote:
>> With guess value of 0 my TI-89 Titanium computes this in about 9
>> seconds, but with guess value of 1 it does it in just 2 seconds.
> Then you're using nSolve() and not Solve().

Hmm... With nsolve my results are about 6 seconds for guess value 0 and
about 1~2 seconds for guess value of 1...

Wit

Steen Schmidt

unread,
Feb 14, 2007, 10:12:41 AM2/14/07
to
Marcin Witek wrote:

Solve() do not provide a way to supply a starting guess, so you're
using nSolve() for your timings. Since you didn't know that, I guess
you were using the Numeric Solver app, which internally uses nSolve().
It's important to state how you solve a problem if we are to be able to
compare execution times.

Regards
Steen

Steen Schmidt

unread,
Feb 14, 2007, 10:14:05 AM2/14/07
to
reth wrote:

> Are you married, Helen? I bet you're not and never will be. :)
> reth

What in Helens post warranted such a remark? Who is the troll here...

Cheers,
Steen

Wes

unread,
Feb 14, 2007, 1:01:45 PM2/14/07
to
In all fairness, the 89 can also numerically search for complex roots.

cZeros(ln(x)+sin(x)+x^2,x=-1-i)


-wes

Marcin Witek

unread,
Feb 14, 2007, 4:54:07 PM2/14/07
to
Steen Schmidt wrote:
> Solve() do not provide a way to supply a starting guess, so you're
> using nSolve() for your timings.

You are not right. It's as easy as:

solve(ln(x)+sin(x)+x^2=0, x=0)

or

solve(ln(x)+sin(x)+x^2=0, x=1)

You may try it on your own.

> Since you didn't know that

I really know what am i doing.

Wit

Steen Schmidt

unread,
Feb 15, 2007, 6:57:23 AM2/15/07
to
Marcin Witek wrote:

Sorry, it's me who isn't clear enough; when you supply a guess to
Solve(), you jump straight ahead and use the numeric solver. So when
supplying a guess you might as well just use nSolve() from the start.

Cheers,
Steen

Marcin Witek

unread,
Feb 15, 2007, 1:55:31 PM2/15/07
to
Steen Schmidt wrote:
> Sorry, it's me who isn't clear enough; when you supply a guess to
> Solve(), you jump straight ahead and use the numeric solver. So when
> supplying a guess you might as well just use nSolve() from the start.

OK, it seems possible. But why there is difference in execution time
between solve and nsolve? I have checked this couple of times, and always
get the same results: about 9 seconds for solve and 6 seconds for
nsolve...

I am doing something like this:

Input: startTmr()->t:solve(ln(x)+sin(x)+x^2=0, x=0): checkTmr(t)
Output: 9

Input: startTmr()->t:nsolve(ln(x)+sin(x)+x^2=0, x=0): checkTmr(t)
Output: 6

3 seconds spent in parsing? ;)

Wit

0 new messages