Alec Mihailovs

Dr. Aleksandrs Mihailovs

4455 Reputation

21 Badges

20 years, 345 days
Mihailovs, Inc.
Owner, President, and CEO
Tyngsboro, Massachusetts, United States

Social Networks and Content at Maplesoft.com

I received my Ph.D. from the University of Pennsylvania in 1998 and I have been teaching since then at SUNY Oneonta for 1 year, at Shepherd University for 5 years, at Tennessee Tech for 2 years, at Lane College for 1 year, and this year I taught at the University of Massachusetts Lowell. My research interests include Representation Theory and Combinatorics.

MaplePrimes Activity


These are answers submitted by Alec Mihailovs

Here is a slightly different way of doing something different - but rather close,

F:=Matrix(3,symbol=f);

                      [f[1, 1]    f[1, 2]    f[1, 3]]
                      [                             ]
                 F := [f[2, 1]    f[2, 2]    f[2, 3]]
                      [                             ]
                      [f[3, 1]    f[3, 2]    f[3, 3]]

add(i, i in F);

  f[1, 1] + f[2, 1] + f[3, 1] + f[1, 2] + f[2, 2] + f[3, 2] + f[1, 3]

         + f[2, 3] + f[3, 3]

Alec

Not right.

Critical points are not necessarily extremal. It can be a saddle. One of possible ways to find them is to find Gradient(g,[x,y,z]), then find point(s) in which it is 0 (solve a system of equations), then find Hessian of g in these points. If it is positive definite - the point is a local minimum. If it is negative definite - the point is a local maximum. If it has eigenvalues of different signs - the point is of a "saddle" type - i.e. not local minimum and not local maximum. The term "saddle" in this content is not standard (it is standard only for functions of 2 variables.)

For quadratic functions, the situation is more simple - the Hessian is constant. In this example,

VectorCalculus:-Hessian(g,[x,y,z]);

                           [ 6    -1     1]
                           [              ]
                           [-1     2     2]
                           [              ]
                           [ 1     2    -2]

It can be also written by hand as the (multiplied by 2) matrix of the corresponding quadratic form.

Some diagonal elements are positive, and some are negative, so the matrix can not be positive or negative definite. It was also obvious from the very beginning - if some of terms x2, y2, z2 have positive coefficients, and others - negative, the form can not be positive or negative definite which is obvious thinking of the cases in which all variables except one equal 0.

Alec

The real solution is unique,

remove(has,[evalf(allvalues(solve({f,g,h})))],I)[];

         {x = 11.27679579, y = -13.03572772, z = 2.758931931}

eval(sin(x+y+z),%);

                             0.8414709853

From other point of view, you don't need all that, x+y+z=1, so sin(x+y+z)=sin(1),

evalf(sin(1),5);
                               0.84147

Alec

See Alex Potapchik's procedure in that thread. 

It was posted in 2005. I wonder why it was not included in the Statistics package since then.

Alec

See also plots in the earlier thread.

Alec

See also ?examples,binarytree suggested by Jacques Carette.

Alec

Intsolve also can be used, just integrating DV manually first,

IV:=y(t)+5*int(sin(t-tau)*y(tau),tau=0..t)=10*t+C:
intsolve(IV,y(t));

             25      1/2     1/2            1/2              5 t
      y(t) = -- sin(6    t) 6    + 5/6 cos(6    t) C + C/6 + ---
             18                                               3

Alec

It can be also solved less elegant than Robert Israel's solution, and also longer, using dsolve,

DV:=diff(y(t),t)+5*int(cos(t-tau)*y(tau),tau=0..t)=10:
simplify(diff(DV,t,t)+DV);

                    / 3      \
                    |d       |     /d      \
                    |--- y(t)| + 6 |-- y(t)| = 10
                    |  3     |     \dt     /
                    \dt      /

dsolve(%);

                   1/2     1/2                1/2     1/2       5 t
  y(t) = -1/6 cos(6    t) 6    _C2 + 1/6 sin(6    t) 6    _C1 + ---
                                                                 3

         + _C3

eval(DV,y=unapply(rhs(%),t));

                                         1/2
  10 - 25/3 cos(t) + 5 sin(t) _C3 + 1/6 6    _C2 sin(t) + _C1 cos(t)

         = 10

solve(identity(%,t),{_C1,_C2,_C3});

                                               1/2
                                              6    _C2
              {_C1 = 25/3, _C2 = _C2, _C3 = - --------}
                                                 30

eval(%%%,%);

                   1/2     1/2       25      1/2     1/2   5 t
  y(t) = -1/6 cos(6    t) 6    _C2 + -- sin(6    t) 6    + ---
                                     18                     3

            1/2
           6    _C2
         - --------
              30

Alec

Maple ranking has 283 pages, with 30 people on every page except the last one, which has 19 people listed. That gives

30*282+19;
                                 8479

users. 30*72+15=2175 of them made at least 1 post.

From other point of view, the latest current user, cytell, is the user No. 10003.

Alec

Using Dirac function,

use Statistics in 
f := x->1/2*Dirac(x-a)+1/2*Dirac(x-b): 
d:=Distribution(PDF=f):
R:=RandomVariable(d):
(MGF, CGF, PDF, CDF, Moment)(R,t) assuming a<b
end use;

That has problems with Samples though. If you need samples, ProbabilityTable distribution can be used,

use Statistics in 
T:=[1/2,0,0,0,0,0,1/2];
d:=Distribution(ProbabilityTable(T));
R:=RandomVariable(d);
Sample(R,10);
end use;

Also, functions of random variables can be used. For example,

use Statistics in 
R:=6*RandomVariable(Bernoulli(1/2))+1:
Sample(R,10);
end use;

Alec

In the cylindrical coordinates in Maple, you enter r as a function of alpha and z, and not z as a function of r and alpha as one would think.

Again, if you provided a simple example, I would show how that can be done in that example.

If you search for cylindrical coordinates using the search box above, you will get a list of useful links with examples, including contourplot.

Alec

There are many ways. Which is better, depends on what your functions is supposed to do. If you gave an example, it would be easier to choose.

For example, if you want to find the sum of their squares, you can do

f := proc( x::seq(numeric) )
add(i^2,i in [x])
end:

f(),f(3),f(4,5);
                               0, 9, 41

Alec

Another way of doing that is something like the following,

s:=k->k*(k+1)/2:
 
ans1:=unapply(3*s(iquo(n-1,3))+5*s(iquo(n-1,5))-15*s(iquo(n-1,15)),n):

For example,

ans1(10);
                                  23

Alec

Also, anything can be reported, as well as you can ask for help emailing to support@maplesoft.com

Alec

If it grows 3 times in 8 years, in the next 8 years it will grow 3 times and become 3*3=9 times of the original amount. In the next 8 years it will grow 3 times again...

What does that have to do with Maple?

Alec

First 44 45 46 47 48 49 50 Last Page 46 of 76