lcz

145 Reputation

6 Badges

1 years, 101 days

MaplePrimes Activity


These are replies submitted by lcz

@dantopa   When we use the following code, we will get the right output. The example from vv.

I post  another problem of ChromaticNumber in the link below. 

 https://www.mapleprimes.com/questions/229567-Bug-Of-ChromaticNumber

graphsof4c := [NonIsomorphicGraphs(4, output = graphs, outputform = graph,
             restrictto=connected)]:
DrawGraph(graphsof4c [5]);
ChromaticNumber(graphsof4c[5])

 

@tomleslie Thanks and maybe you are right. I still not know  immanent cause.

@Carl Love  Extremely grateful

@Carl Love  Thank you very much!  Unfortunately,I am not still familiar for creating  Array inside loop.  I have a question :  How to save these graphs  based on  using  iterator codes rather than naive method of building lists inside loop.

.

@Carl Love  Thanks!  By testing in my computer, your codes cost 0.375 seconds .  My codes cost 0.672 seconds .

It's much better!   I read the help of  NonIsomorphicGraphs. I noticed one  option output=iterator . 

 For output=iterator a module is returned. When called as a procedure, it outputs the next graph in the sequence. The iterator output is similar to the graphs output, but the complete sequence of graphs is never actually formed, which makes this most useful when dealing with a large number of graphs.
 

 So I use output=iterator in order to avoid costing large RAM when complete sequence of graphs  is formed at once.  Sometimes it  even causes Maple  to crash.

 

@vv  Maple 2020 can do that!

@ Christopher2222  when I first use mapleprimes I don't know why my question was deleted quickly 

@ecterrab   I following your advice that input libname, we get following two sentences:

"D:/Program Files/Maple 2020/lib", "C:/Users/asus/maple/toolbox/Physics Updates/lib"

And I restart the Maple, it is OK! 

Thank you for your help

 If we use Mathematica, we will get nothing.  Maybe Mma considers difinition of limit of function.

Limit[Sin[x*Sin[1/x]]/(x*Sin[1/x]), x -> 0]

@dharr 

I just replied to  acer   with some details.  Of course, I don't know how to programmatically change the color of the string output, that seems like another problem

@acer  

More Details:

I ‘d like  to do some simulations of the three-body problem,
I found that there are some existing documents to learn. 
https://www.maplesoft.com/applications/view.aspx?SID=1663

I want to make the interface more beautiful based on this document,

One is to change the color of the title of the interface. for example to change  the color of mass  to red.

The following is part code to make the user interface.

use Maplets, Maplets:-Elements in 
  threebody := Maplet(
    Window('title'="3-Body Problem", 
      BoxLayout(
        BoxRow(
          BoxColumn('border'='true', caption="Control Panel",
            ["3-Body Problem"],
            [HorizontalGlue(), HorizontalGlue(), "Demonstration", 
                DropDownBox['DDB'](["Triangle", "Line", "Figure eight", "Demo 1", "Demo 2", "Demo 3", "Demo 4", "Demo 5"], onchange=A1), HorizontalGlue(), HorizontalGlue()],
              BoxRow(border=true, caption="Mass 1",
                GridLayout([
                  ["", "", "", "", "x", "y", "z"],
                  ["mass", TextField['m1'](width=4, value="0.5", halign=right), "    ", "position", TextField['x1'](width=4, value="0.5", halign=right), 
                                          TextField['y1'](width=4, value="0.0", halign=right),
                                          TextField['z1'](width=4, value="0.0", halign=right)], 
                  ["", "", "","velosity", TextField['vx1'](width=4, value="0.0", halign=right), 
                                          TextField['vy1'](width=4, value="0.2", halign=right), 
                                          TextField['vz1'](width=4, value="-0.2", halign=right)]
                ])
               ), 
              BoxRow(border=true, caption="Mass 2",
                 GridLayout([ 
                  ["", "", "", "", "x", "y", "z"],
                  ["mass", TextField['m2'](width=4, value="0.8", halign=right), "    ", "position", TextField['x2'](width=4, value="0.0", halign=right), 
                             TextField['y2'](width=4, value="0.5", halign=right), 
                             TextField['z2'](width=4, value="0.0", halign=right)], 
                   ["", "", "", "velosity", TextField['vx2'](width=4, value="0.3", halign=right), 
                             TextField['vy2'](width=4, value="0.0", halign=right), 
                             TextField['vz2'](width=4, value="0.0", halign=right)]
                 ])
              ),
              BoxRow(border=true, caption="Mass 3", 
                 GridLayout([
                   ["", "", "", "", "x", "y", "z"],
                   ["mass", TextField['m3'](width=4, value="0.7", halign=right), "    ", "position", TextField['x3'](width=4, value="0.0", halign=right), 
                             TextField['y3'](width=4, value="0.0", halign=right), 
                             TextField['z3'](width=4, value="0.5", halign=right)],
                    ["", "", "", "velosity", TextField['vx3'](width=4, value="-0.1", halign=right), 
                             TextField['vy3'](width=4, value="0.1", halign=right), 
                             TextField['vz3'](width=4, value="0.1", halign=right)]
                 ])
              ),
             [Button("Start",  onclick=A2),
             Button("Quit", Shutdown()), " continuous", CheckBox[CYCLIC](value=true,
               onchange=SetOption(target=PLOT, `option`=continuous, Argument(CYCLIC)))],
            [Button("|<",SetOption(PLOT(to_start)=true)),
             Button("<",SetOption(PLOT(frame_backwards)=true)),
             Button("Play",SetOption(PLOT(play)=true)),
             Button("||",SetOption(PLOT(pause)=true)),
             Button("Stop",SetOption(PLOT(`stop`)=true)),
             Button(">",SetOption(PLOT(frame_forward)=true)),
             Button(">|",SetOption(PLOT(to_end)=true))
            ]
          ),
          BoxColumn(border=true, caption="3D View",
            Plotter['PLOT']()
          )
        )
      )
    ),
#    Action[A1](Evaluate(PLOT='demo_calc()', waitforresult='false'),
    Action[A1](Evaluate(PLOT='demo_calc()'),
               SetOption(PLOT(play)=true)),
#    Action[A2](Evaluate(PLOT='my_calc()', waitforresult='false'),
    Action[A2](Evaluate(PLOT='my_calc()'),
               SetOption(PLOT(play)=true))
  ):
end use:
Maplets:-Display(threebody);

we run the above code, the following output will come out.

 

3_Body_Problem_part_code_for_user_interface.mw

3body.mw

 

 

@Kitonum   Thank you! 

@Carl Love  Dear Carl Love, someone gave a proof, I think it is correct. See this:

https://math.stackexchange.com/questions/3595346/how-to-prove-it-strictly-greater-than-0

@阿克塞尔·沃格特 

You are right, but I think we can consider the closure of that domain first and then the open domain. May be wrong.

@Carl Love  you are right

And actually my original question is to prove that the function is greater than 0.I think we can think about containing boundary  first . If the minimum value is 0, in open domain we can know lower bound is 0.

1 2 3 4 Page 1 of 4