Doug Meade

 

Doug

---------------------------------------------------------------------
Douglas B. Meade <><
Math, USC, Columbia, SC 29208 E-mail: mailto:meade@math.sc.edu
Phone: (803) 777-6183 URL: http://www.math.sc.edu

MaplePrimes Activity


These are replies submitted by Doug Meade

Unless I have miscopied something, here is your equation:

eq := 250 = 0.2577650720*10^(-13)*S^2*(0.195728608*(2*cosh(0.5268*r)-2*cosh(0.4139*r))/(0.4139*sinh(0.5268*r)+0.5268*sin(0.4139*r)) - 0.1957286808*(cosh(1.0536*r)-cosh(0.8278*r))/(0.4139*sinh(1.0536*r)+0.5268*sin(0.8278*r)));
                    -14  2 /0.195728608 (2 cosh(0.5268 r) - 2 cosh(0.4139 r))
250 = 2.577650720 10    S  |-------------------------------------------------
                           \  0.4139 sinh(0.5268 r) + 0.5268 sin(0.4139 r)   

     0.1957286808 (cosh(1.0536 r) - cosh(0.8278 r))\
   - ----------------------------------------------|
      0.4139 sinh(1.0536 r) + 0.5268 sin(0.8278 r) /

First, it's clear that there are two values of S for every value of r (unless the denominators happen to be zero). Each denominator vanishes for r=0, but not for other real values of r. To see this,

plot( [.4139*sinh(.5268*r)+.5268*sin(.4139*r),.4139*sinh(1.0536*r)+.5268*sin(.8278*r)], r=-5..5 );

You say you want to find the values of r for values of S between 1 and 10^(10). That's a large range of values for S. The very small coefficient on the RHS is more evidence that some sort of rescaling could be very helpful.

My first thought is to do a simple rescaling of S (by 10^8):

with( plots ):
eval( eq, S=s*10^8 );
implicitplot( %, r=0..10, s=0..10 );

OK. Let's try this now with the original variables, and with your range of values for S:

implicitplot( eq, r=0..10, S=1..10^(10), grid=[100,100] );

Would this be more informative as a log-log plot?

eval( eq, [S=exp(s),r=exp(R)] );
implicitplot( %, R=1..log(10), s=1..log(10^(10)), grid=[100,100] );

Hmm. What if we take another level of logs?

eval( eq, [S=exp(exp(s)),r=exp(exp(R))] );
implicitplot( %, R=1..log(log(10)), s=1..log(log(10^(10))), grid=[100,100] );

Is this helpful?

What do you want to see in the plot? What information do you want to extract from it?

Would a series expansion of the equation be of any interest? To isolate S^2 on the LHS, divide the equation by 250*S^2, and then take a reciprocal before expanding as a series in powers of r:

eq/S^2/250;
                           -17                                      
        1    2.018079949 10    (2 cosh(0.5268 r) - 2 cosh(0.4139 r))
        -- = -------------------------------------------------------
         2        0.4139 sinh(0.5268 r) + 0.5268 sin(0.4139 r)      
        S                                                           

                           -17                                  
             2.018080700 10    (cosh(1.0536 r) - cosh(0.8278 r))
           - ---------------------------------------------------
                0.4139 sinh(1.0536 r) + 0.5268 sin(0.8278 r)    
1/rhs(eq/S^2/250);
           //              -17                                      
        (1) |2.018079949 10    (2 cosh(0.5268 r) - 2 cosh(0.4139 r))
            |-------------------------------------------------------
            \     0.4139 sinh(0.5268 r) + 0.5268 sin(0.4139 r)      

                           -17                                  \
             2.018080700 10    (cosh(1.0536 r) - cosh(0.8278 r))|
           - ---------------------------------------------------|
                0.4139 sinh(1.0536 r) + 0.5268 sin(0.8278 r)    /
series( %, r );
                      23  (-1)                 20                 29  
       -5.467468562 10   r     + 1.383375022 10   + 1.258478868 10   r

                          25  2    / 3\
          - 6.368408327 10   r  + O\r /

Remember that this is the expansion for S^2.

 

The worksheet I used to create these results can be downloaded from:

View 178_plots.mw on MapleNet or Download 178_plots.mw
View file details

