13010 Reputation

18 years, 187 days

`dsolve/numeric/bvp`...

@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);
```

Mma has a Surd...

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]`);
```

The zero case...

@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).

The integral of 0 should be zero...

@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.

```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!

Maple versions...

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.

An obvious singularity at 1...

@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?

Not a ColorTools problem...

@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.

Assuming nonnegative...

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;
```

I get different errors...

@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.

Maple 2022.2...

@acer I find the same error in Maple 2022.2:

Same in Maple 2021.2...

@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.

I did...

@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.

My confusion...

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

Diff and diff...

I ran your worksheet in Maple 2023.0.
I was puzzled by the output from the first example's convert/Diff that on my computer doesn't join the Diffs.
and therefore looks weird.
The same happened with the other convert/Diff examples.
Replacing all the Diff's in the worksheet with diff made the results look nice as it apparently does in your version of Maple.
############
This problem is also present in Maple 2022.2, but not in Maple 2021.2.
I shall submit an SCR.

@mmcdara Using your example we see another failure of maximize here:

```restart;
u := (1 + 20230321)*x*y - (x^2 + y^2)/2;
v := collect(eval(u, [x=lambda*cos(t), y=lambda*sin(t)]), lambda);
v:=combine(v);
vt:=eval(v,lambda=t);
limit(vt,t=infinity); # OK: undefined
maximize(vt); # OK: Returns unevaluated
maximize(v);  # Not OK: Returns infinity
#####
debug(minimize); # maximize(v) is basically defined as -minimize(-v)
maximize(v);
```

 1 2 3 4 5 6 7 Last Page 1 of 218
﻿