nm

11438 Reputation

20 Badges

13 years, 75 days

MaplePrimes Activity


These are questions asked by nm

Is there a mathematical reason why Maple does not allow expansion point for solving an ode using series solution to be different than where initial conditions are located?

I do not see why this restriction is there. Here is first order ode, where expansion point is x=1 and initial condiitons are also at x=1

restart;
ode:=diff(y(x),x)=x^3;
dsolve([ode,y(1)=1],y(x),'series',x=1)

            y(x) = (1 + (x - 1)) + 3/2*(x - 1)^2 + (x - 1)^3 + 1/4*(x - 1)^4 + O((x - 1)^6)

No problem. But when expansion point at x=0, it complains

restart;
ode:=diff(y(x),x)=x^3;
dsolve([ode,y(1)=1],y(x),'series',x=0)

Error, (in dsolve/SERIES) conflicting specifications of the series expansion point: 1 v.s. 0

I know help mentions that it uses initial conditions point for expansion if given, and if no IC is given, then it uses x=point if given and if no x=point is given then it default to x=0.

But my question is, why it does not handle the case when the expansion point is given explicitly and is at a different location than where IC are given? Is this simply just a feature missing that could be added in a future release if needed, or is it due to some mathematical reason that I do not see?

I would have expected it to first find the series solution around the given expansion point, then use the IC to determine the unknown constant after that, just like we normally do when solving an ode using standard methods not using series expansion.

I am using Maple 2023

Another very strange behavior.

res:= x^2 + x + 1 + 1/3*x^3 + 1/12*x^4 + 1/60*x^5 + 1/360*x^6 + 1/2520*x^7;
sort(res);

#and now
res

Without trying it, what do you expect the output of the last line above to be?  The same as the first one, right?  But that is not what Maple gives. Maple now changes res to always be sorted, even though I have not reassigned it.

Does this mean if one calls sort(), then all the variables that contains polynomials will also be sorted automatically?

Unable to upload worksheet. So here is screen shot

 


Download sort_problem.mw

These give errors

limit(y(0),y(0)=1)

limit(y(x),y(x)=1)

Error, (in limit) limit variable previously assigned, 2nd argument evaluates to y(0) = 1
 

One has to write 

limit(y,y=1)

But why? Is this because y(x) is not considered "algebraic" ? 

Mathematica has no problem with either one of these

I found this when I was trying to find the limit at initial conditions, when x=0 and y(0)=1 and wanted to take the limit on both x->0 and y(0)->1 

I can easily code around this, by renaming y(0) to say Y0 and then the limit will work.

It just seems to be unnecessary restriction of the limit() command parsing ability. 

What is the logic behind not allowing one to write limit(y(x),y(x)=1) ? 

I found a new problem in Maple 2023 on windows 10.  But it is more of an annoyonus. This is what happens:

I can have a worksheet open and running somecode with lots of output generated on the screen. Everything displays fine.

Now I go and open a new application not related to Maple at all, for example if I open the task manager, this causes the Maple screen to immediately go all BLANK ! Yes, all the display is gone. I have no idea why opening a new application in new window could cause this.

Everything disappears from the worksheet except for the worksheet frame. All the menus are gone also.

But resizing the worksheet window makes everything to appear agin due to the repaint process, But I need to resize the worksheet few times to get everything to repaint fully.

So the content is still there, but it just do not show/repaint.

Note that Maple does NOT freeze or anything, it is still running and the content is there, it is just that the content becomes not visible due to opening a new application window on the side.

I have never seen anything like this in any other application on windows. I also never had this problem on same PC with Maple 2022.2.

Anyone else noticed this problem?  This is reproducible all the time. Sometimes the content will display again on its own after short amount of time, but will be missing many menu items and missing side content and so on so I have to resize the windows to make repaint eveything again. 

May be it is a Java problem. I do not know.

I have the same system as described in this post 

I will make a movie to show this very soon but I am waiting for something to finish running before I do this so I can save all my work.

Windows 10 pro, running Maple 2023 with two monitors.

Here is a small movie. I made very small example which prints number on the screen in a loop. I added a Sleep in between so it does not take over the CPU just for illustration. In my real code there is no such Sleep command.

In this movie, we see that when I open the task manage window how the display in the worksheet is gone. In this example it comes back after few seconds but all the other items in the worksheet (menus etc..) are still missing. Resizing the windows makes them appear again. In my actual code, due to the larger content, the whole worksheet remain not visible for much longer each time (I waited 5 minutes and more for it to repaint), but still had to resize it to make everything visible as in this example.

Can someone else reproduce this?

for n from 1 to 1000000 do
    print("n=",n);
    Threads:-Sleep(2);
od;

 

 

I am porting some code I have in Mathematica to Maple. 

Mathematica has command Exponent which returns largest power on x, even if the power is not integer.

It is defined as

Maple's degree command does not allow this and returns FAIL (since it is meant to work only on polynomial, I understand that).

Is there a different command I could use which does the same as Exponent? Otherwise I have to parse it manually. The expressions will all be univariant polynomial in x, but the power on x can contain a symbol and numbers. The expression can be more complicated, but it will always have just one x in it, and I just want to extract the power in that x inside the expression.

Here are examples

degree(x^2,x);
degree(x^(n-1),x);
degree(3*x^(n+2),x);

In the above all fail except the first one which returns 2. For reference here is the result from Mathematica's Exponent command

Exponent[x^2, x]
Exponent[x^(n - 1), x]
Exponent[3*x^(n + 2), x]

I googled and could not find anything so far. I looked at PolynomialTools but do not see such command in it.

On possibility to do this manually is

get_exponent:=proc(expr,x::symbol)
   local z:=indets(expr,identical(x)^anything);
   if nops(z)<>0 then
      op(2,z[1]);
   else
      1;
   fi;
end proc;

And now

get_exponent(x^2,x);
get_exponent(x^(n-1),x);
get_exponent(3*x^(n+2),x);

2

n-1

n+2

Eitherway, if there is a builtin command in Maple, it will be better to use than my code which might still fail for some cases I did not think of.

Maple 2023

First 53 54 55 56 57 58 59 Last Page 55 of 201