I hope this is helpful, and instructive,

Doug

---------------------------------------------------------------------

Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.ed

While we do need more complete information about your specific system of equations before we can give a detailed response to your question, it is safe to say that the select, remove, and selectremove commands are the most commonly used commands for extracting desired solutions from a set of more than one solution. For example:

S := [solve( x^8=1, x )];
       [                1  (1/2)   1    (1/2)  1  (1/2)   1    (1/2)  
       [-1, 1, -I, I, - - 2      - - I 2     , - 2      + - I 2     , 
       [                2          2           2          2           

           1  (1/2)   1    (1/2)  1  (1/2)   1    (1/2)]
         - - 2      + - I 2     , - 2      - - I 2     ]
           2          2           2          2         ]
remove( has, S, I );
                                   [-1, 1]
select( s->is(evalc(Re(s))>0), S );
              [   1  (1/2)   1    (1/2)  1  (1/2)   1    (1/2)]
              [1, - 2      + - I 2     , - 2      - - I 2     ]
              [   2          2           2          2         ]
selectremove( s->is(evalc(Im(s))>0), S );
        [   1  (1/2)   1    (1/2)    1  (1/2)   1    (1/2)]  
        [I, - 2      + - I 2     , - - 2      + - I 2     ], 
        [   2          2             2          2         ]  

          [             1  (1/2)   1    (1/2)  1  (1/2)   1    (1/2)]
          [-1, 1, -I, - - 2      - - I 2     , - 2      - - I 2     ]
          [             2          2           2          2         ]

The key to successful use of these commands is coming up with an appropriate Boolean test for membership in (or exclusion from) the set you are trying to create.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.ed

While we do need more complete information about your specific system of equations before we can give a detailed response to your question, it is safe to say that the select, remove, and selectremove commands are the most commonly used commands for extracting desired solutions from a set of more than one solution. For example:

S := [solve( x^8=1, x )];
       [                1  (1/2)   1    (1/2)  1  (1/2)   1    (1/2)  
       [-1, 1, -I, I, - - 2      - - I 2     , - 2      + - I 2     , 
       [                2          2           2          2           

           1  (1/2)   1    (1/2)  1  (1/2)   1    (1/2)]
         - - 2      + - I 2     , - 2      - - I 2     ]
           2          2           2          2         ]
remove( has, S, I );
                                   [-1, 1]
select( s->is(evalc(Re(s))>0), S );
              [   1  (1/2)   1    (1/2)  1  (1/2)   1    (1/2)]
              [1, - 2      + - I 2     , - 2      - - I 2     ]
              [   2          2           2          2         ]
selectremove( s->is(evalc(Im(s))>0), S );
        [   1  (1/2)   1    (1/2)    1  (1/2)   1    (1/2)]  
        [I, - 2      + - I 2     , - - 2      + - I 2     ], 
        [   2          2             2          2         ]  

          [             1  (1/2)   1    (1/2)  1  (1/2)   1    (1/2)]
          [-1, 1, -I, - - 2      - - I 2     , - 2      - - I 2     ]
          [             2          2           2          2         ]

The key to successful use of these commands is coming up with an appropriate Boolean test for membership in (or exclusion from) the set you are trying to create.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.ed

The development of maplets appears to have slowed considerably. More efforts have been directed towards embedded components.  Unfortunately, there are still many things that cannot be done with embedded components. Personally, I think I'd make more use of embedded components if I could do most of the things I can do in a maplet.

This particular example is one where there is a performance difference between maplets and embedded components - and the maplet is more powerful in the hand of a knowledgeable user.

But, I'm getting off topic and I still have too many other things that I should be doing right now.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.ed

The development of maplets appears to have slowed considerably. More efforts have been directed towards embedded components.  Unfortunately, there are still many things that cannot be done with embedded components. Personally, I think I'd make more use of embedded components if I could do most of the things I can do in a maplet.

This particular example is one where there is a performance difference between maplets and embedded components - and the maplet is more powerful in the hand of a knowledgeable user.

But, I'm getting off topic and I still have too many other things that I should be doing right now.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.ed

Thanks Robert. This is exactly what I had in mind. And, it works as requested - even in Maple 12.

