Sponsored links: Algebra eBooks
 

Related

pred

A( r ) := 2 * %pi * r...

r : 2;

A(r);

Calculate

pred

A( r ) := 2 * %pi * r...

r : 2;

res : A(r);

Calculate

pred

1<2;

1<2,pred;

Calculate

pred

A( r ) := 2 * %pi * r...

r : 2;

A(r);

Calculate

pred

A( r ) := 2 * %pi * r...

r : 2;

res : A(r);

Calculate

pred

1<2;

1<2,pred;

Calculate

pred

Run Example
(%i1)? assume_pos_pred;

 -- Option variable: assume_pos_pred
     Default value: `false'

     When `assume_pos_pred' is assigned the name of a function or a
     lambda expression of one argument <x>, that function is called to
     determine whether <x> is considered a parameter for the purpose of
     `assume_pos'.  `assume_pos_pred' is ignored when `assume_pos' is
     `false'.

     The `assume_pos_pred' function is called by `sign' and `asksign'
     with an argument <x> which is either an atom, a subscripted
     variable, or a function call expression.  If the `assume_pos_pred'
     function returns `true', <x> is considered a parameter for the
     purpose of `assume_pos'.

     By default, a parameter is <x> such that `symbolp (<x>)' or
     `subvarp (<x>)'.

     See also `assume' and `assume_pos'.

     Examples:

          (%i1) assume_pos: true$
          (%i2) assume_pos_pred: symbolp$
          (%i3) sign (a);
          (%o3)                          pos
          (%i4) sign (a[1]);
          (%o4)                          pnz
          (%i5) assume_pos_pred: lambda ([x], display (x), true)$
          (%i6) asksign (a);
                                        x = a

          (%o6)                          pos
          (%i7) asksign (a[1]);
                                       x = a
                                            1

          (%o7)                          pos
          (%i8) asksign (foo (a));
                                     x = foo(a)

          (%o8)                          pos
          (%i9) asksign (foo (a) + bar (b));
                                     x = foo(a)

                                     x = bar(b)

          (%o9)                          pos
          (%i10) asksign (log (a));
                                        x = a

          Is  a - 1  positive, negative, or zero?

          p;
          (%o10)                         pos
          (%i11) asksign (a - b);
                                        x = a

                                        x = b

                                        x = a

                                        x = b

          Is  b - a  positive, negative, or zero?

          p;
          (%o11)                         neg


(%o1)                                true
(%i2) 
Run Example
A( r ) := 2 * %pi * r^2 + 2 / r;
                                            2   2
(%o1)                        A(r) := 2 %pi r  + -
                                                r
(%i2) define( A1( r ), diff( A( r ), r ) );
                                                2
(%o2)                        A1(r) := 4 %pi r - --
                                                 2
                                                r
(%i3) define( A2( r ), diff( A1( r ), r ) );
                                       4
(%o3)                         A2(r) := -- + 4 %pi
                                        3
                                       r
(%i4) result : solve( A1( r ) = 0, r );
               sqrt(3) %i - 1        sqrt(3) %i + 1           1
(%o4)     [r = --------------, r = - --------------, r = -----------]
                 4/3    1/3            4/3    1/3         1/3    1/3
                2    %pi              2    %pi           2    %pi
(%i5) atom( result[3] );
(%o5)                                false
(%i6) atom( rhs( result[3] ) );
(%o6)                                false
(%i7) /* only result [3] is a solution with a real number - NOT an imaginary */r_o : rhs( result[3] );
                                       1
(%o7)                             -----------
                                   1/3    1/3
                                  2    %pi
(%i8) atom( r_o );
(%o8)                                false
(%i9) op( r_o );
(%o9)                                  /
(%i10) A2(r_o)>
0, pred;
(%o10)                               true
(%i11) x : rhs( result[3] );
                                       1
(%o11)                            -----------
                                   1/3    1/3
                                  2    %pi
(%i12) res : A2(x);
(%o12)                              12 %pi
(%i13) res, numer;
(%o13)                         37.69911184307752
(%i14) res>
1, pred;
(%o14)                               true
(%i15) 
Run Example
sin(x) + cos(y) + (w+1)^2 + 'diff (sin(w), w);
                                     d                    2
(%o1)              cos(y) + sin(x) + -- (sin(w)) + (w + 1)
                                     dw
(%i2)  ev (%, numer, expand, diff, x=2, y=1);
(%o2)              programmode: false;
 x+y, x: a+y, y: 2;
(%o3)                                false
(%i4)  2*x - 3*y = 3;
(%o4)                              y + a + 2
(%i5)  -3*x + 2*y = -4;
(%o5)                            2 x - 3 y = 3
(%i6)  solve ([%o5, %o6]);
(%o6)                           2 y - 3 x = - 4
(%i7)  %o6, %o8;

solve: variable list is empty, continuing anyway.
(%o7)                                 []
(%i8)  x + 1/x >
 gamma (1/2);
(%o8)             (%i9)  %, numer, x=1/2;
                                   1
(%o9)                          x + - > sqrt(%pi)
                                   x
(%i10) (%i10) (%o10)             %, pred;

Related Help

Help for Pred