Carl Love

Carl Love

28050 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@JAMET PP was created with results from fsolve. Thus its coordinates are decimal numbers (aka "floats"). But ic1 is created with exact arithmetic. No floats would ever exactly satisfy its equation.

You have been editing this Question to the point of unanswerability. Stop. Add material rather than removing it.

First, this is a Question, not a Post. Don't put it in the Post section.

Second, your original Question was about a BVP with a delay. Maple doesn't handle those, hence the Reply that you received. Your removal of the original equations has made that Reply seem out of place. That's not fair. In other words, it's not fair to change your Question to such an extent that it makes someone else's response---which was originally relevant---seem irrelevant or like a non sequitur.

Third, you next Question removed the delay, but now you got the error "initial Newton iteration not converging." This is a common problem with BVPs, especially those of the boundary-layer variety, as yours is. That Question had enough information to be Answered; all the equations were there.

Finally, in its current state, your Question has no equations and no attached worksheet. As such, it's nearly impossible to Answer. Yes, I could direct you to the help page on "continuation parameters" for BVPs, which is usually the first step to solving this convergence error, but there are usually a few tricky steps to it.

@Steven_Huang At this point, your Question has no attached file, nor any inline code or equations.

@vs140580 Here is a summary of my understanding of your new "equality rule" (perhaps better called an "equivalence relation") that you want to implement, which I am recalling from memory of a single reading of the PDF that was  attached to your recently deleted Question. Please let me know if this is correct.

  1. Given: Matrices A and B. If one has fewer columns than the other, then that one is padded on the right with columns of zeroes. The number of rows of the matrices is irrelevant (could be the same or different).
     
  2. Given rows R1 of A and R2 of B, the rows are considered to be equivalent if and only if R1[2..-2] is a cyclic permutation of R2[2..-2]; the first and last entries of the rows are irrelevant.

    I am unsure about the following; please clarify: The permutation can be any cyclic permutation; it need not be a cyclic permutation of a single step. For example, R1 = [0, 1, 2, 3, 4, 0] and R2 = [0, 3, 4, 1, 2, 0] are equivalent.
     
  3. As before, A and are to be considered equivalent if and only if every row of A is equivalent to some row of B   AND   every row of B is equivalent to some row of A.
     
  4. As before, you'd also like a set of pairs of integers (a,b) such that A[a] is equivalent to B[b]. (Note that when a matrix is given a single index, that's a row selection.) Thus, we are essentially constructing a bipartite graph matching the rows of A to those of B. The equivalence of A and is the same as that graph having no isolated (i.e., degree-0) vertices.

Considering this and several of your previous Questions, it seems that you have numerous problems that fit the outline (1--4) given above with the only difference being point 2---the conditions that determine row equivalence. Is that correct?

@vs140580 If you wanted the row numbers, then you should've said so in the first place. I need to go to bed now. I'll work on the row numbers when I wake up. But, it'll be much much more complicated than the code I already gave.

@vs140580 
It returns true if and only if

  • for every row R1 of A there exists a row R2 of such that R1 "equals" R2 using the definition of equality of rows that you gave

        AND

  • for every row R2 of B there exists a row R1 of A such that R1 "equals" R2 using the definition of equality of rows that you gave;

otherwise, it returns false.  

@angelisasking I don't know HPM well enough to provide much help. I looked at your worksheet, and I wonder why you think that there's something wrong with it? The differences seem quite small compared to the magnitudes of the functions being approximated. In other words, what we call the relative error (|true value minus approximate value|/|true value|) is small, especially considering that you're using series of very low degree (4).

On the other hand, perhaps there is something wrong with your worksheet that would be obvious to someone who knows HPM which I missed.

A reasonable test of the accuracy would be to increase the number of terms in the series and see if the error gets smaller.

@MANUTTM What do the independent variables ySr, and g represent? I'm puzzled by the recent appearance of g, which seems to be an independent variable of D (demand) only? Do you have a way to compute D(g, Sr) for any feasible g and Sr

@wswain You wrote:

  • I am not sure why when I tried to change the execution group to Maple Input (with F5 and by the pull down) and it kept responding as in 2-D mode even though it said "maple input" in the bar.

I've noticed that myself in Maple 2022. I don't know whether it's a bug or it's supposed to work that way; nor do I know when, if ever, that changed.

@acer Thank you. When I checked, it was listed (with dead links) in Recent Posts and Active Conversations, but not in Recent Questions. It seems to take an inordinate amount of time for that update to happen.

@Rouben Rostamian  Although what you posted is not a complete Answer, it's almost an Answer, and it's all in the right direction towards getting a complete Answer. So, your significant quantity of work is appreciated and deserves a vote up.

@vv Amazing, but how did you find and its argument? 

Why are you using a finite-difference derivative approximation? And with such a large value of delta (0.01) at that? If there's some reason why you can't use a regular derivative, that may explain why fsolve is not working. fsolve might work with a lower value of Digits, say 5 or 6. The default in Maple is Digits = 10, so there's a good chance that's also the default in Maple Flow.

@mmcdara In Maple 2022, I tried your Student[Statistics]:-Sample command and numerous variations. They either returned hfloat results identical to Statistics:-Sample, meaningless results (e.g., when using Binomial(100, 3/10)), or some indication that the input wasn't understood (e.g., when using BinomialRandomVariable(100, 0.3)).

It would be nice if there was a nicer way than trunc to get Sample to return integers for integer distributions.

@pointerbender As to the reason that it helps, note that vv's idea is a standard trick for proving summation formulas by mathematical induction. As in
 

restart:

#Use mathematical induction to prove this:
S:= n-> Sum(k, k= 1..n) = n*(n+1)/2:
S(n);

Sum(k, k = 1 .. n) = (1/2)*n*(n+1)

#Base case:
S(1);

Sum(k, k = 1 .. 1) = 1

#Inductive case:
S(n+1) - S(n) = n+1;

(Sum(k, k = 1 .. n+1)-(Sum(k, k = 1 .. n)) = (1/2)*(n+1)*(n+2)-(1/2)*n*(n+1)) = n+1

simplify(%);

(Sum(k, k = n+1 .. n+1) = n+1) = n+1

 

Download SumInduction.mw

Note that I've only used the inert command Sum rather than its active form sum. So the proof is making no use of the fact that Maple's sum already knows the formula that we're trying to prove, which of course wouldn't be fair.

First 82 83 84 85 86 87 88 Last Page 84 of 709