nm

11353 Reputation

20 Badges

13 years, 13 days

MaplePrimes Activity


These are replies submitted by nm

@vv 

ODE, y(x) under Int should be (probably) also rejected.

 

actually, dsolve does not reject it. So I want to be just like doslve:

dsolve(diff(y(x),x)+int(sin(y(x)),x)=x,y(x));

Same when using Int instead of int. 

It will reject it if I wrote

dsolve(diff(y(x),x)+Int(sin(y(z)),z)=x,y(x));

Error, (in dsolve) found the indeterminate function y with different arguments {y(x), y(z)}
 

@Joe Riel 

Wow., I had not idea one could do this. Much better.

But this brings up the question: Why does not Maple help pages uses this way for the examples since this will protect the names and values of these options?

Should maple help pages be changed to use forward-quotes to protect the options then?  

@acer 

Thanks. But since it seems one then needs to declare every name used in the procedure, including names of options to Maple own commands, do you really expect someone to write this

foo:= proc()	

    local p,x,y,axes,projection,orientation,scaling,none,unconstrained;

    p:=plot3d(sin(x)*cos(y),x=0..Pi,y=0..Pi,
              axes = none, projection=0.9, 
              orientation=[-30,55,0], scaling=unconstrained
              ):
    p:
end proc:

 

And now mint(foo, toggle=[13]); does indeed give no messages.

But having to now declare even Maple own options names and option values as local variable each time is not practical.

In Mathematica, all these build-in options and their values are reserved, so a user could not modify them any way (at least not explicilty).  So in Mathematica, when one writes something like

foo[]:=Module[{p},
   p=Plot3D[Sin[x]Cos[y],{x,0,Pi},{y,0,Pi},
           Axes->False,
           ViewPoint->{1, -2, 0},
           BoxRatios->{1,1,1/2}];
  p
];

The above "names" Axes, ViewPoint, BoxRatios, etc.... similar to what I used in Maple's  axes=none, etc.... all these are symbols in system context. So a user does not have to worry about them having some value before as in Maple. 

This means in Maple, if I add a new option to my plot3, or remove an option to change it. I have to remember to go edit my local declaration line and make sure it now contains the correct names each time. (add or remove from it as needed).

Is this really practical?

Mathematica does not have a mint like tool that comes with Mathematica itself, I wish it did. It can be useful.

Thanks for the mint() proc. It is useful.

 

@vv 

"When a variable is implicitely declared local, a warning message appears."

But that is my question. Why did it not appear in this

restart;
foo := proc()     
    plot(sin(x),x=-Pi..Pi)   
end proc:

 

@Carl Love 

thanks,. But the above does not really work. Compare

restart;
T0:= (x,y,m)-> 20/Pi*sum((-1)^(n+1)/n*exp( n*Pi/10*y)*sin(n*Pi/10*x), n=1..m):
plot3d(
     T0(x,y,10), x= 0..10, y= 0..10,
     scaling= unconstrained
);

With

restart;
T0:= (x,y,m)-> 20/Pi*sum((-1)^(n+1)/n*exp( n*Pi/10*y)*sin(n*Pi/10*x), n=1..m):
plot3d(
     .4*T0(x,y,10), x= 0..10, y= 0..10,
     scaling= constrained, axis[3]= [tickmarks= [2=5, 4=10]]
);

 

In Mathematica, I could simply do

 

T0[x_,y_,m_]:=20/Pi Sum[(-1)^(n+1)/n Exp[-(n Pi/10) y] Sin[(n Pi/10) x],{n,1,m}]
Plot3D[T0[x,y,10],{x,0,10},{y,0,10},PlotRange->All,
           AxesLabel->{x,y,z},
           BoxRatios->{1, 1, 0.4}]

 

 

Mathematica does all the scaling and setting of ticks, etc... unaffected.

There is no excuse that Maple plot3d after 30 years, still does not support boxRatios. A very basic requirment for 3D plotting. This is like aspect ratio but for 3D.

This is one of the main reasons I do not use Maple for 3D actually.

this seems to have been answered an explained in a different question just now by Acer:

https://www.mapleprimes.com/questions/224730-Does-Maple-Have-Immediate-Vs-Delayed

One is delayed evaluation, and one is immediate evaluation. When you do g := unapply(PDF(X, t), t);  then it is evaluated and the result of evaluation becomes the result of the function.

