nm

11353 Reputation

20 Badges

13 years, 10 days

MaplePrimes Activity


These are replies submitted by nm

@C_R 

I found the problem. Please see my update. It was the Physics package. Is same Physics package I was using on your libname also? What is your libname looks like?

By removing Physics package from libname, the problem went away. I just do not know for sure what effect this will cause on my main program. I will have to run full test to find out which will take 1-2 days.

@C_R 

Then there is something different. I am using windows 10 PRO with 128 GB, latest Maple.

Which Maple version are you using?

Here is also a movie I just made. I have nothing in my Maple .ini (I do not even use these anymore).

I have each worksheet uses its own engine. This is also after rebooting windows and from clean start of Maple. So I have no idea why it does not do the same on your PC. This is very strange. Could you try with larger timelimit? say 60 instead of 30? in some cases this can make difference.

Right-click on the movie and select OPEN IN NEW TAB to see a larger/magnified  version.

@salim-barzani 

Here is my answer that was in your deleted question that you asked for. 

worksheet below

restart;

data:=[ [P=m^2,Q=-(1+m^2),R=1],
        [P=1,Q=-(1+m^2),R=m^2],
        [P=-m^2,Q=2*m^2-1,R=1-m^2],
        [P=1,Q=2*m^2-1,R=-m^2*(1-m^2)],
        [P=1/4,Q=(m^2-2)/2,R=m^2/4],
        [P=m^2/4,Q=(m^2-2)/2,R=m^2/4]
        ]:
the_result :=Array(1..0):
the_result ,= [P,Q,R,"current ode","solution"]:
ode:=diff(F(xi),xi)^2=P*F(xi)^4+Q*F(xi)^2+R:
for item in data do
    current_ode:=limit(eval(ode,item),m=1,'left'):
    sol:=[dsolve(current_ode)]:
    the_result ,= [rhs(item[1]),rhs(item[2]),rhs(item[3]),current_ode,sol]:        
od:
the_result:=convert(the_result,listlist):
DocumentTools:-Tabulate(the_result,weights=[10,20,20,45,45],width=60):


 

Download ode_answer_oct_26_2024.mw

@salim-barzani 

I do not know what U(xi) is. I see no U(xi) anywhere. I only see G(xi).  You say 

         U(xi)=@ my mean not G(xi) i

But I do not understand what the above means. If you give one example of what U(xi) is meant to be for one the above 4 cases, may be that will help clarify what it is.

@C_R 

Thanks but this method works when the original expression happened to be all additive with no cross multiplication of terms with _C's inside each term.

I wanted it to work on any type of expression. For example given

                        e:=_C1^2+_C1+ _C1*_C2^3+a+b;

Do you agree that the output should be {_C1^2,_C1,_C2^3}  right? since these are the only such terms. But with the code you provided, it gives

e:=_C1^2+_C1+ _C1*_C2^3+a+b;
indets(e, And(symbol, suffixed(_C, nonnegint))^anything);#extract powers of
indets(e-add(%), And(symbol, suffixed(_C, nonnegint))); #remove powers of and scan for remainders
%% union %

{_C1, _C2, _C1^2, _C2^3}

I will add this example to my question. There should be a way to do this directly on the given expression without any post-processing. But not sure how now.

 

@janhardo 

Ok, so in Maple, to cancel same term on both sides of equation, we need to move all terms to one side?

Why does not Maple simplify do this automatically if it helps it simplify an equation? I think it should have simplified it without having to do this.

Teacher did not say we have to move all terms to one side to cancel the term, he just said if same term shows on both sides, then it can be removed.

But for now I will use your advanced trick in Maple to simplify equations as long as it works. Thanks.

@aroche 

Thanks Austin, FYI, it seems to affect odes of the form y'' + a *x y' + y=0. 

2*diff(y(x),x$2)+9*x*diff(y(x),x)-36*y(x)=0;
diff(y(x),x$2)-2*x*diff(y(x),x)+8*y(x)=0;
etc...

All give same internal error. 

good question. I've never seen this before as I always make sure I put * in the middle and I never use space in middle of terms (I do not use 2D). At first I thought you were using document mode (2D). 

But this happens in 1D worksheet also. I have thought that space means something other than space only when using document mode and 2D input.

It looks like Maple reads  the space followed by .   as multiplication !

This is news to me. And so it read

       1     .  0000000000000000005   

