(11C) CUBIC EQUATION

06102018, 07:15 AM
(This post was last modified: 06102018 09:54 AM by Dieter.)
Post: #10




RE: (11C) CUBIC EQUATION
(06092018 10:34 PM)Valentin Albillo Wrote: Most probably some sort of discriminant, either of the original cubic, some reduced cubic (if that's how he's computing the root, I didn't read the code) or of the quadratic after deflation. If it is >=0 the remaining two roots are real, else they are complex. So it can't be the discriminant of the original cubic equation (here D<0 means three real roots). But it looks like it's indeed some discriminant of a reduced quadratic. (06102018 02:42 AM)Gamo Wrote: Updated the instruction and usage. We're not finished yet. ;) The instructions say "[C] > Complex Roots // [X<>Y] (u in Y) and (v in X) " What is u, what is v? I guess these are the real and imaginary parts of the solution. But which is which? Gamo, nobody can know what you mean by "u" or "v". It is not even clear if after the [R/S] the real or imaginary part is displayed ! So it should better read: [C] > Complex Roots The imaginary part of the two complex conjugate roots is displayed. Press [X<>Y] to see the real part. Or vice versa – don't know which is which. ;) But now for the most important part: I still think the program is not correct ! After LBL 1 the content of R4 is added in the calculation. But R4 has no defined value at this point. There is nothing that has been stored there before. Gamo, please check the program again. Take a look at the original listing in the 29C Applications Book. The program does not work for me. The results of your examples only appear if I store –7 in R4 (first example) or –8 (second example). There must be some code missing. Maybe you can show the original 29C program? Try it yourself: clear the program in your 11C and reenter it using the listing you posted here. Then try the examples. By the way, you may adjust the program so that it automatically continues with C if the discriminant is < 0. I understand the code correctly it could be done this way: Code: ... The added modification at LBL C would show the imaginary part (PAUSE) and then the real part of the complex solution. Now both the three real solutions as well as the real + complex ones are displayed without the user having to press additional keys. So the R/S that follows LBL 1 (which shows the discriminant) can/should be removed. Simply press [B] to get the first root, then once or twice [R/S] for the others. The user directly realizes whether it's two real or one conjugate complex solution because the latter is displayed with a PSE instruction. Or simply try the direct solution program I suggested. This runs in a few seconds. ;) Dieter 

« Next Oldest  Next Newest »

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