Carl Love

Carl Love

28055 Reputation

25 Badges

12 years, 360 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

Enter the code with 1D input instead of the (default) 2D input. The variable name `&rsquo` looks like the type generated by 2D input.

The error message is from dsolve, not from LSSolve. You can get around this first error by specifying method= bvp[midrich] in the dsolve. Then you will get an error "initial Newton iteration is niot converging". The usual remedy for this is to specify a continuation parameter. I haven't figured out a good place to place the parameter. See ?dsolve,numeric_bvp,advanced.

@ctnaz You need to download and install DirectSearch from the Maple Applications Center.

@I_Love_LSK It looks like you're using a list of three Vectors. I'm surprised that you don't get an error message. Make the argument to spacecurve a list:

plots:-spacecurve(
     [cos(Pi/3)*sin(t)-sin(Pi/3)*cos(t), sin(Pi/3)*sin(t)+cos(Pi/3)*cos(t), t],
     t = 0 .. 6*Pi
);

And change 60 to Pi/3.

@adel-00 Keep it at infinity. That's just an initializer for keeping track of the minimum. It is changed from infinity as soon as the first value is processed.

@adel-00 Change the Val procedure from Val:= x-> abs(x[2]) to Val:= x-> abs(x[2] - 1e-4);

@Andriy I think that the NAG methods work strictly in hardware floating point, and do not run any differently based on the setting of digits, Digits, or epsilon. Note that they refuse to run at all if digits is greater than 15. I also don't think that there is really any specifically Maple implementation of the NAG method; rather, it is just a call to unmodified external code. If this is true, you should get the same results from any other program that used NAG.

@Majmaj Here are four examples that I hope will improve your understanding. First read through the examples, then go back and read again, this time trying to figure out why each output is the way that it is. After thinking about it for a while, ask me any questions you have if you're still confused.

 

restart:

P:= proc(x) x:= 23; return x end proc:

a:= b:

c:= P(a);

b

a;

23

b;

23

eval(a,1); #One level of evaluation.

b

eval(a,2); #Two levels of evaluation.

23

eval(c,1);

b

eval(c,2);

23

restart:

P:= proc(x) x:= 23; return x end proc:

a:= b:

c:= P('a');

a

a;

23

b;

b

eval(a,1);

23

eval(c,1);

a

eval(c,2);

23

restart:

P:= proc(x) x:= 23; return eval(x) end proc:

a:= b:

c:= P(a);

23

a;

23

b;

23

eval(c,1);

23

#See that c has no connection to a or b in this case!

restart:

P:= proc(x) x:= 23; return eval(x) end proc:

a:= b:

c:= P('a');

23

a;

23

b;

b

eval(a,1);

23

#See that a has lost its connection to b in this case.

eval(c,1);

23

#Nor is c connected to b.

 

Download eval.mw

@ecterrab But can D handle a negative exponent, as is (D@@(-2))? I believe that is what the OP is asking about.

@adel-00 Sorry, it took me a long time to figure out what you are talking about. To extract the beta, for example the 4994., do

Min(mytab2, Val)[1];

Regarding your other question, I still can't figure out what you are talking about.

The error message is about not being able to achieve a certain accuracy. It is not at all surprising to me that rewriting the integrand makes it work. I don't think it's a bug.

@adel-00 Okay, here is a procedure to find the closest point to N'(t) = 0 in mytab2.

Min:= proc(L::{list, set, rtable}, Val)
local x, min:= infinity, v, X;
     for x in L do
          v:= Val(x);
          if v < min then  min:= v;  X:= x  end if
     end do;
     X
end proc:

Val:= x-> abs(x[2]):

Min(mytab2, Val);
       [4994.00000000000, -2.784601937964963e-11]

@adel-00 Your code does correctly produce a table of [t, N'(t)] (although there are easier ways to do this). But N'(t) is never 0, and no matter how you change the parameters, it still will never be 0, for the reason Preben mentioned. N'(t) makes a slow, asymptotic approach to 0 as t approaches infinity.

@John Fredsted Maple is not going to change the user's possibly complex entry by putting Re around it. Since the entry is possibly complex, it just reverts to every Matrix entry's default value of 0. If you want nonzeros on the diagonal, then you'll need to specify explicitly real values for the diagonal.

Since you mentioned quantum mechanics, I've added physics to main post's tags in the hope that Edgardo would comment.

@John Fredsted Maple is not going the change the values of your entries. Consider the difference in the output of the following two commands:

Matrix(3, (i,j)-> i+I*j, shape= hermitian);

Matrix(3, (i,j)-> `if`(i=j, i, i+I*j), shape= hermitian);

First 576 577 578 579 580 581 582 Last Page 578 of 709