Carl Love

Carl Love

27579 Reputation

25 Badges

12 years, 55 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

Setting Digits:= 15, all plots are identical with very smooth convergence to 0.06188 at z = 0. Since that is my default value of Digits, I didn't notice the numeric instability until Markiyan posted his plot.

I know that you said that you "do not want an analytical solution", but would your opinion change if I told you that an analytic solution was fairly simple, and fairly easy to obtain?

I am sure that what you want to do is possible, but I am not sure about the details of what you want. Could you describe it better? Does f1 call f2, or does f2 call f1? Why is the (1,2) repeated in the call to f2? Is either procedure written already?

@Adri van der Meer I had considered the one-to-many situation. I was thinking that solve should detect the one-to-one case and remove the brackets. But maybe not; perhaps they should remain because they will be expected. So here's a way to remove the brackets that can deal with either situation: just replace unapply with op@unapply.

f:= x-> piecewise(x<1, x, x-1): 
solve(f(x)=y, x):
g:= op@unapply(%, y):

g(2);
                               3
g(1/2);
                              3  1
                              -, -
                              2  2

@Adri van der Meer I had considered the one-to-many situation. I was thinking that solve should detect the one-to-one case and remove the brackets. But maybe not; perhaps they should remain because they will be expected. So here's a way to remove the brackets that can deal with either situation: just replace unapply with op@unapply.

f:= x-> piecewise(x<1, x, x-1): 
solve(f(x)=y, x):
g:= op@unapply(%, y):

g(2);
                               3
g(1/2);
                              3  1
                              -, -
                              2  2

Please don't make the titles of your Questions so long. A fine title for your Question would've been "How to neglect 1/c^n terms, n > 2?". You tend to put the entire body of your Question in the title.

@Markiyan Hirnyk I only meant for my answer to be one additional step inserted into the process that Adri already had, namely using unapply. I'm sure that that would've been obvious to Adri.

@Markiyan Hirnyk I only meant for my answer to be one additional step inserted into the process that Adri already had, namely using unapply. I'm sure that that would've been obvious to Adri.

Your Question seems incomplete. Did you mean to say more?

How about some commentary to accompany your solution? What is the significance of the 0.64 and 73? Why do the solutions only have 2 or 3 digits?

Your C is essentially -infinity, putting the sum to 0 and thereby making B irrelevant. So the solution curve is essentially a straight line through the origin, which looks like a decent fit on a plot.

I be interested to see how DataFit performs with sample data actually produced by the function.

How about some commentary to accompany your solution? What is the significance of the 0.64 and 73? Why do the solutions only have 2 or 3 digits?

Your C is essentially -infinity, putting the sum to 0 and thereby making B irrelevant. So the solution curve is essentially a straight line through the origin, which looks like a decent fit on a plot.

I be interested to see how DataFit performs with sample data actually produced by the function.

So what? That's just a basic mathematical fact.

@maplelearner 

solve(% = 0, alpha0);

                           1           1     
                  0, - ----------, ----------
                            (1/2)       (1/2)
                       (-k2)       (-k2)     


@maplelearner 

solve(% = 0, alpha0);

                           1           1     
                  0, - ----------, ----------
                            (1/2)       (1/2)
                       (-k2)       (-k2)     


@Markiyan Hirnyk Yes, I noticed. I also notice that your C is exactly 1.0, whereas mine is 0.99997. The smallest value of x is 1.0, so it makes sense that it would be 1.0. The reason that mine is 0.99997 is that z = 0.00003 is nearly the smallest positive z for which Maple will numerically evaluate the infinite sum. Unfortunately, `evalf/Sum` does not have any option equivalent to the digits or epsilon option of `evalf/Int`, so there's no way to get extra guard digits and changing Digits won't help that. This is a drawback of my method.

evalf(Sum(exp(-.00003*n^2)/n^2, n= 1..infinity));
                        1.63524093728545

evalf(Sum(exp(-.00002*n^2)/n^2, n= 1..infinity));
                    infinity                
                     -----                  
                      \        /          2\
                       )    exp\-0.00002 n /
                      /     ----------------
                     -----          2       
                     n = 1         n        

evalf(%% - Pi^2/6);
                       -0.00969312956278

First 652 653 654 655 656 657 658 Last Page 654 of 703