Alec Mihailovs

Dr. Aleksandrs Mihailovs

4455 Reputation

21 Badges

20 years, 306 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

Maple uses exp for the exponent. With it, simplify works,

f:=exp(p)/(exp(2*p)+exp(p));

                                  exp(p)
                        f := -----------------
                             exp(2 p) + exp(p)

simplify(f);

                                  1
                              ----------
                              exp(p) + 1

Alec

You don't need algsubs for that, subs produces what you wanted,

f:=((m-b)/m)^(2*m)+b^2*m;

                            /m - b\(2 m)    2
                       f := |-----|      + b  m
                            \  m  /

subs((m-b)/m=p,f);

                             (2 m)    2
                            p      + b  m

subs(m-b=m*p,f);

                             (2 m)    2
                            p      + b  m

Alec

The answer seem to be exactly opposite for d - it can be anything outside of the interval between a and b.

solve((b-d)*(a-d)>0,d);

                  { [{d < b}, {a < d}]        b < a
                  {
                  { [{d < b}, {b < d}]        a = b
                  {
                  { [{d < a}, {b < d}]        a < b

The case with a=b should be excluded because that gives 0 in the denominator.

There doesn't seem to be an easy way to do that in Maple other than reproducing manual calculations.

Alec

It's hard actually to tell without an example. If you could provide a simple example (with a known answer), then at least it would be something to try.

Sometimes it's just doesn't have sense - for example, if the formula is a+b=c, then no matter what c is, that doesn't guarantee that a and b are real, not even talking about positive.

Alec

For example,

m:=module() export x; option package; end:
with(m):

equ := :-x*y=x;

                            equ := x y = x

isolate(equ, y);

                               y = x/x

eval(%,:-x=x);

                                y = 1

Alec

See the last example in the implicitplot3d help page.

Alec

The easiest, probably, would be to remove the decimal point before converting to a string,

p:=evalf((1+sqrt(5))/2-1,20);

                     p := 0.61803398874989484820

op(1,p);

                         61803398874989484820

Alec

In Standard Maple, type 5x2+y, then select x2, click the right mouse button over it, go to the last line in the menu, 2-D Math, then Convert To, and then click Atomic identifier.

After that, type diff( in front of it, then put a comma after, copy that x2 converted to the Atomic identifier, and paste after the comma. Then type ) and hit enter. The result looks like

diff(5x2+y, x2)

                                      5

Also, you could search this site for frontend.

Alec

If you need that for decoding, the most efficient, probably, would be doing StringTools:-TrimRight after converting the list to a string.

If the list doesn't contain 32 other than the trailing ones, one can do

remove(`=`,C,32);

                          [1, 2, 3, 4, 5, 6]

or

subs(32=NULL,C);

                          [1, 2, 3, 4, 5, 6]

Otherwise, the following works,

for i while C[-i]=32 do od:
C[..-i];

                          [1, 2, 3, 4, 5, 6]

Alec

The correct way is to use add. The sum in this case also is using add anyway

sum('coeff'(con,t^(-1/2+k)),k=0..3);

                                      1/2         1/2
                  1/2                2           2
             1/2 2    ln(lambda) - --------- - ---------
                                           2           4
                                   6 lambda    2 lambda

add also could be used with fractional ranges,

add(coeff(con,t^k),k=-1/2..3);

1/2*2^(1/2)*ln(lambda)-1/6*2^(1/2)/lambda^2-1/2*2^(1/2)/lambda^4

Alec

Nothing wrong if you add

with(plots):with(plottools):

at the very beginning and replace semicolons after the p and q definitions with colons.

Alec

Nice looking picture!

Alec

You could use either alias, or PDEtools:-declare. The difference is that with alias you can enter your function as, say, x1, but with PDEtools:-declare you have to enter it as, say, x2(x,y,z).

alias(x1=x1(t));

                                  x1

diff(x1,t);

                                d
                                -- x1
                                dt

PDEtools:-declare(x2(x,y,z));

               x2(x, y, z) will now be displayed as x2

diff(x2,x);

                                  0

diff(x2(x,y,z),x);

                                x2[x]

c*(1-cos(x1))+x2(x,y,z)^2/2;

                                            2
                                          x2
                        c (1 - cos(x1)) + ---
                                           2

As a side note, I should say that such things are usually not worth the effort. It may seem attractive for a moment, but in the long run, it is better to be able to restore the input from the output. In particular, for editing purposes - it is much easier, say, to change x1 to y if such tricks were not used etc.

Alec

That happened, apparently, because I tried to use <math> tag to enter a formula, and that caused a problem. See the Fatal error comment in another thread.

The solution of your problem was in using add instead of sum.

Alec

evalb does something different. The following works (partially),

is(sum(binomial(n, k)*x^(n-k)*y^k, k = 0 .. n)=(x+y)^n) 
    assuming x>0;

                                 true

Alec

First 15 16 17 18 19 20 21 Last Page 17 of 76