Christopher2222

MaplePrimes Activity


These are answers submitted by Christopher2222

Did you use maple help to look here ?mathieu,examples 

In fact I believe gkokovidis's icon is a plot evolution of the zero-order Mathieu-Hankel function in the complex space.  With it's relation to Mathieu I'm surprised he hasn't commented, although he hasn't been commenting for a while now. 

I know it's not exactly what you want but check the examples.  The last 3 plots will be familiar to the stability diagram. 

Just add transparency=.5 option to either the plot or animate command

You ask a philisophical question.  If you study trillions of throws .. depends what you mean by that.  In a classical sense, you could determine exactly where it ends up what part of it ends up etc. etc by knowing most of the initial conditions, but you will never know all of them so you'll never get 100% accuracy and in essence the so called randomness appears.   Ask Heisenberg. 

 

your solution for eq's is a point at (0,0,0) you won't find a real solution with 13x-4y+9z=1

solve(eqs)
                (0,0,0)

use implicitplot3d if you want to visualize your solutions.

 

Okay luckily there's a graphical interface, I may not have figured it out otherwise.  I was lost trying to figure out the text commands and I didn't want to break my Maple. 

I used

with(LibraryTools):
Browse()

which brought up the graphical user interface.  I was able to find by looking in all the areas that were writeable and found it had written to one of them that was available in the libname call.  I deleted the file but it threw up an error, however it deleted it anyway since I couldn't find it again on restart.

Also for this problem located here http://www.mapleprimes.com/posts/36976-Isolve-Question where there was trouble we could use a similar method to find the solutions.

eq:=5*x^2+11*x*y-5*y^2=11:

seq(isolve({eq, y = k}), k = -100 .. 150) # find all integer solutions for y in the range from y=-100 to 150
                
{x = 119, y = -46}, {x = -7, y = -18}, {x = 8, y = -3}, {x = -1, y = -1}, {x = 1, y = 1}, {x = -8, y = 3}, {x = 7, y = 18}, {x = -119, y = 46}

Very nice.  It works well.

It seems the key to solving the problem is using seq in conjuntion with isolve to get all the desired values

Using our 2nd version problem

a := 6*x+8*y >= 48:
b := 6*x+2*y <=72

isolve won't give us all our solutions alone so we'll force it to find them all in the range using seq.

{seq(isolve({a, b, x > 0, y >= k, y <= k}), k = 0 .. 5)}  # isolve values in the range x>0 and 0 <= y <= 5  the { } brackets order them nicely
     
{x = 2, y = 5}, {x = 3, y = 4}, {x = 3, y = 5}, {x = 4, y = 3}, {x = 4, y = 4}, {x = 4, y = 5}, {x = 5, y = 3}, {x = 5, y = 4}, {x = 5, y = 5}, {x = 6, y = 2}, {x = 6, y = 3}, {x = 6, y = 4}, {x = 6, y = 5}, {x = 7, y = 1}, {x = 7, y = 2}, {x = 7, y = 3}, {x = 7, y = 4}, {x = 7, y = 5}, {x = 8, y = 0}, {x = 8, y = 1}, {x = 8, y = 2}, {x = 8, y = 3}, {x = 8, y = 4}, {x = 8, y = 5}, {x = 9, y = 0}, {x = 9, y = 1}, {x = 9, y = 2}, {x = 9, y = 3}, {x = 9, y = 4}, {x = 9, y = 5}, {x = 10, y = 0}, {x = 10, y = 1}, {x = 10, y = 2}, {x = 10, y = 3}, {x = 10, y = 4}, {x = 10, y = 5}, {x = 11, y = 0}, {x = 11, y = 1}, {x = 11, y = 2}, {x = 11, y = 3}, {x = 12, y = 0}

Similarily for Alec's problem from 2008 this works nicely

seq(isolve({40*a+60*b= 0, a=k}),k=0..4)        
{a = 0, b = 0}, {a = 1, b = 0}, {a = 2, b = 0}, {a = 3, b = 0}, {a = 0, b = 1}, {a = 1, b = 1}, {a = 2, b = 1}, {a = 0, b = 2}

or to order them the other way

{seq(isolve({40*a+60*b= 0, a=k}),k=0..4)}        

{  {a = 0, b = 0}, {a = 0, b = 1}, {a = 0, b = 2}, {a = 1, b = 0}, {a = 1, b = 1}, {a = 2, b = 0}, {a = 2, b = 1}, {a = 3, b = 0} }

The trick is to use k

 

It appears this issue has been brought up before and has not been resolved in newer maple versions.  Alec Mihailovs was confused by a similar result here http://www.mapleprimes.com/posts/38845-Isolve-With-Inequalities Hopefully my investigation above sheds some insight on the subject.  As for _NN~ values, it stands for non-negative and somewhat useless for my case above.  Maybe there is a better isolve proc around somewhere?

 

There is a range of possibilities.  What I understood was that 48 slices was not enough and 60 slices was too much.

7 boys could eat a minimum of 42 or max of 49
8 boys could eat 48 or 56 slices
9 boys could eat 54 or 63 slices

