[newbie] why does ratsimp not work here?



Following your suggestion I changed the floats by there rational 
equivalents and redid the whole but 
finally I'm left with:

(%i71) result:u[2]/u[1];
                                   s + 1
                                   ----- + s
                                     2
(%o71)                      [--------------------]
                                   1             2
                              (s + -) (s + 1) - s
                                   2
(%i72) ratsimp(result);
(%o72)                                [1]

and I hoped to see:

4s+1
____
2s^2+4s+1

what am I doing wrong?

hugo





On Thu, 29 Oct 2009, Stavros Macrakis wrote:

> I also get those warnings (which you can turn off by setting
> ratprint:false), but I get the result [1] in the end:
> 
> (%i14) [(0.5*(s+1)+s)/((s+0.5)*(s+1)-s^2)];
> (%o14) [(0.5*(s+1)+s)/((s+0.5)*(s+1)-s^2)]
> (%i15) ratsimp(%);
> `rat' replaced 0.5 by 1/2 = 0.5
> 
> `rat' replaced 0.5 by 1/2 = 0.5
> (%o15) [1]
> 
> By the way, Maxima in general works better with exact numbers (1/2)
> rather than floats (0.5).
> 
> ??????????? -s
> 
> On Thu, Oct 29, 2009 at 12:48 PM, Hugo Coolens <coolens at kahosl.be> wrote:
>       u:invert(g).currents;
>       result:u[2]/u[1];
> 
> 
> 
>