From: asparnique on
Hi,

Being relatively new to the HP-50G I am still getting used to its functions,
power, and what appears to be certain limitations.

One problem I seem to have is getting a partial fraction decomposition of a
function with polynomial coefficients that are not integers as such. Sure it
would be nice to always have integer polynomial coefficients so that its all
much simpler, but this is not always the reality, so basically when I try to
use the PARTFRAC operation on the following, there's no problem as such :

f(x) = (x^9 - 2x^6 + 2x^5 - 7x^4 + 13x^3 - 11x^2 + 12x - 4) / (x^7 - 3x^6 +
5x^5 - 7x^4 + 7x^3 - 5x^2 + 3x - 1)

result :

x^2 + 3x + 4 + 1/((x^2 +1)^2) + (x + 1)/(x^2 + 1) + 1/(x - 1) + 1/((x -
1)^3)

However when I do the same for this function :

f(s) = A / ((s^2 + Bs + C)(s^2 + Ds + C)(s^2 + Es + C))

where A = 12093/100000, B=73/200, C=99/200, D=199/200, E=279/200

The result after about 6 minutes is this message "Insufficient Memory" !!
Not much use realy

How to get around this error for instance, is there some general initial
simplification that could be done to assist the calculator to return a valid
result.

Unfortunately the equations such as f(s) are not uncommon and would pop-up
quite often, specifically with real coefficients, so any suggestions, hints
on perhaps breaking down the problem for easier calc by the 50G ??

Many thanks in advance, M


From: John H Meyers on
On 3/28/2010 7:44 AM:

[snipped]

What is your actual and exact input to the calculator?

Try performing CASCFG first.

If you mean B*s and D*s and E*s then type that,
since Bs and Ds and Es are each two-letter variable names,
rather than products of two variables.

I have no trouble applying PARTFRAC to your expression,
either without substituting your numeric fractions for A, B, C, D, E
or even after substituting them. In RPN mode:

CASCFG

'A/((s^2+B*s+C)*(s^2+D*s+C)*(s^2+E*s+C))'
DUP PARTFRAC SWAP

{ 'A=12093/100000' 'B=73/200' 'C=99/200' 'D=199/200' 'E=279/200' }
1. \<< SUBST \>> DOLIST PARTFRAC

Results:

'1/((s*C^2+(s^2*D+(s^2*E+2*s^3))*C+((s^3*E+s^4)*D+(s^4*E+s^5)))
*B+(C^3+(s*D+(s*E+3*s^2))*C^2+((s^2*E+2*s^3)*D+(2*s^3*E+3*s^4))
*C+((s^4*E+s^5)*D+(s^5*E+s^6))))*A'

'(24992200*s+25995919)/74778/(200*s^2+279*s+99)+(1177052000*s-
1166652020)/21199563/(200*s^2+73*s+99)-(160433800*s+79817831)
/411642/(200*s^2+199*s+99)'


[r->] [OFF]
From: asparnique on
Hi,

Just to confirm that, yes I was using some variable constants stored in
memory that I labeled A, B,C,D and E. So I had them used as cooefs in the
function.

Another point though, it appears that after having looked at the memory
usage, and having clared about 10K from IRAM, the PARTFRAC expansion worked
and gave me the result I was after. I am not sure what was the problem, but
it looks like that much IRAM made the difference between a result and an
error. So I guess one has to watch out for memory intensive processes like
this one.

I might ask you to check out the same partfrac expansion if you use up more
than about 244K of IRAM. That'll probably get you the same error I got with
my 50G ... Anyways, its worth still knowing if there is a way to break up
the problem into simpler forms, or just to back-up the IRAM and clear it to
make sure its all available for the calculator when needed.

Thanks,

M

"John H Meyers" <jhmeyers(a)nomail.invalid> wrote in message
news:4BAFC5D8.3040609(a)nomail.invalid...
> On 3/28/2010 7:44 AM:
>
> [snipped]
>
> What is your actual and exact input to the calculator?
>
> Try performing CASCFG first.
>
> If you mean B*s and D*s and E*s then type that,
> since Bs and Ds and Es are each two-letter variable names,
> rather than products of two variables.
>
> I have no trouble applying PARTFRAC to your expression,
> either without substituting your numeric fractions for A, B, C, D, E
> or even after substituting them. In RPN mode:
>
> CASCFG
>
> 'A/((s^2+B*s+C)*(s^2+D*s+C)*(s^2+E*s+C))'
> DUP PARTFRAC SWAP
>
> { 'A=12093/100000' 'B=73/200' 'C=99/200' 'D=199/200' 'E=279/200' }
> 1. \<< SUBST \>> DOLIST PARTFRAC
>
> Results:
>
> '1/((s*C^2+(s^2*D+(s^2*E+2*s^3))*C+((s^3*E+s^4)*D+(s^4*E+s^5)))
> *B+(C^3+(s*D+(s*E+3*s^2))*C^2+((s^2*E+2*s^3)*D+(2*s^3*E+3*s^4))
> *C+((s^4*E+s^5)*D+(s^5*E+s^6))))*A'
>
> '(24992200*s+25995919)/74778/(200*s^2+279*s+99)+(1177052000*s-
> 1166652020)/21199563/(200*s^2+73*s+99)-(160433800*s+79817831)
> /411642/(200*s^2+199*s+99)'
>
>
> [r->] [OFF]


From: John H Meyers on
On 3/28/2010 5:10 PM, asparnique wrote:

> Check out the same partfrac expansion
> if you use up more than about 244K of IRAM.

I think you may have identified the problem :)

But I wonder how you already used up almost all memory,
being so new to the HP50G?

Or are you saying that what you see in File Manager is:

0:IRAM 244K

The above would mean that 244K is free, rather than used,
and I was able to get my results when 205K was free.

In fact, I can still get both results even when only 4K is free,
by performing exactly what I posted last time. (yes, that's 4K !)

Try making sure that you have deleted any variable named 's'
before evaluating your expression involving 's'

[r->] [OFF]
From: radw on
On Mar 28, 7:20 pm, John H Meyers <jhmey...(a)nomail.invalid> wrote:
> On 3/28/2010 5:10 PM, asparnique wrote:
>
> > Check out the same partfrac expansion
> > if you use up more than about 244K of IRAM.
>
> I think you may have identified the problem :)
>
> But I wonder how you already used up almost all memory,
> being so new to the HP50G?
>
> Or are you saying that what you see in File Manager is:
>
> 0:IRAM   244K
>
> The above would mean that 244K is free, rather than used,
> and I was able to get my results when 205K was free.
>
> In fact, I can still get both results even when only 4K is free,
> by performing exactly what I posted last time. (yes, that's 4K !)
>
> Try making sure that you have deleted any variable named 's'
> before evaluating your expression involving 's'
>
> [r->] [OFF]

What would happen if you made 's' the independent variable?

I did and I get the memory error even when all memory is clear.
(IRAM 239KB, ERAM 126dKB, FLASH 875KB and Home 239KB.)

Any thoughts?

Ronald Williams