acer

32303 Reputation

29 Badges

19 years, 309 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are answers submitted by acer

See the help-page ?interface and scroll down to the item rtablesize. That specifies the largest size Matrix/Vector which displays in full.

For example, you could do,

interface(rtablesize=25):

This is also described in the second item in the Description in the ?Matrix help-page.

acer

> expr:=a^(3/2)*(1/a)^(3/2);
                                    (3/2)      (3/2)
                           expr := a      (1/a)
 
> simplify(expr) assuming a>0;
                                       1
 
> simplify(expr) assuming a<0;
                                      -1

> simplify(expr,symbolic);
                                       1

See the 5th item in the help-page for `^` (type in ?^).

> (-1)^(3/2);
                                      -I
> exp((3/2)*ln(-1));
                                      -I

acer

I get something not quite as you expected, for the integral from 0..infinity, under certain assumptions about k, T, and m.

I assume that you meant T instead of t, in the expected result.

> expr:=(4*v*(m/(2*Pi*k*T))^(3/2)*Pi*v^2)*exp(-m*v^2/(2*k*T)):

> sol:=int(expr,v=0..infinity):
> sol := simplify(sol) assuming m/(Pi*k*T)>0;

                                        1/2 / m \1/2
                                 2 k T 2    |---|
                                            \k T/
                          sol := -------------------
                                           1/2
                                       m Pi
 
> expected:=sqrt(8*k*T/(Pi*m));
                                        1/2 /k T \1/2
                         expected := 2 2    |----|
                                            \Pi m/
 
> simplify(sol-expected) assuming T>0, k>0, m>0;
                                       0

acer

> p:=t^6+t^3+1:
> sol:=convert(simplify([solve(p)]),expln);

                                                   1/2
sol := [exp(2/9 I Pi), -1/2 exp(2/9 I Pi) + 1/2 I 3    exp(2/9 I Pi),
 
                                1/2
    -1/2 exp(2/9 I Pi) - 1/2 I 3    exp(2/9 I Pi), exp(-2/9 I Pi),
 
                                 1/2
    -1/2 exp(-2/9 I Pi) - 1/2 I 3    exp(-2/9 I Pi),
 
                                 1/2
    -1/2 exp(-2/9 I Pi) + 1/2 I 3    exp(-2/9 I Pi)]

So, now `sol` is a list of the solutions, in your form where possible. You can check them by evaluating polynomial `p` at t=x, for each member x of the solution list.

> seq(simplify(eval(p,t=x)),x in sol);
                               0, 0, 0, 0, 0, 0

acer

The very first link in results of a web search for jacobi iterative was an intro (with matlab code, which could be translated to maple). But there were many good hits, since it's a very simple and standard technique.

Are you having difficulty understanding the method, or in writing maple code to implement it? If the latter, then post what you've got so far.

acer

If you use contours=[1,0.83,0.81] then does it appear to you as if the contours are shrinking to the point indicated by the contour at height 101/128 ?

Try plot3d(f,x=-2..2,y=-2..2,axes=boxed) for another visual of it. It should appear as if you are asking for the contour about the local minimum (3/4,-7/16). It's possible that contourplot is not showing the single black dot at (3/4,-7/16), which you could test by display(v) alone.

acer

Sorry, if this was a homework question.

acer

In Maple 11.02,

with(plots):
a:=1:
implicitplot([surd(x^2,3)+surd(y^2,3)=a^(2/3)],x=-a..a,y=-a..a);

acer

for i from 1 to blah do
...
try
  NLPSolve(...);
catch "no improved point could be found":
  print("no improvement caught and ignored");
end try;
...
end do:

acer

Does it help, if you also supply the optional argument 'WRAPPER' in your define_external call?

You may need a C compiler, for that to work. See the ?WRAPPER help-page .

acer

See the help-page ?if .

In programming, you can use the if..then construction as follows,

if a>b and b>c then
  4;
end if;

There is also a function, `if`.

> `if`(a>b and b>c, 4, NULL);
                         if(b < a and c < b, 4, NULL)
 
> eval(%, {a=7,b=3,c=-1});
                                       4
> eval(%%, {a=2,b=3,c=-1});
                                     NULL

acer

It would not be good if Maple actually assigned to Kvr and Kz15 as part of the solving process. It would be too heavy handed, and prevent other use of those names.

You can use the 2-argument form of the eval() command to evaluate other expressions using the result from fsolve (or solve). Think of it as "substituting in" the values of the solution from fsolve.

> Kz24 := (2.4/1.5)*Kz15;
                           Kz24 := 1.600000000 Kz15
 
> eval(Kz24, soln_z15);
                                  323614.6206

nb. You can get a similar effect using subs(), but I don't recommend it here. This is mathematical evaluation, not substitution into a data structure.

acer

I expect that there are lots of ways to do it.

LtoP := L -> add( L[i]*x^(i-1), i = 1..nops(L) );

LtoP([1, 2, 3]);

Or, for Horner's form,

LtoP := L -> foldr((a,b)->x*(a+b),0,op(L[2..-1]))+L[1];

LtoP([1, 2, 3]);

acer

Could you upload the data to the mapleprimes File Manager? Could you post or upload the precise code that you tried, which gave rise to the result that you quoted?

acer

It sounds to me as if you are asking about facilities for doing abstract linear algebra in Maple. If that's right, then I'm afraid that the answer may be: not much.

acer

First 318 319 320 321 322 323 324 Last Page 320 of 336