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

x=x,pred;

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

x=x,pred;

Calculate

pred

1<2;

1<2,pred;

Calculate

pred

Run Example
(%i1)ev( equal(setify([[1]]), setify([[x]]) ), pred );
(%o1)                         equal({[1]}, {[x]})
(%i2) 
Run Example
_entropy(x):=if (x=0) then 0 else x*log(x);
(%o1)            _entropy(x) := if x = 0 then 0 else x log(x)
(%i2) entropy(p,b):=-sum(_entropy(p[i])/log(b), i, 1, length(p));
                                    _entropy(p )
                                              i
(%o2)        entropy(p, b) := - sum(------------, i, 1, length(p))
                                       log(b)
(%i3) entropy2(p):=entropy(p,2);
(%o3)                    entropy2(p) := entropy(p, 2)
(%i4) _total(x):=sum(x[i],i,1,length(x));
(%o4)                _total(x) := sum(x , i, 1, length(x))
                                       i
(%i5) entropyArray(a):=entropy(map(lambda([x], x/_total(a)), a), _total(a));
                                                     x
(%o5) entropyArray(a) := entropy(map(lambda([x], ---------), a), _total(a))
                                                 _total(a)
(%i6) /* traditional 2-based entropy */e:entropy([1/4,1/4,1/2,0], 2);
                                  log(4)    1
(%o6)                            -------- + -
                                 2 log(2)   2
(%i7) /* 1-based */e:entropy([1/4,1/4,1/2,0], 4);
                                  log(2)    1
(%o7)                            -------- + -
                                 2 log(4)   2
(%i8) /* over an array */ea:entropyArray([1,1,2,0]);
                                  log(2)    1
(%o8)                            -------- + -
                                 2 log(4)   2
(%i9) e=ea,pred;
(%o9)                                true
(%i10) float(e);
(%o10)                               0.75
(%i11) 
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 );
               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) /* only result [3] is a solution with a real number - NOT an imaginary */r : result[3];
                                         1
(%o5)                           r = -----------
                                     1/3    1/3
                                    2    %pi
(%i6) /* you are here */A2(r)>
0;
                            4
(%o6)                       -- + 4 %pi = 12 %pi > 0
                             3
                            r
(%i7) A2(r)>
0, pred;
                       4
(%o7)                  -- + 4 %pi = 12 %pi = 12 %pi > 0
                        3
                       r
(%i8) print ( "optimal radius:", ev ( r, numer ), "dm" );
                         1
optimal radius: r = ----------- = 0.54192607013929 dm 
                     1/3    1/3
                    2    %pi
(%o8)                                 dm
(%i9) 

Related Help

Help for Pred