Carl Love

Carl Love

28055 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@Carl Love I just posted a complete solution to this problem in the Posts section. My solution was elaborate enough, generic enough, and didactic enough that it seemed to warrant being put in Posts.

@eggoodaire Let me know if you need help putting those commands together. Please post if you work it out on your own!

Your Question doesn't make much sense to me, because if a list is sorted, and you remove some elements, then the remaining elements are still sorted! And why would you eliminate 0 elements 19 times?

@torabi Yes, I easily achieved that plot. I thought that you'd not be happy with the singularity, so I just said that there were "convergence issues". Since the interval is much smaller than a single period of your voltage function, it seems strange to me.

@primogen The derivative wrt a function can be computed by Physics:-Fundiff:

Physics:-Fundiff~(SimplifiedMassMatrixDot, theta[1](t))

Why are you using [diff] instead of diff? Not that there's anything wrong with [diff], but I'm curious Why do you find the the extra brackets useful? 

@yonasmibi Thanks. Both your transcription of the formulas into your code and my interpretation of your transcription were correct. We were simply confused because in English the word "rabbit" begins with letter R, which is used instead for the foxes in your model.

I will post a corrected procedure shortly.

@primogen When you save a Maple worksheet, it pretty much only saves what is needed to display what's on your screen. It doesn't save anything that you've obscured with the output-suppressing colon. So, you usually can't send that worksheet to someone else and say "See, that command didn't work. Please diagnose what I'm doing wrong," unless it's something trivial that can be diagnosed just by looking at the input.

Check out Acer's worksheet also. He achieved a substantial simplification of your Matrix using commands combine and simplify

@tomleslie It must be that R is the foxes and K is the rabbits. The letters might come from another language. The equilibrium is K = a/b,  R = c/b/e. With the given parameter values, that's 200 and 15.

@primogen How can you know whether the command worked or not without looking at its output? Your most-recent worksheet indicates that you didn't look in the Matrix dMM_t, and I see no error message.

@JackLe Acer has shown the use of the official transpose operator: (...)^%T , which can be used with official Matrices and Vectors. It can also be (...)^+

@primogen I'm surprised, but maybe it's a version difference. It worked in my Maple 2018. I see that you're using Maple 2017. Try

dMM_t:= diff~(MM_t, t);

Putting a tilde after any operator makes it elementwise, but many commands are automatically elementwise, such as, apparently Maple 2018's diff.

If that doesn't work, post the executed worksheet showing the contents of MassMatrix.

What you call "assignments" above are actually just equations, although I see that you tried to use the assignment operator := in your worksheet. That's not allowed. Just use =. They won't be used automatically. You can apply specific simplifications with the simplify command at the point where they're needed. But let's deal with that later, after the diff is fixed. Just the generic simplify would probably handle this case anyway.

Could you post the recurrence equations and the initial conditions? I think that you either switched the roles of K and R somewhere or that you switched a plus/minus sign somewhere. I say this because after I corrected your program above, I still can't get convergence to an equilibrium (other than [0,0]) for any initial conditions that I try.

@primogen Your Matrix actually contains theta[1], ..., theta[4]. I could give you a subs command that handled every theta, but this process of making a substitution for every subexpression of a certain type is common enough that there's a separate command for it: subsindets. (It's my favorite top-level Maple command.) So,

MM_t:= subsindets(MassMatrix, specindex(theta), T-> T(t)):
dMM_t:= diff(MM_t, t):

To see what the specindex(theta) means, do

indets(MassMatrix, specindex(theta));

It's the set of all indexed forms of theta that occur in the matrix. The T-> T(t) explains what to substitute for each element of that set. The specindex(theta) is not itself a command; it's something called a type

@primogen Yes, you can differentiate a matrix. Indeed, any operation can be applied elementwise to all of the elements in a container (such as a Matrix).

I haven't looked at your worksheet yet.

@Earl Thanks, I'm well known for coming up with the explanation that is best for each individual student. Though, of course, this works better in person. The technique that I used is called "logarithmic differentiation", and you should be able to look that up either online or in a textbook. It can be used for a variety of other complicated expressions as well as a(x)^b(x).

First 300 301 302 303 304 305 306 Last Page 302 of 709