(11C) CUBIC EQUATION
|
06-09-2018, 11:49 AM
(This post was last modified: 06-11-2018 08:32 AM by Gamo.)
Post: #1
|
|||
|
|||
(11C) CUBIC EQUATION
This program finds the roots of cubic equation of the form
f(x) = X^3 + aX^2 + bX + c where a, b and c are real. It does so by extracting the first root, performing synthetic division, and solving the resulting quadratic equation. (This program was from HP-19C/HP-29C Applications Book, P.6 and here is the modified version for HP-11C) Program: CUBIC EQUATION Code:
Usage: c [ENTER] b [ENTER] a [A] ---> 0 [B] ---> 1st Root [R/S] ---> Discriminant // If D≥0 continue [R/S] [R/S] If D˂0 continue to [C] [R/S] ---> 2nd Root [R/S] ---> 3nd Root [C] ---> Complex Roots // [X<>Y] (u in Y) and (v in X) Put to USER MODE --> f USER Example: X^3 - 6X^2 + 11X - 6 = 0 6 [CHS] [ENTER] 11 [ENTER] 6 [CHS] [A] 0 [B] 3 // 1st root [R/S] 0.25 // D is greater than or equal zero go ahead with R/S [R/S] 2 // 2nd root [R/S] 1 // 3th root Answer of 3 roots are 3, 2 and 1 ---------------------------------------------------------------------------------------- Example: X^3 - 4X^2 + 8X - 8 = 0 8 [CHS] [ENTER] 8 [ENTER] 4 [CHS] [A] 0 [B] 2 // 1st root [R/S] -3 // D is less than zero then use LBL C for complex roots [C] 1.73 [X<>Y] 1 // 1.73 (Imaginary Part) and 1 (Real Part) Real answer is 2 Complex answer is 1 ±1.73i ----------------------------------------------------------------------------------------- Gamo |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)