Preben Alsholm

13653 Reputation

22 Badges

19 years, 309 days

MaplePrimes Activity


These are replies submitted by Preben Alsholm

@C_R Unfortunately, Maximize doesn't do well:
 

restart;
G:= (x,y)->(-2.4 + 25.20*y^2 - 18.48*y^3)*x^3 + (2.1 - 30.87*y^2 + 23.10*y^3)*x^2 + (-0.84*y^2 + 0.66*y^3)*x + 1. + 2.1*y^2 - 2.2*y^3;
Optimization:-Minimize(G(x,y),x=0..1,y=0..1);
Optimization:-Maximize(G(x,y),x=0..1,y=0..1); # Wrong
plot(G(x,x),x=0..1/5);

Maximize gets the result [1., [x = 0., y = 0.]] , which is clearly wrong. The point (0,0) isn't a local maximum, in fact it is a local minimum:
 

gxyE:=expand(G(x,y));
remove(s->degree(s)>2,gxyE);

Result: 1. + 2.1*x^2 + 2.1*y^2. Thus (0,0) is a local minimum.

Didn't you report this difference earlier? I surely remember seeing something at least very similar from your hand.

If you add the option numpoints=10000 you get a much better curve:

sol_plot := plots:-odeplot(sol, [[x(t), y(t)]], 0 .. 100, numpoints = 10000, color = "blue")

Since the help page clearly says:

variables:  (optional) name or set or list of names; unknown(s) for which to solve.

this is a bug.
If you just use solve(eqs) then NULL is returned (i.e. nothing).

@Christopher2222 Thank you!  Indeed there is a help page for Matrix Browser in Maple versions 2021, 2022, and 2023.

Whereas I can get double clicking in Maple 2024 work without any problem I'm not able to do that in those other versions. That's what made me write that it is a new feature.
I don't know why the feature doesn't work for me in those previous versions. They are on the same computer as Maple 2024.

PS. I checked on old laptop, which also has Maple 2021.
Same refusal to react to double click.
PPS. It has to do with my setting of typesetting. I use standard in all versions including Maple 2024.
Double clicking works on the previous versions only for typesetting = extended.


 

@C_R I looked at the help page ? Browse Matrix: Viewing Arrays, Matrices, or Vectors.

I agree that the Display setting Structure combined with a Colormap setting of Cool (or Hot) shows a color that doesn't correspond with the legend, but only if all elements are actually zero.
Same error with Display = Magnitude

This Matrix Browser is a new feature in Maple 2024.
This appears to me to be a bug.
If you consider  Matrix(11,11,fill=17)  then there is no problem.

Why expect a black image?
Try experimenting:
 

LinearAlgebra:-RandomMatrix(11,11);
Matrix(11,11,fill=17);
Matrix(11,11,(i,j)-> `if`(i=1,j,5));
Matrix(11,11,(i,j)-> `if`(i>1,j,5));

You could also experiment with the menu Colormap inside the browser.
There you can choose Grayscale, Hue, Hot, or Cool.
If you choose Cool your Matrix(11,11) will be black; choosing Hot it will be white.

@Thomas Richard I got my old laptop up and running and could just confirm that.

I keep that computer simply because it has my old Maple versions.

@ On older versions kernelopts(versionnumber)  doesn't exist, but kernelopts(version) does.
On this computer I have besides the most recent versions Maple 12; no kernelopts(versionnumber)
.

I get the same crash in Windows 11 and Maple 2024.0.
With certain assumptions I get a result:
 

restart;
sol:=(3^(1/2)*u(x)-1/3*3^(1/2)+(3*u(x)^2-2*u(x)-1)^(1/2))^(1/3*3^(1/2)) = x^(1/3*3^(1/2))*c__1;
eq:=eval(sol,u(x) = u);
plot(lhs(eq),u=-5..5); 
solve(eq,u) assuming x>1,c__1>0; # OK
# solve(eq,u) assuming x>1,c__1>-1; #Crash

 

@Ronny Yes, MultiSeries is implemented as a package.
Technically, this means it is a module with option package.
Executing with(MultiSeries) makes its content:
[AddFunction, FunctionSupported, GetFunction, LeadingTerm, RemoveFunction, SeriesInfo, asympt, limit, multiseries, series, taylor]

available in the short form as in this case limit.

This can be very convenient.

Even after having executed with(MultiSeries), the usual limit is still available as :-limit
 

with(MultiSeries);
limit(CylinderU(0,CylinderU(0,x)),x=0); # Fine
:-limit(CylinderU(0,CylinderU(0,x)),x=0); # The old wrong result.

 

int(A,x=0..xx,method=_RETURNVERBOSE);

The only successful are ftoc and msftoc with result xx*exp(-1/2).

The same result if simplify(A) is the input. Somewhat strange!

Well, it's somewhat better if you assume that n::posint:
 

is(G(2*n) = G(2*n + 1) + G(2*n + 2)) assuming n::posint;

Certainly checking concrete cases results in true:
 

{seq(is(G(2*n) = G(2*n + 1) + G(2*n + 2)),n=1..100)}; # a set of one element: true

 

@nm In your "counter example" dsolve returns a solution, which odetest verifies:
 

ode:=exp(diff(y(x), x) - y(x)) - diff(y(x), x)^2 + 1 = 0;
sol:=dsolve(ode);
odetest(sol,ode); # 0

If I understand you correctly, by counter example you mean an example showing that this general statement is false:
"It is always better to use PDEtools:-Solve rather than solve".

Just a remark.

dsolve(ode) returns
y(x) = Int(RootOf(-x + ln(_Z) + sin(_Z)), x) + c__1.

odetest is made so that it certainly verifies solutions coming from dsolve.
PDEtools:-Solve, odetest, and dsolve have the same author as I believe you know.

1 2 3 4 5 6 7 Last Page 1 of 229