Christopher2222

5785 Reputation

24 Badges

16 years, 348 days

MaplePrimes Activity


These are answers submitted by Christopher2222

I'm guessing he wants to input any integer then have Maple tell you if it's even or odd.

You could do something like this

EvenOrOdd:=proc(a::integer)
  if a mod 2 =0 then
    print("even integer"):
  else
    print("odd integer"):
  end if:
end proc:

EvenOrOdd(9)
 "odd integer"

EvenOrOdd(338)
 "even integer"

Do you mean like this?

a := zip(`=`, [coeffs(lhs(eq)-rhs(eq), [x, y], 't')], [seq(0, i = 1 .. nops([t]))])

for i from 1 to nops(a) do
  print(a[i])
end do:

                               E z + F - P = 0
                                         2         
                             -G + D z  + A z = 0
                                            2   
                                -H + B z  = 0
                                     2       
                                C z  - M = 0

or

seq(print(a[i]), i = 1 .. nops(a))

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.

First 23 24 25 26 27 28 29 Last Page 25 of 47