5 girls could eat 10 or 15,
4 - 8 or 12 etc...


So there could be 7, 8 or 9 boys. 

If 7 boys (they would all have to eat 7 slices) then there could be 1 to 5 girls.
If 8 boys (at least one would have to eat 7 slices because says 48 slices not enough) again could be 1 to 5 girls.  If all 8 ate 7 slices than there would be 1 girl and she would have to eat 2 slices.
If 9 boys (all eat 6 slices) there could be 1 or 2 girls.

The most likely answer is that there are 8 boys but still a range of 1 to 5 girls. 

All versions of Maple, Student, Personal and Professional are fully functional and do not differ in functionality.  The only difference being price and the ability to spread across multiple machines over a network.  

Is it dualaxisplot you're looking for?   

Or an array of plots side by side like this

plots:-display(Array([plot(sin(x)), plot(cos(x))]))

It is now almost 2 years later and I find it hard to believe this has not been done yet.  Where's the development on mapleprimes?  or has that come to an end?  In some ways some things are still broken, the time stamps are not accurate, the insertion of images are always inserted at the beginning.  An option to sort the original post/question by date would be helpful.

Thanks PatrickT

Yes Bibinou, your mistake was in using the solution to the polynomial example I was using.

You would use your solution to your polynomial in your subs for P as PatrickT has shown.  ie the values you come up with in your answer at (1.4).

And so for your axis of rotation you would define it as    [ [ xsol , ysol , Psol ] , [ xsol , ysol , Psol+1] ]

where you set     Psol:=subs({x=xsol,y=ysol},P)     or if you want just substitute the actual numbers

As for your error you forgot to define r[0]:=PP

 

Not exactly. 

There are a few things to consider here ... the range, the view, projection ( and I think camera - I'm not too familiar with what's available in the newer versions)

range - specifying the x and/or y range adjusts the range of what you can see in the plot window.

view - selects a portion of your selected range to view which may be larger than your selected range which would give an appearance of zoomed out. 

projection - gives the appearance of view from different perspectives.

None of these really address the situation I believe you are looking for.  The camera option in the newer versions probably address that, I don't know.  I'm pretty sure you are looking for programatical way to zoom in the graph the same way as the mouse zoom option that is available once the graph is created.

That is one thing that I don't understand sometimes in Maple.  Not every option available in the plot menu is accessable via programming.  There may be some programming tricks to get them to work.  As an example using lprint to see how to programmatically create superscripts.  However it doesn't work so well on graphs, it works almost like op does which is another trick to used sometimes to extract information from graphs.  However I have digressed ... I don't think you can scale a graph the way you want.

 

Sure that's no problem.  Sorry late replying, but in any case.  Here's two similar ways, one way below or just modify Pagan's example a bit which is much simpler which I show at the end.

The help page on plottools[rotate] provides us with a little bit of help in the last example.  From the help page it states "If the calling sequence is of the form rotate(q,alpha,[pt_3d_1,pt_3d_2]), then pt_3d_1 and pt_3d_2 define the axis of rotation."  We can define our axis wherever we want.

Just to be explicit ...  In the polynomial we are using, we first need to find the minimum, or the point where the horizontal plane is tangent to the paraboloid surface in the x-y plane (that is independent of x and y).  We find that by setting both the partial derivatives in x and y equal to zero, then solve for x and y. 

restart; gc():
with(plots): with(plottools):

P := 1 + x + x^2 - y + y^2 + x*y

The partial derivatives

a := diff(P, x);
                              a := 1 + 2 x + y
b := diff(P, y);
                              b := -1 + 2 y + x
solve( {a,b} , {x,y} )  # solving for x and y
                               {x = -1, y = 1}
subs({x = -1, y = 1}, P)  # find the value of z at the x and y point
                                       0

Hence our minimum point (or vertex of our paraboloid) is [-1,1,0] and we'll need that so we can define our axis of rotation.  From here it's just a slight modification of the last example in the plottools[rotate] help page.

PP:=plot3d(P,x=-5..5,y=-5..5,axes=box,shading=zhue) # create our plot data structure
r[0]:=PP:
a:=Pi/20: c:=1:   # the Pi/20 is for more steps in our rotation
while evalf(a-2*Pi)<0 do
  r[c]:=rotate(r[0], a, [ [-1,1,0] , [-1,1,1] ] ):  # defining our offset axis of rotation
  a:=a+Pi/20:
  c:=c+1:
end do:

display([seq(r[i],i=0..c-1)],insequence=true, orientation=[45,45],shading=zhue,axes=box):


And modifying Pagans example which is a much simpler way, just substitute in the axis of rotation we already found.

P := 1 + x + 1*x^2-1*y + 1*y^2 + 1*x*y:
Q:=plot3d(P, x = -5 .. 5, y = -5 .. 5):
T:=[seq(plottools:-rotate(Q , A, [ [ -1 ,1 , 0 ] , [ -1 , 1 , 1 ] ] ),A=0..evalf(2*Pi),evalf(Pi/20))]:

plots:-display(T,insequence=true,axes=box,labels=[x,y,z]);


 

First 24 25 26 27 28 29 30 Last Page 26 of 48