Silly question about solver
10-02-2014, 08:43 AM
Post: #1
 mop80087 Junior Member Posts: 24 Joined: Mar 2014
Silly question about solver
Hi,

I have a silly question, sorry...

why when I put in "cas nspire": solver(x^2-2^x=0, x)
i get results x=-0,766... or x=2 or x=4

but in my HP Prime when i put: solver(x^2-2^x=0, x)
i have only one result x=2

Why?

or is there another way to get all the possible results of an equation?

Cumprimentos/Sincères salutations/Cordiali saluti/
Best regards/Mit freundlichen Grüßen/Saludos
Diamantino Valente
Portugal
10-02-2014, 01:36 PM (This post was last modified: 10-02-2014 01:38 PM by Tim Wessman.)
Post: #2
 Tim Wessman Senior Member Posts: 2,110 Joined: Dec 2013
RE: Silly question about solver
The CAS in Prime does not automatically switch to approximate mode (like the Nspire) when it cannot perfectly resolve a solution exactly in a symbolic way. This simple equation actually requires a rather advanced function to represent the result symbolically and this is not yet supported in the CAS on Prime or in the Nspire which is why neither can symbolically solve for all roots.

simply add a "f" to the front to use the "fsolve" command instead. (Stands for "floating point solve")

fsolve(x^2-2^x=0)

TW

Although I work for the HP calculator group, the views and opinions I post here are my own.
10-02-2014, 02:28 PM
Post: #3
 mop80087 Junior Member Posts: 24 Joined: Mar 2014
RE: Silly question about solver
Tim, thanks for the reply...
But, if I'm not mistaken, with fsolver is necessary to place minimum and maximum. Is not so practical but ok...
10-02-2014, 03:11 PM
Post: #4
 Helge Gabert Senior Member Posts: 460 Joined: Dec 2013
RE: Silly question about solver
No, you don't need to.

fsolve(x^2-2^x, x) returns [-.766... 2. 4.].
10-05-2014, 04:28 PM
Post: #5
 Eddie W. Shore Senior Member Posts: 978 Joined: Dec 2013
RE: Silly question about solver
Make sure that you are in Radians mode when using fsolve. I get blanks when using fsolve in Degrees mode.
10-06-2014, 09:39 AM
Post: #6
 mop80087 Junior Member Posts: 24 Joined: Mar 2014
RE: Silly question about solver
Thanks Eddie,

You are right Helge...

Why complicate what is easy? that´s my opinion
 « Next Oldest | Next Newest »

User(s) browsing this thread: 1 Guest(s)