The Museum of HP Calculators

HP Forum Archive 19

[ Return to Index | Top of Index ]

hp48, factorization
Message #1 Posted by Sok-khieng Chum Hun on 1 Mar 2010, 9:51 p.m.

Hi, I am studying electronic engineering and I would like to know why my hp 48gx cannot factorize this transfer function :

10^4*s^2/(s^4 + 100*sqrt(2)*s^3 + 2.01*10^4*s^2 + 10^8*sqrt(2)*s + 10^12)

I use both alg48 and erable and I don't know why it can't factorize

(sorry for my bad english :()

Thank you :)

      
Re: hp48, factorization
Message #2 Posted by hugh steers on 2 Mar 2010, 2:36 p.m.,
in response to message #1 by Sok-khieng Chum Hun

what should the answer be?

            
Re: hp48, factorization
Message #3 Posted by Rainer Wiedemann (Germany) on 2 Mar 2010, 2:49 p.m.,
in response to message #2 by hugh steers

According to Wolfram alpha, the denominator's roots are

s ~ -739.788 - 672.84i, s ~ -739.788 + 672.84i, s ~ 669.077 - 743.193i, s ~ 669.077 + 743.193i,

Maxima didn't factor/gfactor the polynomial, too, but its solve function found the roots. Unfortunately the exact result is too long to post here. Not one of the roots would fit inside a hp48 lcd.

Has anyone an hp50g at hands to countercheck this, too?

Edited: 2 Mar 2010, 3:14 p.m.

            
Re: hp48, factorization
Message #4 Posted by Sok-khieng Chum Hun on 2 Mar 2010, 4:01 p.m.,
in response to message #2 by hugh steers

Hi, when i factorize it with matlab, it returns :

10^4*s^2/((s^2 + 1480*s + 1e006) (s^2 - 1338*s + 1e006))

Thank you :)

                  
Re: hp48, factorization
Message #5 Posted by Rainer Wiedemann (Germany) on 2 Mar 2010, 5:19 p.m.,
in response to message #4 by Sok-khieng Chum Hun

Multiplying the factors from your solution shows, that Matlab did not yield an exact solution, but an approximation:

(s^2 + 1480*s + 1e006)(s^2 - 1338*s + 1e006) = s^4+142*s^3+19760*s^2+142000000*s+1000000000000 != s^4 + 100*sqrt(2)*s^3 + 2.01*10^4*s^2 + 10^8*sqrt(2)*s + 10^12 

                        
Re: hp48, factorization
Message #6 Posted by Sok-khieng Chum Hun on 2 Mar 2010, 6:31 p.m.,
in response to message #5 by Rainer Wiedemann (Germany)

Hi, than I must conclude that alg48 or erable are not able to factorize because they both only factorize exact solution?

I didn't take the time to ask myself whether the zpk function in matlab gives the exact solution or an approximation O_o.

Thank you, I very appreciate your help :)

                              
Re: hp48, factorization
Message #7 Posted by Rainer Wiedemann (Germany) on 2 Mar 2010, 7:05 p.m.,
in response to message #6 by Sok-khieng Chum Hun

No, I don't think so. It should at least have found a numerical solution.

I just dug out my hp50g and I also found batteries for it. So I tried your polynomial. The 50g does factoring much similar to your Matlab solution, it yields a numerical solution.

It finds:

(s^2 + 1473.5755*s + 1000000) * (s^2 - 1338.1541*s + 1000000)

I couldn't get it to perform further factoring, i. e. have it find the complex roots. That seems strange to me.

OK, I'm not an experienced hp50g user, coz I prefer my old 41, and do higher complexity stuff on a pc.

So I suppose it might be a RAM issue, AFAIK the 48gx has 128k, the 50g some more.

Probably Raymond reads this thread, he's a 48g(x) expert and he could know more about CAS and its limitations.

Edited: 2 Mar 2010, 7:53 p.m.

                                    
Re: hp48, factorization
Message #8 Posted by Marcus von Cube, Germany on 3 Mar 2010, 9:34 a.m.,
in response to message #7 by Rainer Wiedemann (Germany)

Derive isn't bad at it. For the denominator it returns

(s^2 + s·(10·sqrt(19849) + 50·sqrt(2)) + 1000000)·(s^2 + s·(50·sqrt(2) - 10·sqrt(19849)) + 1000000)

I pasted and entered the complete equation and used the menu to factor it.

                                          
Re: hp48, factorization
Message #9 Posted by Rainer Wiedemann (Germany) on 3 Mar 2010, 4:15 p.m.,
in response to message #8 by Marcus von Cube, Germany

Is Derive still maintained or (at least) available? I remember the early 80s, where it was en vogue due to its efficient implementation and low hardware requirements.

For the sake of completeness (and for trying out my brand new guest file account :-)) I'm posting the exact roots calculated by wxMaxima:

I still can't get my hp50g find these as a final result, but it works for 4th order equations with smaller coefficients ?!? What am I doing wrong??

Is Derive able to find these? If so, does it do by factoring commands, or do you have to solve for the zeroes of the original denominator polynomial (as wxMaxima does)?