as 

     1 *   000000000000000000005

i.e, it parsed the SPACE followed by the small DOT as *

But zeros to left of the next number, mean nothing, so the above became 

   1 * 5

May be someone could explain better what is really going on. And if this is documented.

But my advice, never use space to mean multiplication. It is a horrible way to program INMHO.

Even in Mathematica, I always use * for multiplication even though there a space impliies multiplication.   Explicit is always better than implicit.

:-parse("1 . 05")

1.5

%

5

1 . 05

5

1 . 000000000005

5

:-parse("1 .000000000005")

1.5

9 . 000000000005

45

:-parse("9 . 000000000005")

9.5

 

 

Download maple_space_strange.mwmaple_space_strange.mw

is there a reason why assigned command can not be used?

The assigned function returns true if n has a value other than its own name, and returns false otherwise.

If you know all names, you could call the above on each?

But may be I misunderstood your question.

@Preben Alsholm 

Thanks for the answer. It looks I did not make myself clear. I am not asking how to add gridline to a plot. That will be a silly question from me to ask, as I can find that in help.

I am asking if a user makes arbitrary number of changes to the plot  using the menu (for example, adding grid, adding legends, changeing plot syles and many more). How to find the Maple command that can be used to generate the final plot?

This will save the user a lot of time having to lookup each option one by one and try them manually. It is much easier and faster to use the GUI to change plots options and see which one to use or not.

May be there is no such option and it is not possible. That is why I asked.

Why do you delete your question after someone answers it?

You just posted question about plot and I gave you the answer, then the question is gone.

Did you delete it? THis is the second time you did this. Here is also the worksheet you attached to your question

NULL

restart;

params := {alpha = 1, gg = .1, k = 1, mu = 10, sigma = 5, w = 2}

M := sqrt(-(gamma*(gamma*k*mu-2*k*sigma)*k/(gamma*sigma-1)+k^2)/alpha)*sinh((2*(gamma*k*(2*gamma*k*w+2*k^2+sigma^2)/(gamma*sigma-1)-2*k*sigma))*t/(gamma*sigma-1))*exp(I*((2*gamma*k*w+2*k^2+sigma^2)*t/(gamma*sigma-1)+sigma*x))/(cosh((2*(gamma*k*(2*gamma*k*w+2*k^2+sigma^2)/(gamma*sigma-1)-2*k*sigma))*t/(gamma*sigma-1))-1)

Explore(plot3d(abs(M), t = -5 .. 5, x = -10 .. 10, view = -10 .. 10, grid = [150, 150], color = [blue], style = surface, adaptmesh = false, size = [500, 500]), alpha = 0. .. 1.0, w = -5.0 .. 5.0, mu = -5.0 .. 5.0, sigma = -5.0 .. 5.0, k = -5.0 .. 5.0, placement = right)

Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct

 
 

 

Download absgraph.mw
 

One obvoius solution is c1=0,c2=0,c3=0,c4=0,c5=0 ?

Can you give exact link to page as an example?

I find Maple help pages on the web hard to read and very poor quality. They do not use mathjax for math like the rest of the world does, which makes reading things very hard.

@Carl Love 

     In the vast majority of cases, you know a priori that both sides are type numeric, and is isn't needed.

But I do not know if will be pure number like 2,3 or 4, or power like sqrt(2) or sqrt(3), etc... in the code. These represent some power values.  type(sqrt(3),numeric) gives false.

I do not want to add code to keep checking if m and n are type numeric just to avoid using is and to  just normal n<=m just to save few nano seconds.

So I think using is all the time makes the code simpler, as it works in both cases. Right?

i.e. I do not want to code like this:

restart;

n:=sqrt(3);
m:=3;

if type(n,numeric) and type(m,numeric) then
   print("checking not using is");
   if n>=m then
      print("yes");
   else
      print("no");
   fi;
else
   print("checking using is");
   if is(n>=m) then
      print("yes");
   else
      print("no");
   fi;
   
fi;

3^(1/2)

3

"checking using is"

"no"

 

 

Download check_if_is.mw

@Carl Love 

Yes, I found earlier that is works better. But thanks for confirming. I have to change all my code that uses evalb(a>=b) to is(a>=b).

Any rules of thumb when to use  if is(a<=b)  vs.  just if a<=b  or if evalb(a<=b) ?

First 10 11 12 13 14 15 16 Last Page 12 of 91