lcz

1029 Reputation

11 Badges

5 years, 289 days
changsha, China

MaplePrimes Activity


These are replies submitted by lcz

@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.

@tomleslie  I read new update in Maple2020 it can create loop in Graph 

@Carl Love  thank you!

 You mean It's hard if I want to prove it strictly by traditional mathematical proof.   In your reply, I care deeply about this sentence It's not a local minimum because a=0 is one of the boundaries. Is that based the definition of a local solution? In other words,  locally optimal solution is always not fall on the boundary. Is there any theorem guarantee?

 

@vv   Thanks for your help !

A graph G is outerplanar if the graph formed from G by adding a new vertex, with edges connecting it to all the other vertices, is a planar graph.

that's right !

@vv 
Which function  may I  use if I want to find  more complex solutions in abs? I try:

evalf(allvalues(RootOf(abs( 1+1/3*lambda+1/18*lambda^2-1/324*lambda^3+1/1944*lambda^4-1))))

 

Furthemore If I 'd like to plot a complex function of  lambda in following inequality , How to plot?

 

solutions:=solve([abs(1+1/3*lambda+1/18*lambda^2-1/324*lambda^3+1/1944*lambda^4)-1<=0],[lambda]);
evalf(solutions)

As  we known , only retrun real value!

@vv So that's it! thanks !

@Kitonum  Thanks for your help! PS:  tikz codes:

\begin{tikzpicture}
\def \n {5}
\def \radius {3cm}
\def \margin {8} % margin in angles, depends on the radius
\foreach \s in {1,...,\n}
{
  \node[draw, circle] at ({360/\n * (\s - 1)}:\radius) {$\s$};
  \draw[-, >=latex] ({360/\n * (\s - 1)+\margin}:\radius)
    arc ({360/\n * (\s - 1)+\margin}:{360/\n * (\s)-\margin}:\radius);
}
\end{tikzpicture}

the plots may be help me a lot.

@Carl Love 

Sorry I only noticed‘’ it was fixed last year ‘’ from John May.

First 12 13 14 15 16 Page 14 of 16