Preben Alsholm

MaplePrimes Activity


These are replies submitted by Preben Alsholm

@9009134 To see all elements in data[3] use
interface( rtablesize = 49);  # see under ? interface in the help.
# Try it, but it takes up a lot of space.
Notice that lists like X and Y are indexed from 1 (not 0) and so are matrices.
data[3] is an Array that has index ranges 1..49, 1..49.
The command:
M:=convert(data[3],Matrix);
makes M a Matrix. data[3] remains an Array.

In Maple 2023.1 and in Maple 2022.2 the result is
Int(-1/((1 + LambertW(1 - u))*u), u).

In Maple 2021.2 the result given is the same wrong answer as the one you report.

@KIRAN SAJJAN The procedure used is `dsolve/numeric/bvp`. It doesn't use any finite element method or shooting method. It uses finite difference.
Here is a simple bvp, you can use to see the way the code is proceeding: Uncomment the debug line.
The code itself can be seen using the showstat command.

restart;
odesys:={diff(y(x),x,x)+sin(y(x))=cos(x),y(0)=1,D(y)(1)=0};
#showstat(`dsolve/numeric/bvp`); #To see the long code
#debug(`dsolve/numeric/bvp`);    # To debug
res:=dsolve(odesys,numeric);
plots:-odeplot(res);

 

The explanation could be that CubeRoot is seen as superfluous, since Mma has a Surd just like Maple's surd.

But it seems that Surd has been overlooked too!

with(MmaTranslator);
FromMma(`Surd[-32,5]`);

 

@sand15 In Maple 2023 we get:
 

int(0, x=0..+infinity) = limit(int(0, x=0..a), a=+infinity);
## Result 0 = 0

Which is perfectly fine.
Incidentally, when you mention "the definition" then you must be talking about the improper Riemann integral.
There are several other integrals (e.g the Lebesgue integral), but as Carl Love mentions all return 0 on the input 0 on any domain on which they are defined.

A note about using assuming:

 

int(a*x,x=0..2) assuming a=7; # 14
int(C, x=0..+infinity) = limit(int(C, x=0..a), a=+infinity) assuming C=0; #  0=0
int(C, x=0..+infinity) = limit(int(C, x=0..a), a=+infinity) assuming C>0; #  infinity=infinity
int(C, x=0..+infinity) = limit(int(C, x=0..a), a=+infinity) assuming C<0; # -infinity=-infinity

The equality case works as commented in Maple 2021, Maple 2022, and Maple2023 (at least).

@mmcdara To me it is obvious mathematically that any definite integral of 0 should return 0 pure and simple.
It is another question what happens when you first integrate a (symbolic) constant like C over an infinite range.
To answer your question:
 

z :=0:
i := +infinity:
z*i ;  # = ???

Maple 2023 returns undefined which is reasonable to me and I don't consider that inconsistent.
The same answer comes from direct input:
 

0*infinity;

Answer: undefined. Also fine!

In Maple 2023 the two integrals return 0 whether in 1D or 2D.
Not so in Maple 2021 and Maple 2022. I don't have Maple 2019 nor 2020 on this machine.
The help page does mention the syntax for the ranges as required to be in a list. It seems not to make a difference in any case.
 

@Dkunb You are using the the same initial conditions as in the first round. So in order to pass over to the interval 1.1..2.5 the integration must pass the obvious singularity at R=1.
So where do you want to start on the other side of 1 and in case of T with which value?

@Brian Hanley Try your code without using the ColorTools package, but using [gray,gray] instead.
 

restart;

with(plots):
#with(ColorTools);
#cGr4s := Color([0.50, 0.50, 0.50]);

contourplot3d(-5*d/(d^2 + y^2 + 1), d = -3 .. 3, y = -3 .. 3, color = black, thickness = 3, coloring = [gray, gray], contours = [-2, -1.5, -1, -0.5, 0, 0.5, 1, 1.5, 2]);

contourplot3d(-5*d/(d^2 + y^2 + 1), d = -3 .. 3, y = -3 .. 3, filledregions = false, color = black, thickness = 3, coloring = [gray, gray], contours = [-2, -1.5, -1, -0.5, 0, 0.5, 1, 1.5, 2]);

contourplot3d(-5*d/(d^2 + y^2 + 1), d = -3 .. 3, y = -3 .. 3, filledregions = true, color = black, thickness = 3, coloring = [gray,gray], contours = [-2, -1.5, -1, -0.5, 0, 0.5, 1, 1.5, 2]);


For the first two of the contourplot3d commands I get the error:

Error, (in plot3d) unexpected option: coloring = [gray, gray]

The last command works fine.
 
Thus I can't see that the ColorTools package has anything to do with this behavior.

You are assuming that d is nonnegative:
Executing the following doesn't give degrees, minutes, and seconds:
 

dms(-45.2365);

Maybe this would help, it seems so:
 

restart;
dms := proc(d, m := 0, s := 0)
 local con, d1, d2, d3; 
if 0 <> frac(d) then 
   d1 := floor(d); 
   d2 := floor(60*frac(d)); 
   d3 := 60*frac(60*frac(d)); 
   con := cat(d1, `° `, d2, `' `, d3, `"`); 
else 
con := d + m/60 + s/3600; 
end if; 
cat(con,`° `); 
end proc;

 

@Brian Hanley The error I get from your first two commands is:

Error, (in plot3d) unexpected option: coloring = [ColorTools:-Color("RGB",[.50, .50, .50]), ColorTools:-Color("RGB",[.50, .50, .50])]

whereas the error I get from your comment example is:


Error, (in plot3d/options3d) unexpected option: `filledregions=true, coloring` = [cGr1s, cGr1s]

which is quite understandable since   `filledregions=true, coloring`  is a name!

Note. The code for contourplot3d can be seen here:

showstat(`plots/contplot3d`);

and is quite short piggybagging (as you said) on plot3d.
I'm using Maple 2022 as you are.

@acer I find the same error in Maple 2022.2:

Download Maple2022_2_simplify.mw

@mmcdara The error occurs also in Maple 2022.2, but NOT in Maple 2021.2.
Even in Maple 12 there is no problem although the denominator is slightly larger than the one in 2021.2.

@QM I deleted your answer as I deemed it quite inappropriate. You were "answering" your own question, which is OK in itself, but the content wasn't relevant to your own question to put it mildly.
Incidentally, I think this is the first time I have seen somebody select his own answer as the best.

@acer Thanks for pointing out my confusion. Thinking about limit and maximize at the same time must have confused me.

First 10 11 12 13 14 15 16 Last Page 12 of 229