Post Reply 
WP 34S Solver
05-26-2015, 07:58 PM (This post was last modified: 05-26-2015 08:01 PM by Dieter.)
Post: #2
RE: WP 34S Solver
(05-26-2015 07:36 PM)AnalogJoe Wrote:  Im doing the following test program, my goal here is to find the roots of the following simple quadratic equation: x^2 + 5x + 1=0

OK. But that's not what you programmed:

(05-26-2015 07:36 PM)AnalogJoe Wrote:  LBL 00
2
y^x
x<>y
5
x
1
+
RTN

There is a "+" missing after the "5 x". This way the function you provide is simply 5x + 1. And an additional x² that is left in Y.

Now guess where 5x + 1 becomes zero. ;-)

(05-26-2015 07:36 PM)AnalogJoe Wrote:  The calculator works a little while and displays: -0.2

Got it now? ;-)
Simply provide the correct function, and you'll get what you want:

Code:
LBL 00

x<>y
5
*
+
1
+
RTN

BTW, do not use y^x as it is quite slow. There is a x² function that is shorter and much faster.

BTW2, "real cowboys" use Horner's method, for instance like this:
Code:
LBL 00
5
+
*
1
+
RTN

Looking at the equation you know that the roots will be negative, so try 0 and –5 as the two initial estimates.

Code:
0  ENTER  -5  SLV 00
=> -0,20871215252208...

-2  ENTER  -10  SLV 00
=> -4,7912878474779...

There you are.

(05-26-2015 07:36 PM)AnalogJoe Wrote:  Now the correct roots are -0.208712152 and -4.791287847

Another way of getting these is the dedicated quadratic solver SLVQ. It can be accessed via the X.FCN menu.

Code:
1 ENTER 5 ENTER 1   SLVQ
=> -4,791287847477920
x<>y
=> -0,2087121525220800

(05-26-2015 07:36 PM)AnalogJoe Wrote:  So the solution is off the correct result. Also no matter what initial values I enter, I cant get the calculator to display something near -4.79 which is the second root.

You'll now know why: there is just one single root at exactly –0,2 for f(x)=5x+1. ;-)

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
WP 34S Solver - AnalogJoe - 05-26-2015, 07:36 PM
RE: WP 34S Solver - Dieter - 05-26-2015 07:58 PM
RE: WP 34S Solver - fhub - 05-26-2015, 08:43 PM
RE: WP 34S Solver - Dieter - 05-26-2015, 08:49 PM
RE: WP 34S Solver - fhub - 05-26-2015, 09:02 PM
RE: WP 34S Solver - AnalogJoe - 05-26-2015, 09:06 PM
RE: WP 34S Solver - Tim Wessman - 05-26-2015, 08:22 PM
RE: WP 34S Solver - AnalogJoe - 05-26-2015, 09:04 PM
RE: WP 34S Solver - Tim Wessman - 05-26-2015, 09:13 PM
RE: WP 34S Solver - AnalogJoe - 05-26-2015, 09:18 PM
RE: WP 34S Solver - emece67 - 05-27-2015, 09:08 AM
RE: WP 34S Solver - Thomas Klemm - 05-26-2015, 09:18 PM
RE: WP 34S Solver - rprosperi - 05-26-2015, 10:51 PM
RE: WP 34S Solver - Marcio - 05-27-2015, 12:17 AM
RE: WP 34S Solver - AnalogJoe - 05-27-2015, 04:26 AM
RE: WP 34S Solver - Marcio - 05-27-2015, 05:16 PM
RE: WP 34S Solver - AnalogJoe - 05-28-2015, 03:44 AM
RE: WP 34S Solver - Marcio - 05-28-2015, 04:03 AM
RE: WP 34S Solver - AnalogJoe - 05-28-2015, 04:19 AM
RE: WP 34S Solver - Marcio - 05-28-2015, 04:27 AM
RE: WP 34S Solver - Pascal - 05-28-2015, 03:52 PM
RE: WP 34S Solver - Marcio - 05-28-2015, 06:07 PM
RE: WP 34S Solver - Dieter - 05-28-2015, 11:58 AM
RE: WP 34S Solver - Marcio - 05-28-2015, 12:45 PM
RE: WP 34S Solver - Paul Dale - 05-27-2015, 09:57 AM



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