acer

32627 Reputation

29 Badges

20 years, 45 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

restart:

S0:=sum((-1)^(n+1)/(n^2+a),n=1..infinity) assuming a>0;

   1   /
 ----- |
 1 + a |
       \
     1    /1           /1    /1   1   /     (1/2)\\
 - ------ |- I (1 + a) |- Psi|- - - I \I + a     /|
    (1/2) \2           \2    \2   2               /
   a                                               

      1    / 1   /     (1/2)\\\\     1    /1           /1    /1
    - - Psi|-- I \I + a     /||| + ------ |- I (1 + a) |- Psi|-
      2    \ 2               ///    (1/2) \2           \2    \2
                                   a                           

      1   /     (1/2)\\   1    / 1   /     (1/2)\\\\\
    - - I \I - a     /| - - Psi|-- I \I - a     /||||
      2               /   2    \ 2               ///|
                                                    /

S1:=Sum((-1)^((2*n)+1)/((2*n)^2+a),n=1..infinity);

                     infinity             
                      -----               
                       \         (2 n + 1)
                        )    (-1)         
                       /     -------------
                      -----       2       
                      n = 1    4 n  + a   

S2:=Sum((-1)^((2*n-1)+1)/((2*n-1)^2+a),n=1..infinity);

                     infinity              
                      -----                
                       \           (2 n)   
                        )      (-1)        
                       /     --------------
                      -----           2    
                      n = 1  (2 n - 1)  + a

S12:=simplify(value(S1+S2),size) assuming a>0;

          /1     (1/2)\        (1/2)          /1     (1/2)\  
  -Pi coth|- Pi a     | a + 2 a      + Pi tanh|- Pi a     | a
          \2          /                       \2          /  
  -----------------------------------------------------------
                              (3/2)                          
                           4 a       
                        
simplify(expand(convert(combine(convert(S0-S12,expln)),expln))) assuming a>0;

                               0

[edit]

SZ:=expand(combine(expand(simplify(simplify(value(S1+S2),size))))) assuming a>0;

                  1               Pi           
                 --- - ------------------------
                 2 a      (1/2)     /    (1/2)\
                       2 a      sinh\Pi a     /

simplify(expand(convert(combine(convert(S0-SZ,expln)),expln))) assuming a>0;

                               0

It may be a matter of personal preference whether SZ above is simpler as it is, or as converted to `csc` or `csch`, etc.

acer

@Markiyan Hirnyk 

Converting with parse(sprintf(..)) of a float format is one obvious way to treat individual floats (if this is in fact what the Asker wants).

The `subsindets` selection of all things of type `float` may work for this particular example where only the coefficients are to be changed. But it could be too heavy handed in other scenarios where some floats (eg, coefficients) were on target but other floats (eg. exponents) were not. Finer discrimination might be needed. But that too is pretty obvious.

@Markiyan Hirnyk 

Converting with parse(sprintf(..)) of a float format is one obvious way to treat individual floats (if this is in fact what the Asker wants).

The `subsindets` selection of all things of type `float` may work for this particular example where only the coefficients are to be changed. But it could be too heavy handed in other scenarios where some floats (eg, coefficients) were on target but other floats (eg. exponents) were not. Finer discrimination might be needed. But that too is pretty obvious.

@Blackkeeper Did you intend 'LIB'="add.dll" instead?

@Blackkeeper How exactly did you create wave.dll? It would be most helpful if you could give the commandline (cygwin?) set of commands you used to build it.

Is the symbol `play` exported from wave.dll? Does that symbol (name) have any decorations (due to C++)?

Your C++ source code has omissions. Some of the includes got wiped out, due to misinterpretation by mapleprimes of the angle-brackets, I suspect.

Carl, did you intend to add the option to disable adaptive plotting, so as to strictly enforce the numpoints value?

If not, then as written the code took my Win7 16.02 about 35sec, and produced about 125000 value points. There's nothing wrong with that many points per se (if that's what you wanted), but it does become an example which can be sped up. If it's as intended then I wouldn't mind adding it as an example in a post I'm working on...

acer

Before any other considerations: it should be wave(filename) from within Maple.

acer

Thank you, gentlemen. This looks like just what I wanted. I ought to have gotten there by myself, sorry.

acer

Thank you, gentlemen. This looks like just what I wanted. I ought to have gotten there by myself, sorry.

acer

@J4James It makes little difference to the use of the magnifying procedure. It just plots expressions (or unevaluated function calls).

It doesn't matter whether the things to be plotted came from an IVP or a BVP problem. Those distinctions are just part of getting something that can be plotted in the first place. The case of a BVP with parameters can be done by calling dsolve/numeric for each value of the parameter (since, unlike IVPs,  BVPs are not supported by the special functionality of dsolve/parameters which calls dsolve/numeric just once up front). But this is all just usual details of dsolve/numeric, and is mostly unrelated to plotting the returned procedures themselves.

 

It does need some fiddling to get the placement of the magnification window right, but that could be automated. Or the code could be changed to allow one to specify the subwindow's position (and work out its own offsets itself, internally).

magbvpparam.mw

@J4James It makes little difference to the use of the magnifying procedure. It just plots expressions (or unevaluated function calls).

It doesn't matter whether the things to be plotted came from an IVP or a BVP problem. Those distinctions are just part of getting something that can be plotted in the first place. The case of a BVP with parameters can be done by calling dsolve/numeric for each value of the parameter (since, unlike IVPs,  BVPs are not supported by the special functionality of dsolve/parameters which calls dsolve/numeric just once up front). But this is all just usual details of dsolve/numeric, and is mostly unrelated to plotting the returned procedures themselves.

 

It does need some fiddling to get the placement of the magnification window right, but that could be automated. Or the code could be changed to allow one to specify the subwindow's position (and work out its own offsets itself, internally).

magbvpparam.mw

@J4James The first plot produced by the worksheet attached to this Comment looks like so, using the parameter values and IVP you suggested,

I made some adjustments/corrections to the code. (It runs ok for me in Maple 16.02)

magdeparam.mw

@J4James The first plot produced by the worksheet attached to this Comment looks like so, using the parameter values and IVP you suggested,

I made some adjustments/corrections to the code. (It runs ok for me in Maple 16.02)

magdeparam.mw

@J4James That shouldn't be a problem, and is likely just adjustments to accomodate multiple CURVE() & Matrices in the outer plot. Then it's bookkeeping, to get the corners of the magnification window.

I'm not sure when I can get  time, as there is fresh snow and tobogganing with the kids to do. Hopefully in an evening, if nobody else does it first.

@J4James That shouldn't be a problem, and is likely just adjustments to accomodate multiple CURVE() & Matrices in the outer plot. Then it's bookkeeping, to get the corners of the magnification window.

I'm not sure when I can get  time, as there is fresh snow and tobogganing with the kids to do. Hopefully in an evening, if nobody else does it first.

First 386 387 388 389 390 391 392 Last Page 388 of 597