MaplePrimes Posts

MaplePrimes Posts are for sharing your experiences, techniques and opinions about Maple, MapleSim and related products, as well as general interests in math and computing.

Latest Post
  • Latest Posts Feed
  • Fridays Killer Questions 7city Learning:

    Question) You have 100 kg of berries. 99% of the weight of berries is water. Time passes and some amount of water evaporates, so our berries are now 98% water. What is the weight of berries now?

    Answer) The unexpected, yet correct, answer is 50 kg. It seems like a tiny amount of water has evaporated so how can the weight have changed that much? There is clearly 1 kg of solid matter in the...

    Consider two sets in the Euclidean plane, each consisting of 4 points.

    First set:  A(0, 0),  B(3, 4),  C(12, 4),  E(4, -1)

    Second set:  F(0, -8),  G(12, -4),  H(9, -8),  K(4, -9)

    It is easy to check that the set of all pairwise distances between the points of each of the given sets (6 numbers for each set ) are the same. At the same time it is obvious that there is no any...

    Fridays Killer Questions 7city Learning:

    Question) There are eight balls, one of which is slightly heavier than the others. You have a two-armed scale, which you are allowed to use only twice. Find the ball that’s heavier.

    Answer) Put three balls on each side of the scale. If the arms are equal, you know the heavy ball is one of the two remaining. If the arms are unequal, take the three balls on the heavier side, pick two and weigh them against each other.

    Fridays Killer Questions 7city Learning:

    Question) 
    You’re trying to get to Truthtown. You come to a fork in the road. One road leads to Truthtown (where everyone tells the truth), the other to Liartown (where everyone lies). At the fork in the road is a man from one of those towns -- but which one? You get to ask him one question to discover the way. What’s the question?

    Daniel Kahneman - Thinking Fast and Slow

    1) A bat and ball cost $1.10.
    2) The bat costs one dollar more than the ball.
    3) How much does the ball cost?

    x+y=1.1; x=cost of the bat, y=cost of the ball.
    y=x+1; substituting for y
    x+(x+1)=1.1;
    2x=0.1;
    x=0.05; the cost of the ball
    y=1.05; the cost of the bat

    The right answer is 5 cents.
    The intuitive, appealing, and wrong number is, of course 10 cents.

    dicing-with-death-chance-risk-and-health (Stephen Senn)

    Mr Brown has exactly two children. At least one of them is a boy. What is the probability
    that the other is a girl?

    What could be simpler than that? After all, the other child either is or is not a girl.
    I regularly use this example on the statistics courses I give to life scientistsworking
    in the pharmaceutical industry. They all agree that the probability is one-half.

    So they are all...

    I was thinking about the area problem, yet again, and found myself asking the question: why must we go through such elaborate means to get Maple to generate a plot of the region between two (or more curves)? I use the word elaborate to describe any process that would might become overwhelming, for, say a student, to go through to accomplish a task. Anyone with the most basic of backgrounds can understand the area problem, but yet, such an individual might not find it a trivial...

    If there is a regression in an update it should be fixed within the same version and not left as an open bug in current versions.

    Since 16.01 update is no longer available and 16.02 is the only option.  It would be very much appreciated by the mapleprimes community and maple users to see a 16.03 update.

    The following (downsized) images of Lyapunov fractals were each generated in a few seconds, in Maple 16.

     

    I may make an interface for this with embedded components, or submit it in some form on the Application Center. But I thought that I'd share this version here first.

    I'm just re-using the techniques in the code behind an earlier Post on Mandelbrot and Julia fractals. But I've only used one simple coloring scheme here, so far. I'll probably try the so-called burning ship escape-time fractal next.

     

     

     

     

    Here below is the contents of the worksheet attached at the end of this Post.

     

     

    The procedures are defined in the Startup code region of this worksheet.

     

    It should run in Maple 15 and 16, but may not work in earlier versions since it relies on a properly functioning Threads:-Task.

     

    The procedure `Lyapunov` can be called as

     

              Lyapunov(W, xa, xb, ya, yb, xresolution)

              Lyapunov(W, xa, xb, ya, yb, xresolution, numterms=N)

     

    where those parameters are,

     

     - W, a Vector or list whose entries should be only 0 or 1

     - xa, the leftmost x-point (a float, usually greater than 2.0)

     - xb, the rightmost x-point (a float, usually less than or equal to 4.0)

     - ya, the lowest y-point (a float, usually greater than 2.0)

     - yb, the highest y-point (a float, usually less than or equal to 4.0)

     - xresolution, the width in pixels of the returned image (Array)

     - numterms=N, (optional) where positive integer N is the number of terms added for the approx. Lyapunov exponent

     

     

    The speed of calculation depends on whether the Compiler  is functional and how many cores are detected. On a 4-core Intel i7 under Windows 7 the first example below had approximately the following performce in 64bit Maple 16.

     

     

    Compiled

    evalhf

    serial (1 core)

    20 seconds

    240 seconds

    parallel (4 cores)

    5 seconds

    60 seconds

     

     

     

    with(ImageTools):


    W:=[0,0,1,0,1]:
    res1:=CodeTools:-Usage( Lyapunov(W, 2.01, 4.0, 2.01, 4.0, 500) ):

    memory used=46.36MiB, alloc change=65.73MiB, cpu time=33.87s, real time=5.17s


    View(res1);


    W:=[1,1,1,1,1,1,0,0,0,0,0,0]:
    res2:=CodeTools:-Usage( Lyapunov(W, 2.5, 3.4, 3.4, 4.0, 500) ):

    memory used=30.94MiB, alloc change=0 bytes, cpu time=21.32s, real time=3.54s


    View(res2);


    W:=[1,0,1,0,1,1,0,1]:
    res3:=CodeTools:-Usage( Lyapunov(W, 2.1, 3.7, 3.1, 4.0, 500) ):

    memory used=26.18MiB, alloc change=15.09MiB, cpu time=18.44s, real time=2.95s


    View(res3);


    W:=[0,1]:
    res4:=CodeTools:-Usage( Lyapunov(W, 2.01, 4.0, 2.01, 4.0, 500) ):

    memory used=46.25MiB, alloc change=15.09MiB, cpu time=33.52s, real time=5.18s


    View(res4);

     

     

    Download lyapfractpost.mw

    Dear friends,

    every once in a while I come across an integral that Maple does not readily compute and post it here, so that your programmers may perhaps include it in the integration engine.

    I am writing today concerning the integral int(x^q/(exp(x)-1), x=0..infinity); for q a real number. Maple can do this integral for rational q but not for irrational ones, e.g. try q=14/10 vs. q=sqrt(2). I hope you can make good use of this hint. The original computation...

    Today's SMBC strip by Zach Weinersmith is a silly math joke but it was pretty much begging for implementation.

    So, here is a simple brute force Maple program to compute the Fouriest transform of an integer.

    fouriest := proc(n::posint, ob::posint:=10)
    local b,f,cap,i,rdx,fc;
    ...

    We assume that the length of a match is 1, then the perimeter of a polygon is equal to the number of matches N. If a match can be located at arbitrary angles to each other, then at a given perimeter of the area can take on any value between zero and the area of a regular polygon (for even number of matches) . For an odd number of matches the lower bound equals to the area of an equilateral triangle of side 1. For any given area within these boundaries will be infinitely many solutions.



    A set of three taped video interviews with famous physicist and mathematician Cornelius Lanczos (1893-1974) has been made available online by the University of Manchester.

    webmath.exponenta.ru

    Maple Russian site: 7.000.000 visits, 12,000 visitors per day.

    In February, I will place a new package - DeMapler.

    Several thousands of solutions of standard problems. Step by Step.

    From first order differential equations to systems of DEs.

    First 102 103 104 105 106 107 108 Last Page 104 of 307