Edit: %i = sqrt(-1) in Maxima notation

Edited: 3 Mar 2010, 4:19 p.m.

                                                
Re: hp48, factorization
Message #10 Posted by Marcus von Cube, Germany on 4 Mar 2010, 12:01 p.m.,
in response to message #9 by Rainer Wiedemann (Germany)

I think, Derive has been replaced by the Nspire PC software. It can't be ordered directly from TI.

Derive finds 4 solutions for denominator = 0:

I didn't double check my input.

Edited: 4 Mar 2010, 12:04 p.m.

      
Re: hp48, factorization
Message #11 Posted by Steve Keeley on 3 Mar 2010, 10:47 p.m.,
in response to message #1 by Sok-khieng Chum Hun

Try this on your 48:

Hit right shift - solve
choose "Solve poly..." enter the coefficients: 1, 141.4214, 2.01*10^4, 1.414214*10^8, 10^12
Then hit "solve"

You'll get an array containing the following:
(-739.7877, -672.8403)
(-739.7877, 672.8403)
(669.0770, 743.1930)
(669.0770, -743.1930)

            
Re: hp48, factorization
Message #12 Posted by Bart (UK) on 4 Mar 2010, 5:40 a.m.,
in response to message #11 by Steve Keeley

That's the denominator (as solved by several people from message 3 onwards), how would you include the numerator?

Also, as per the original request, how does one factorise it?

Edited: 4 Mar 2010, 5:55 a.m.

                  
Re: hp48, factorization
Message #13 Posted by Steve Keeley on 4 Mar 2010, 2:32 p.m.,
in response to message #12 by Bart (UK)

"Also, as per the original request, how does one factorise it?"

On an out-of-the-box 48, you don't factorise it in one step. You'd have to write or find a program for it.

With a 50g the FACTOR function would give 10000*s*s/(s^2-1338.15*s+1000000)*(s^2+1479.58*s+1000000). Rainer and Sok-khieng Chum Hun found the same denominator; the numerator doesn't factor further.

In order to factor the denominator all the way to the complex roots you need to use the Poynomial solve the same as on the 48.

Once you have the complex roots on the 48, you can get the quadratic forms by subtracting each pair of roots from s, multiplying them, and executing EXPAND and COLLECT.

Edited: 4 Mar 2010, 8:20 p.m.

      
Re: hp48, factorization
Message #14 Posted by Hal Bitton in Boise on 4 Mar 2010, 1:46 a.m.,
in response to message #1 by Sok-khieng Chum Hun

I got the same results for the denominator as Rainer did on both my 48G and 50G (with the 50G in approx mode). On the 48G I used the polynomial solver app...I did have to do a bit of juggling to get the coefficients into the solver in numerical form as follows: I put each coefficient onto the stack starting with the high order in level 5, and ending with the constant in level 1, making sure not to enter them as algebraic objects ('') so they would evaluate to real (approx) numbers. Then I entered 5 and executed ->ARRY, and ended up with the coefficient array in level 1. Then go to the solve poly app, and with the coefficient field selected, hit NEXT, and the CALC (softkey)...the array is waiting in level 1, so just hit OK to put the coefficients into the solver app. Then solve for the roots as normal. Hit SYMB softkey and return to the stack to see the roots in factor form. Works like a champ. I don't know why the 50G wouldn't factor it symbolically.
If it's any consolation, I tried symbolically factoring this on my Ti89 emulator, and it locked up..;0
Best regards, Hal

            
Re: hp48, factorization
Message #15 Posted by Rainer Wiedemann (Germany) on 4 Mar 2010, 6:14 p.m.,
in response to message #14 by Hal Bitton in Boise

So now I learned: in order to get the complex roots I must use the "solve poly" function. Factorization seems to be restricted to real results.

Meanwhile I tried Steve's and your procedures on both my hp50g and on m48, an hp48 emulator on iphone, and bingo - I got the expected results.

Like you Hal, I don't know, why the 50g is not able to factorize symbolically. At least this thread has worked up my appetite for taking a closer look at the hp50g. If only the keyboard wouldn't be that (over)crowded, that's why I preferred using a pc for symbolic math and a hp41 as a calculator up to now. IMHO hp should have considered a double keyboard design for the hp50g as implemented in the hp28C/S. I guess that would have improved acceptance of this machine also among old-school calculator users like me.

                  
Re: hp48, factorization
Message #16 Posted by Hal Bitton in Boise on 5 Mar 2010, 5:34 a.m.,
in response to message #15 by Rainer Wiedemann (Germany)

Quote:
So now I learned: in order to get the complex roots I must use the "solve poly" function. Factorization seems to be restricted to real results.
Actually, I tried this again with my real 50G (I was using my emulator before), and this time when using the factor command, the calculator asked me if I wanted to switch to approx mode, to which I responded yes. The 50G then factored the denominator with the aforementioned approximate results. It also worked using the symbolic solve function as long as the calc was in approx mode. (In case you may not be aware of it, you can quickly toggle between exact and approx modes by holding down right shift, and pressing ENTER)
Best regards, Hal


[ Return to Index | Top of Index ]

Go back to the main exhibit hall