It should now be possible to replace the procedure G with your 10-hour job. Of course,  you could also use the maplet to set other parameters for the problem or to display other intermediate results. Robert's contribution shows that this is possible.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.ed

Thanks Robert. This is exactly what I had in mind. And, it works as requested - even in Maple 12.

It should now be possible to replace the procedure G with your 10-hour job. Of course,  you could also use the maplet to set other parameters for the problem or to display other intermediate results. Robert's contribution shows that this is possible.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.ed

Have you thought about using a maplet?

In the maplets I have written I know I have seen delays in when certain updates are made. I always thought this was due to the processing that was being done between the times when the GUI updates were done. I know I've seen this in Maple 12.

If this is correct, I'm guessing that you could achieve your desired goal by implementing it within a maplet.

Unfortunately, right now I do not have the time to create such a maplet. If I get some time later, and before someone else does it, I'll see if I can't put together a quick demo that can be used to test this functionality.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.ed

Have you thought about using a maplet?

In the maplets I have written I know I have seen delays in when certain updates are made. I always thought this was due to the processing that was being done between the times when the GUI updates were done. I know I've seen this in Maple 12.

If this is correct, I'm guessing that you could achieve your desired goal by implementing it within a maplet.

Unfortunately, right now I do not have the time to create such a maplet. If I get some time later, and before someone else does it, I'll see if I can't put together a quick demo that can be used to test this functionality.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.ed

No. I see the same behavior as the others. With Maple 12, under WinXP, all output appears at the end. With Maple 11, one letter appears every second.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.ed

No. I see the same behavior as the others. With Maple 12, under WinXP, all output appears at the end. With Maple 11, one letter appears every second.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.ed

And, here is the worksheet that I developed to test this.

View 178_TextAreaOutputTest.mw on MapleNet or Download 178_TextAreaOutputTest.mw
View file details

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.ed

And, here is the worksheet that I developed to test this.

View 178_TextAreaOutputTest.mw on MapleNet or Download 178_TextAreaOutputTest.mw
View file details

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.ed

I am using Maple 12, in worksheet mode. You can add an embedded component to a worksheet just as easily as to a document.

For me the output appears only at the end of the loop. I've done some more testing, and it appears to me that updates are done once for each execution group. It's not the end of the function call, as the following shows (it matters not whether f3 is local to f2 or global):

f2 := proc (T) local f3, s;
  f3 := proc(TT) local t;
    use DocumentTools in
      t := time():
      while time() < t+TT do end do;
      SetProperty('TextArea0', 'value', cat(GetProperty('TextArea0', 'value'), "a "))
    end use
  end proc;
  s := time();
  while time() < s+T do f3(1) end do;
end proc:

Remember to clear the contents of the TextArea before calling f2 to make it easier to see the new output.

Now, in a single execution group, try executing (hitting enter once):

f2(2); f2(2);

and compare this to what you get if you execute the same sequence of commands in separate execution groups (hit enter twice):

f2(2);
f2(2);

You might want to clear the contents of the TextArea from time to time to make it easier to see the results.
 

I'll have to give this some more thought. But, first, I have a couple of classes to teach.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.ed

 

I am using Maple 12, in worksheet mode. You can add an embedded component to a worksheet just as easily as to a document.

For me the output appears only at the end of the loop. I've done some more testing, and it appears to me that updates are done once for each execution group. It's not the end of the function call, as the following shows (it matters not whether f3 is local to f2 or global):

f2 := proc (T) local f3, s;
  f3 := proc(TT) local t;
    use DocumentTools in
      t := time():
      while time() < t+TT do end do;
      SetProperty('TextArea0', 'value', cat(GetProperty('TextArea0', 'value'), "a "))
    end use
  end proc;
  s := time();
  while time() < s+T do f3(1) end do;
end proc:

Remember to clear the contents of the TextArea before calling f2 to make it easier to see the new output.

Now, in a single execution group, try executing (hitting enter once):

f2(2); f2(2);

and compare this to what you get if you execute the same sequence of commands in separate execution groups (hit enter twice):

f2(2);
f2(2);

You might want to clear the contents of the TextArea from time to time to make it easier to see the results.
 

I'll have to give this some more thought. But, first, I have a couple of classes to teach.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.ed

 

First 37 38 39 40 41 42 43 Last Page 39 of 76