Carl Love

Carl Love

28055 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@DaGu Your example is not clear enough. Please refine the example by using distinct numbers with more digits. There's no need to to include the index numbers (e.g., IntsR[3]=...). That just clutters it and occludes understanding.

Okay, I get it. So, if it were ordinary gravity, then the denominator of the component force formula would have exponent 3/2, right?

I think that the denominator of the component-of-force expression needs to have a square root in the denominator. Without the square root it will still be interesting, because it corresponds to the usual gravity; but I don't think that it corresponds to the "gravity" defined by the first expression.

@shatha No, I didn't receive it. My email address is

carl dot j dot love at gmail dot com

@berkeliox It looks like you may be trying to numerically solve an initial-value problem (IVP), particularly a system of three differential equations, and plot the three solution curves. Rather than trying to rehabilitate your code, it may be quicker for us to show you how to solve the system using Maple's stock commands for that purpose. To do that, we'd need to see the differential equations.

@acer I just noticed that the original Question contains the plaintext of the code. It isn't formatted, but at least it's there.

@berkeliox There are many problems with your code. Acer was only correcting the error that generated the error message that you originally presented.

The most-obvious problem to me is that i has no meaning outside of the for loops for which it is the index. In particular, it has no meaning in the plot command.

@Elisha Your code can't possibly be correct because you re-use the variable f, and you even use it recursively (occuring in the same assignment in which it is defined).

Unless your purpose is to learn about RK4, there's absolutely no reason for you to write code to do it. You stated earlier that your purpose was something other than learning about RK4. Even if you do have good reason to use RK4, there's still no reason to write code to do it because it's already part of dsolve.

I asked you to post your differential equations, initial conditions, and parameter values in plain mathematical form. I can't help you until to do that.

 

I saw the Question. Perhaps it was deleted by the same person who posted it. It was obviously a pair of homework problems posted in exactly the same form as the professor had assigned it. Perhaps the student decided that such plagiarism was wrong, or dangerous, and decided to delete it.

@shatha Did you receive the email that I sent to you? If so, then simply reply to that email.

@brian bovril A formula for counting partitions of fixed block sizes is

PartCount:= (B::list(posint))-> mul(binomial~(ListTools:-PartialSums(B),B))/mul(rhs~(Statistics:-Tally(B))!~):     
The number of partitions of a set of size 14 into 7 blocks of size 2:
PartCount([2$7]);
                             135135
The number of partitions of it into 5 blocks with the sizes as even as possible:
PartCount([3$4, 2]);
                            1401400

I just derived the formula from fundamental counting principles. I don't know if there's a more-efficient form for it. A recursive form may be more efficient computationally.

 

@brian bovril You haven't set up the distance matrix correctly. In the paper, read very carefully the first two sentences after the graph on page 43. Note how the main diagonal entries are defined differently. This means that in your Maple Matrix, the first superdiagonal is completely wrong. The main diagonal from the paper should become the first row of your Maple Matrix. This being a real-world problem, there can be no violations of the triangle inequality.

I'm convinced that both problems can be easily solved in Maple by exhaustive search. Use Iterator:-SetPartitionFixedSize to step through the partitions. For the first problem, use 7 blocks of size 2. There are only 135,135 such partitions. For the second problem, use 4 blocks of size 3 and 1 block of size 2. There are only 1,401,400 such partitions. For each block of size 3, there are 3 permutations to check (because reversing a permutation must give the same distance). But there are many repeats of the size-3 blocks! There are only 364 possible 3-blocks. For each of these, find the min of its 3 permutations and store this in a remember table.

So I expect the first problem to take about 10 lines of Maple code, and the second problem about 15. I'll be able to work on this after I sleep some.

@vv If the partitions are generated using Iterator:-SetPartitions and processed one at a time, then the memory usage will be trivial. I'd guess that once that memory issue is addressed, processing 28 million partitions wouldn't take an unreasonable amount of time. However, I haven't had a chance to try this yet.

Since the distance matrix violates the triangle inequality, yet the distances are so precisely specified (all to 3 significant digits), I wonder where this problem comes from.

Also, would you please state the problem in (mathematical) English rather than just showing Maple commands?

@shatha Yes, let's ignore the case of resonance for now. It's just as unlikely to happen as the coefficient matrix A being singular.

As you can see above, your pictures didn't come through. I'm going to send you a private email so that you can reply and send me the pictures directly.

First 360 361 362 363 364 365 366 Last Page 362 of 709