Carl Love

Carl Love

28100 Reputation

25 Badges

13 years, 107 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@mehdi jafari I believe that the complex aspect has nothing to do with it. If you don't use convert_to_exact= false, then it tries to use solve to solve exactly for the constants of integration. Any floats in the input equations are converted to exact rationals. This solve may fail even if the dsolve has (so far) suceeded. If you do use convert_to_exact= false, then it still uses solve to solve for the constants, but this time solve is working with floating-point coefficients and is more likely to return an answer.

@ilke I would not rule out the possibility of getting a analytic solution with numeric coefficients. The fact that dsolve did not return any answer just means that it could not get an analytic solution with exact coefficients. We already that we can get an analytic solution with symbolic constants (i.e., no initial or boundary conditions). It should be possible to solve numerically for the _C1, ..., _C4. I'll work on it.

The presence of complex numbers in the solution is not the issue.

@ilke You need to use a numeric solution such as that given by Mehdi Jafari, or an analytic solution with numeric coefficients such as I explain in an Answer below.

@rit I have no knowledge whatsoever of the matter.

@Markiyan Hirnyk 

I downloaded your worksheet and executed it in Maple 18 (build ID 922027). I obtained the same error as the OP.

What version of Maple are you using? I tried Maple 16, 17, and 18 and your "Not runnin" code worked in all three for me. Here's the plot:

Please post the objective function Eq1_new.

@nm wrote:

When you do

    bb[i]:=

without pre-allocating bb, the loop becomes inefficient as a new larger bb array has to be created each time.

This is not true in Maple. You may thinking of the case where bb is a list or a sequence. In that case, it is highly inefficient to add an entry to the end for each iteration, and the structure does indeed need to be created from scratch for each new entry.  So each new entry takes O(nops(bb)) time.

If bb is an unassigned name, then making an assignment to bb[anything] establishes bb as a hash table, for which adding entries is quite efficient (each add takes O(1) time). It is true that it is even more efficient to preallocate the memory, but the difference is very slight.

Adaptive is spelled thus. That might help with the Googling. A search on "adaptive Runge Kutta" (without quotes) turns up several relevant articles that explain the theory and show some code in other languages. You may need to translate that to Maple.

@Markiyan Hirnyk Any three points are concyclic. So if the six centers degenerate to three, no further proof of concyclicy is required.

@Markiyan Hirnyk 

It is a degerate case because P1=P6, P2=P3, and P4=P5. There are only three centers, so they are concyclic.

 

It is a challenge to do the integral accurately for even a single value of r (other than r=0). Changing the value of digits, epsilon, or Digits makes big changes in the answer, indicating that the answers are garbage.

The integral in the other Question is easy because of the strong exponential decay.

I think that some transformation will be needed for this integrand. Also I think that the interval should be split, e.g., 0..1 and 1..infinity, and then the infinite part translated to a finite interval.

I am skeptical about the Mathematica plot because of the sharp point near r=2.

@sarra

Change the line

while (x[n])<b) &(h>hmin)  

to

while x[n] < b and h > min do

No parentheses are required, `and` must be spelled out, and the word do is required.

Change display to printf, and put its argument in double quotes rather than the single quotes that you have now.

 

@acer Does setting epsilon or digits have any effect when using a NAG method? Isn't everything done in hardware floating point? Yes, I know that theoretically it could reduce the number of evaluation points, but does it actually?

@sarra Now I need to know what you intend the return value of the procedure to be. As it is, the return value will be the last computed value of y.

Assigning to the parameter y is problematic. What did you intend by that?

First 559 560 561 562 563 564 565 Last Page 561 of 709