compare

foo:=n->int(sin(n*x),x=0..Pi);

to

foo:=unapply(int(sin(n*x),x=0..Pi),n);

I have not run your code to verify, but you can check yourself and see if same thing happens for your definitions. One should be simpler than the other.

is this Maple code? I never seen code that looks like this

 

T/(k[t]*`ℓ`) = theta

this is very hard to read code.

 

@Joe Riel 

"I haven't used latex so don't know how t pass it an expression sequence"

I do not think it is possible. Only way seems to be to make it a list or set, as in

 

restart;
expr:=alpha,beta;
latex({expr});

which gives

\left\{ \alpha,\beta \right\} 

 

@Kitonum 

This is strange. Why is Maple definition of LegenreQ different from Mathematica definition? And which is correct one? in Mathematica 

Table[LegendreQ[1/2 (-1+Sqrt[5]),x],{x,-0.9,0.9,.1}]

Gives

{-1.14911, -1.22789, -1.24773, -1.24077, -1.21708, -1.18105, 
-1.13481, -1.0794, -1.01521, -0.942108, -0.859547, -0.766484, 
-0.661245, -0.541228, -0.402302, -0.237519, -0.0339568, 0.23695, 
0.664454}

No complex numbers here. 

Mathematica definition is here Maple definition is here

Quick scan shows they refer to same function. But I am no expert in special functions.

Any one knows why Maple LegenredQ gives complex values? Which is the correct result? Mathematica or Maple? Or are these using different definitions for same name of the function?

Also notice that the solution to this ODE should be real in |x|<1. So I do not undestand getting a complex solution.

 

@ecterrab 

"Regarding the name: I understand linux handles blank spaces in filenames out-of-the-box. It is more readable in general. So unless there is a more concrete problem that you could mention, I prefer it this way."

You can ofcourse do anything you like. But the issue with spaces in file and folder names, and why it is not a good idea to use spaces in the name, is old and well known. There are many articles written about it. I just googled "spaces in filenames" and got almost half million hits. 

For example, please see what-technical-reasons-exist-for-not-using-space-characters-in-file-names  if you browse through many of the articles on this, you'll see the majority recommend against using white spaces in file names.

For readability, "Physics_Updates.maple" is just as readable, if not more, than "Physics updates.maple" and avoids all the problems.

Again, it was a suggestion.  I myself avoid spaces in file and folder names all the time. They are simply not needed and can cause problems.

 

@ecterrab 

Thanks,. You are correct, PackageTools:-ListInstalledPackages() does Not show the Physics package. This explains the error.

 

That is a good command to know about. WIll wait to try it again after next Maple update.

 

 

@ecterrab 

I must be doing something wrong. I copied your command as is, but it is saying that 

     Error, (in PackageTools:-GetProperty) package Physics Updates.maple not found

Here is screen shot


  

But I know I have installed this package. Here is screen shot

 

What did I do wrong? 

 

@ecterrab 

Thanks. A small suggestion on namings. It is not a good idea to have spaces in files names. For example

    PackageTools : -GetProperty("Physics Updates.maple", version);

The file name above have a space. It would be better to use underscore as in "Physics_Updates.maple". Or just "PhysicsUpdates.maple".

White Spaces in file names and folder names is not recommended and can cause problems when using the command line or on OS's such as Linux and care will be needed in working with file that have spaces in their names.

@ThU 

I have activatived initially. Then my student status was verified, and I activated again OK.

Still the problem exist, and now with Maple 2018. Once I turn off my internet, I am not able to start Maple, as it tells me it needs to activate. 

I close Maple. Connect to the internet, then open Maple again, and now it works.

This is ridiculous desktop software that requires one to be connected to the internet to use it. What if I lose my internet access or I wish not to be connected to the net? I can't use software I paid for becuase I have no internet access?

 

 

@Rouben Rostamian  

I tried this ODE in Maple 2018, it still can't solve it. I get

 

restart;
pde := diff(u(x,t),t) + u(x,t)* diff(u(x,t),x) = 0;
ic :=u(x,0) = PIECEWISE([0,x<=0],[1,x>0]);
pdsolve([pde,ic],u(x,t));

 

 

First 69 70 71 72 73 74 75 Last Page 71 of 91