sand15

1673 Reputation

16 Badges

11 years, 355 days

MaplePrimes Activity


These are replies submitted by sand15

@C_R @WD0HHU

You can improve significantly the rendering while using the option shape = cylindrical_arrow in arrow commans.

I would use Explore this way My_way.mw

@acer 

But my left wrist is in a cast.
See you later, when I'm in better shape

@Alfred_F 

y=-1 then x=9^(1/3) is not rational

What does "there exist solutions (x;y)" mean? That there are ALWAYS rational solutions, whatever the values of B and D, for both equations?

A counter example:

B=2, D=1.
Then eq2 writes x^3 - y^3 = 7 and those are solutions: y = any value, x = (7+y^3)^(1/3).
Take y=1, then x=8^(1/3) is not rational.

Could you please clarify the question?

@dharr 

I'm like you, I generally prefer writting 'assumptions := ....:' and after 'something assuming assumptions:'.
Also, I never use 'assume' within a procedure... but this more because I'm not sure of what is done than because I know it's not the right thing to do.

@dharr

I had spent quite a bit of time trying to come up with a satisfying answer to @benlisp. In vain.
Here is where my thinking stood; perhaps you'll find it of some interest.
explanation_1.mw

@dharr 

We must write simplify(q-expand(q5)) to get 0... which is not very natural

@dharr 

A trick I often use would write here

q4 := convert(qrad, radical):
q5 := q3 + ``(q4)


Maybe @cm.ayache  could accept these parentheses?

@janhardo 

Sure, you can ask an AI to give you the answer, but don't you think that taking the time to figure out the solution on your own provides greater intellectual satisfaction?

For instance there are algorithms capable of solving any Sudoku puzzle: in my opinion, using them instead of racking your brain to find the solution is the same as using AI... unless the first motivation is to be the first in solving the grid

@C_R @Carl Love

Using plottools:-transform avoids searching optiùims along x and y directions:

> 

restart

> 

f := (x, y) -> exp(-x^2-y^2) + exp(-(x-1)^2-(y-1)^2)

proc (x, y) options operator, arrow; exp(-x^2-y^2)+exp(-(x-1)^2-(y-1)^2) end proc

(1)
> 

d := 2:
U := d + 0.25:  
L := -U:

MM := Optimization:-NLPSolve(f(x, y), x=-d..d, y=-d..d, maximize)[1];

Zs:= [seq](0..MM, MM/5):
Xs:= [$-2..2]:

GridLines:= plots:-display(
  CURVES(
    #horizontal gridlines:
    seq([[L, U, z],[U, U, z],[U, L, z]], z=Zs),
    #vertical gridlines:
    seq([[[x, U, 0],[x, U, MM]], [[U, x, 0],[U, x, MM]]][], x=Xs)
  )
  , color="LightGray", thickness= 1
):

1.21306131942526685

(2)
> 

p  := plot3d(f(x, y), (x,y)=~L..U, shading= zhue):

# An optimization-free construction of the upper boundary of the projection onto plane x=U

p0 := plot3d(f(x, y), (x,y)=~L..U, color="LightGray", style=surface):

x0 := plottools:-transform((x, y, z) -> [U, y, z])(p0):

x1 := op([1, 1], x0):
x2 := convert(map(i -> subsop(1=NULL, i), x1[1]), Matrix):
x2 := `<|>`( x2, seq( convert(map(i -> subsop(1=NULL, 2=NULL, i), x1[j]), Matrix), j=2..nops(x1)) ):
x3 := `<|>`( x2[..,1], < seq(max(x2[i, 2..nops(x1)+1]), i=1..nops(x1)) > ):
x4 := `<|>`( Vector(nops(x1), U), x3):

# An optimization-free construction of the upper boundary of the projection onto plane y=U

y0 := plottools:-transform((x, y, z) -> [x, U, z])(p0):

y1 := op([1, 1], y0):
y2 := convert(map(i -> subsop(1=NULL, i), x1[1]), Matrix):
y2 := `<|>`( y2, seq( convert(map(i -> subsop(1=NULL, 2=NULL, i), x1[j]), Matrix), j=2..nops(x1)) ):
y3 := `<|>`( y2[..,1], < seq(max(x2[i, 2..nops(x1)+1]), i=1..nops(x1)) > ):
y4 := `<|>`( x3[.., 1], Vector(nops(y1), U), x3[.., 2]):

# Result

plots:-display(
  p
  , GridLines
  , PLOT3D(CURVES(convert(x4, listlist), COLOR(RGB, 1, 0, 0)))
  , PLOT3D(CURVES(convert(y4, listlist), COLOR(RGB, 0, 0, 1)))
  , axes=frame
  , scaling= constrained
  , orientation= [-154, 49, 0]
  , tickmarks= [Xs$2, Zs]
  , labelfont= [HELVETICA, BOLD, 12], axesfont= [HELVETICA, BOLD, 8]
)


Download evolution_2.mw

@Carl Love 

Hi, 
The problem is that the figure the OP provides have two different interpretations.

  1. One is: draw f(x, y), f(0, x) and f(x, 0) (what you both you and @C_R  did)
  2. Another one is: draw f(x, y), the envelope of its projection onto the plane x=2, and the envelope of its projection onto the plane y=-2.

Here is a (likely non optimal) code to answer the second interpretation

Download evolution.mw

Comments are here with Maple 2015 but carriage returns are lost (easy reshaping when you have only 4 lines):

copy_comments_Maple_2015.mw

By the way, I added a comment after yours in this question

1 2 3 4 5 6 7 Last Page 1 of 44