Preben Alsholm

13728 Reputation

22 Badges

20 years, 241 days

MaplePrimes Activity


These are answers submitted by Preben Alsholm

The answer is no!

And by the way, who says that k is real?

Try experimenting with this:

solve(randpoly(x)=0,x):
evalf(%);

and you will find that the answer is no.

#mylist[3] refers to the third element of the list mylist, thus in your second example mylist[3] is 25.

mylist:=[1,2,25]:

#Your do loop could run like this:

for x in mylist do convert(x,binary) end do;

                               1
                               10
                             11001

#or like this:

for x from 1 to nops(mylist) do convert(mylist[x],binary) end do;

# Using map instead:

map(convert,mylist,binary);
                         [1, 10, 11001]

#Using elementwise operation (Maple 13 and 14):

convert~(mylist,binary);
                         [1, 10, 11001]


 

If you want to avoid using the LinearAlgebra package (RowOperation and ColumnOperation) you can use elementwise multiplication *~ (introduced in Maple 13):

restart;
A:=Matrix(3,4,symbol=a):
A[1]:=s*~A[1];
A;
A[1..3,2]:=t*~A[1..3,2];
A;

This way A is changed, however.

From the plottools help page:

"Because most plottools commands produce a single plot object such as a curve rather than a complete plot, the options accepted are limited to those applicable to the object.  Examples are color, linestyle and transparency.  Options that affect an entire plot, such as axes or title, are ignored."

I think this goes for coords=polar as well.

# Assuming that the outout has the form {x = 60., y = 40.};
subs(%,[x,y]);
plot([%],style=point,symbol=solidcircle,symbolsize=20);

Another solution.

L:=[[name,4,3,6,5],[3,5,name],[3,6,1,2,9,8]] :
eval(L,name=NULL);
           [[4, 3, 6, 5], [3, 5], [3, 6, 1, 2, 9, 8]]
eval(L,3=NULL);
         [[name, 4, 6, 5], [5, name], [6, 1, 2, 9, 8]]

The short answer is yes.

You should really use 'Matrix' instead of 'matrix'.

To retain a copy of the matrix a use LinearAlgebra:-Copy.

restart;
a := Matrix(2, 2, [1, 2, 3, 4]);
b := a;
c:=LinearAlgebra:-Copy(a);
for i to 2 do for j to 2 do b[i, j] := (1/3)*b[i, j] end do end do;
b;
a;
c;

In the standard interface for Maple in Tools/Options/Display/Input display (in the Windows version), you find a choice between Maple Notation and 2-D Math Notation.

Presumably, by "Maple 1-D expressions" is meant Maple Notation.

The term "Maple Notation" is also somewhat odd. However, it just means using ordinary text input (or output), like

int( x^2, x=0..sqrt(2))

I should add that I don't know anything about MapleNET.

There has been a change from Maple 13 to 14 in that area:

Maple 14:

seq(time(plot(csc(k*x), x = 0 .. 2*Pi, -3 .. 3, discont = true)), k = 1 .. 6);
          0.078, 0.046, 17.706, 0.078, 0.093, 106.080

and now with usefdiscont=true (new in Maple 14):

seq(time(plot(csc(k*x), x = 0 .. 2*Pi, -3 .. 3, discont = true,usefdiscont=true)), k = 1 .. 6);
            0.015, 0.078, 0.031, 0.046, 0.093, 0.093

Maple 13:

seq(time(plot(csc(k*x), x = 0 .. 2*Pi, -3 .. 3, discont = true)), k = 1 .. 6);
                  0.031, 0.015, 0.046, 0.046, 0.046, 0.031

It seems that the problem with Maple 14 is the introduction of the new feature, showremovable=true/false.

Have you looked at the CurveFitting package?

Doesn't this work:

plot([sin,cos],0..Pi,legend=[sin,cos],legendstyle = [font = ["HELVETICA", 9], location = right]);

It works on my Maple 14.

To see what is going on, modify the example in the help for Statistics[PolynomialFit]:

with(Statistics):
X := Vector([1, 2, 3, 4, 5, 6], datatype=float):
Y := Vector([2, 3, 4, 3.5, 5.8, 7], datatype=float):
PolynomialFit(5, X, Y,x);
Warning, there are zero degrees of freedom
                                                                   2
22.3000000000013934 - 45.8000000000009352 x + 36.2083333333324831 x

                          3                        4                         5
   - 12.5833333333326678 x  + 1.99166666666652214 x  - 0.116666666666656538 x
PolynomialFit(6, X, Y,x);
Error, (in Statistics:-PolynomialFit) the number of independent parameters is greater than the number of observations

When you ask for the polynomial to have degree 5 there are 6 coefficients to be determined, and you have 6 equations, one for each of the (x, y)-points. Thus most likely the coefficients are uniquely determined, and the resulting polynomial is an interpolating polynomial passing through all of the 6 points.

You could try

?PDEtools[declare]

As I understand the question, the maximum has to be found for each of 100 values of G.

Using GlobalSearch from Sergey Moiseev's package DirectSearch (available from Maple Application Center) with G = 0.15:

GlobalSearch(eval(TF,G=0.15), {B >= 0, 0 <= a, B <= 1, a <= 1}, maximize);

#Output a = 0, B = 0.7841 agrees with the plot:

                  
plot3d(eval(TF,G=0.15),a=0..1,B=0..1,axes=boxed);

The basic reason for the failure is that f(z) = exp(1/z) has an essential singularity at 0.

However, with
F:=sinh(sqrt(phi/nu+m^2)*h);
G:=sinh(sqrt(phi)*h/sqrt(nu));

you can use your result to conclude that F/G -> 1 as nu->0, so that the main contribution to F for small nu is G.

To improve further you could use that for large x  sinh(x) = exp(x)/2 and then

restart;
G:=(1/2)*exp(sqrt(phi)*h/sqrt(nu)):
F:=1/2*exp(sqrt(phi/nu+m^2)*h):
combine(F/G):
series(%,nu=0,2):
G*%;

Of course the number 2 in series can be changed.           

First 151 152 153 154 155 156 157 Page 153 of 160