nm

11353 Reputation

20 Badges

13 years, 14 days

MaplePrimes Activity


These are replies submitted by nm

@tomleslie 

thanks but It does not work for me on Maple 2020 on windows 10

a:=[parse(readline( "data.csv"))];

Error, incorrect syntax in parse: unexpected number (near 27th character of parsed string)
 

data.csv is 

 

 

@tomleslie 

thanks for the try. But I can't modify or edit the input files. There have to remain as is, used in other places and generated before and there are 1000's of them. 

@tomleslie 

Sorry, I meant to write "worksheet mode". I never use document mode. I was tried and wrote the wrong one.

Worksheet mode with 1D for input (i.e. classical Maple) and 2D for output.

@ecterrab 

"that this integral is uncomputable; "

Yes, that is correct. This problem is from the book  Handbook of first order partial differential equations, Volume 1, by Polyanin, Zaitsev, Moussiaux (2002).

This is problem  2.6.1.12  at page 38

The book gives only the principal integral to each pde. The the principal integral for this PDE is

So the general solution is an arbitrary function of the above principal integral. The integral can be left unevaluated since it has no antiderivative. This is how the book gives solutions to all the PDE's in this chapter. Here is from the introduction

And in general, Maple does a good job in finding the principal integral for many PDE's and gives solutions as arbitrary function of it, when it can't compute it. Actually the PDE right after this one from the same page, problem 2.6.1.13 Maple solves that way:

And this is what Maple gives for the above

restart;
pde := x*diff(w(x,y),x)+(a*sin(lambda*x)^m*y^2 + k*y + a*b^2*x^(2*k)*sin(lambda*x)^m)*diff(w(x,y),y) = 0;
timelimit(60*10,CodeTools[Usage(assign('sol',pdsolve(pde,w(x,y))),output='realtime'));

Which is the general solution as an arbitrary function of the principal integral. So even though the above integral is not computable, this is the correct solution and can be left as is.

For some reason, for problem 12, it could not find the principal integral as shown in the book.  Otherwise, Maple would have solved this also.

 

@ecterrab 

Thank you for the quick fix. I verified it does not hange any more and now it times out OK:

@Carl Love 

Yes, This worked. Strange that help under readline() does not even mention this.

In other languages, what happens is that when main() returns, all files are automatically closed.

#include <stdio.h>
int main ()  {
    FILE* file = fopen("input.txt", "r");
    return 0;
}

So I was mapping the call to main as the call to a proc() in Maple. Since that is the closest I had to compare with even if they are not exactly the same. 

But issue resolved for me.

Thanks

 

@Samir Khan 

" By the way, Maple 2020's new LaTeX export is better."  Yes, it is better for this example, but it is still does not produce nice latex for basic operations. Consider

expr:=-1/x + 6;

Maple produces

latex(expr);

         -{x}^{-1}+6

Which when compiled looks like

For some reason Maple does not use \frac here. Compare to Mathematica:

expr = -1/x + 6;
TeXForm[expr]

             6-\frac{1}{x}

Which compiles as

Which is better and the ideal output.

I see some bugs are fixed in Maple Latex which is good. But it will be great if the above can also be fixed in Maple 2020.1? as it affects many places.

It seems to me this should not take too much effort or time to fix, but I would not know for sure because I do not know how the latex conversion is implemented inside Maple. If Maple could make the latex conversion code public, that will allow others to help improve it which will  benefit everyone.

btw, adding

_LatexSmallFractionConstant:=0;

has no effect on this. Same latex is generated.

Thank you

 

@Samir Khan

First, thanks for the release.

But if you could allocate your valuable time and resources to improving the Maple debugger to make it easier to use (as with Matlab's debugger), that would benefit many more people

https://www.mapleprimes.com/posts/209233-Why-No-Improvements-Made-To-Maple-Debugger

 

 

 

 

 

 

 

 

 

 

@Kitonum 

"Do you understand it? " No. some background: That is why I wanted to use Maple to check. In

F is meant to be what is called first integral, which is constant. Here is from the textbook

 

So I was trying to see what the computer will give for n=2 system using dsolve to find F(x_1,x_2). I was little surprised by Mathematica result, so wanted to use Maple to check. btw, I tried pdsolve and got same error.

pde:=D[1](F)(x(t),y(t))*diff(x(t),t)+D[2](F)(x(t),y(t))*diff(y(t),t)=0;
pdsolve(pde,F(x(t),y(t)))

(In Mathematica, there is no pdsolve, as dsolve solves both ode's and pde's).

 

 

 

 

 

 

@Kitonum 

 

I am still getting an error

dsolve(diff(F(x(t),y(t)),t)=0)

Error, (in dsolve) Required a specification of the indeterminate function

dsolve(diff(F(x(t),y(t)),t)=0,F(x(t),y(t)))

Error, (in dsolve) expected the indeterminate function as, say, F(x) where x is of type "name" - and also cannot be a procedure name. Received: [F(x(t), y(t))]

I also do not see difference in result or applying what I had, which is

           D[1](F)(x(t),y(t))*diff(x(t),t)+D[2](F)(x(t),y(t))*diff(y(t),t)=0;

And your (much shorter way of writing the above)

          diff(F(x(t),y(t)),t)=0 

as far how to use it in dsolve to obtain same solution as Mathematica gives?

 

@Carl Love 

"Is it proper to have a boundary condition with a differential order the same as the highest differential order of the same independent variable as appears in the PDE?"

Correct, It is not proper. That is why I said the PDE is not well posed. Someone wrote this PDE on different forum.

Mathematica does not solve it. I was just wondering what Maple will do with it, that is all. I did not expect to get a solution. It would be better not to give a solution than give wrong one.

Thanks

I do not use 2D at all in Maple. It is horrible.

But  are these multiplication sign there between the "d" and the "T" in  d.T/dt.(t)  (those small dots there in between?)  

If you write Maple using the normal Maple language (i.e. plain 1D text) then one can see the actual code, not try to guess what is hidden behind the 2D letters.

When you write Maple for long code, you have to use plain text editor and have to use Plain text code as normal worksheet are not the right place for large programs in Maple. So the sooner you learn to use normal Maple 1D code the better it is.

 

@28th 

You are right. You can tell it to use assumptions by using 'useassumptions'=true but then it does not find the positive solution, it returns empty solution. with no assumptions it finds only the negative solution. I do not know why. so I deleted my answer.

@Christopher2222 

thanks for checking. Yes, no issues in 2019 or 2019.1. This problem just started few days ago after upgrading to 2019.2. It also fails in document mode.

@acer 

 

All what I said  is that using identity, it is possible to simplify the specific example you showed to zero. That is all. I was not saying it will solve any general other relations you might have.

But I deleted it, as it is not needed.  No problem.

 

 

First 58 59 60 61 62 63 64 Last Page 60 of 91