File r38/log/pf.rlg artifact 93427eddbb part of check-in fe6b5d0560


Tue Apr 15 00:32:59 2008 run on win32
% Tests of the partial fraction module.

% Author: Anthony C. Hearn

off exp;



pf(2/((x+1)^2*(x+2)),x);


    2      - 2       2
{-------,-------,----------}
  x + 2   x + 1          2
                  (x + 1)


pf(x/((x+1)^2*(x+2)^2*(x+3)),x);


     - 3
{-----------,
  4*(x + 3)

   - 1
 -------,
  x + 2

     - 2
 ----------,
         2
  (x + 2)

      7
 -----------,
  4*(x + 1)

      - 1
 ------------}
           2
  2*(x + 1)


pf(x/(x^2-2x-3),x);


      1           3
{-----------,-----------}
  4*(x + 1)   4*(x - 3)


pf((10x^2-11x-6)/(x^3-x^2-2x),x);


    5       2     3
{-------,-------,---}
  x + 1   x - 2   x


pf(x^2/((x+1)*(x^2+1)),x);


    x - 1          1
{------------,-----------}
      2        2*(x + 1)
  2*(x  + 1)


pf((2x^6-11x^5+37x^4-94x^3+212x^2-471x+661)
 /(x^7-5x^6+5x^5-25x^4+115x^3-63x^2+135x-675),x);


     x - 3
{--------------,
   2
  x  + 2*x + 5

       x - 3
 -----------------,
    2           2
  (x  + 2*x + 5)

    1
 -------,
  x - 3

     1
 ----------,
         2
  (x - 3)

     1
 ----------}
         3
  (x - 3)


% A harder example.

pf(((2*w**2+2*h**2*l**2*t**2+2*h**2*l**2*qst**2)*z**2-8*h**2*l**2*qst
     *t*z+2*w**2+2*h**2*l**2*t**2+2*h**2*l**2*qst**2)/((w**2+h**4*l**2)
     *((w**2+l**2*t**4+2*l**2*qst**2*t**2+l**2*qst**4)*z**4+(-8*l**2
     *qst*t**3-8*l**2*qst**3*t)*z**3+(2*w**2+2*l**2*t**4+20*l**2*
     qst**2*t**2+2*l**2*qst**4)*z**2+(-8*l**2*qst*t**3-8*l**2*qst**3
     *t)*z+w**2+l**2*t**4+2*l**2*qst**2*t**2+l**2*qst**4))
   -2*h**2/((w**2+h**4*l**2)*((t**2+qst**2+h**2)*z**2-4*qst*t*z+t**2
      +qst**2+h**2)),z);


          2    2    2                    2  2     2       2
{(2*(((qst  + t )*(z  + 1) - 4*qst*t*z)*h *l  + (z  + 1)*w ))/(((

              4    4    4      2              2    2    2
          (qst  + t )*(z  + 2*z  + 1) - 8*(qst  + t )*(z  + 1)*qst*t*z

                 4       2         2  2   2     4      2       2    4  2    2
           + 2*(z  + 10*z  + 1)*qst *t )*l  + (z  + 2*z  + 1)*w )*(h *l  + w )),

                                   2
                              - 2*h
 ---------------------------------------------------------------}
       2    2    2                      2       2    4  2    2
  ((qst  + t )*(z  + 1) - 4*qst*t*z + (z  + 1)*h )*(h *l  + w )


end;


Time for test: 61 ms, plus GC time: 3 ms


REDUCE Historical
REDUCE Sourceforge Project | Historical SVN Repository | GitHub Mirror | SourceHut Mirror | NotABug Mirror | Chisel Mirror | Chisel RSS ]