Carl Love

Carl Love

28070 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@macmp91 So, we see that the minimal value of what you call w^2 eventually becomes negative. Why not use that as the criterion to stop your while loop? Don't take the sqrt in procedure Fn; take it afterwards.

@macmp91 Let's forget about the singular values for now. I don't know if they're appropriate for your problem. Why do you take the square root of the eigenvalues? Why not just stop your while loop when the minimal eigenvalue is negative?

@dbain1 The numerical integral is very difficult to evaluate for some values of p, such as 0.15. Your integrand looks a bit strange. Did you perhaps intend for it to be the absolute value of the expression that is to be raised to the 1/p power? If I include abs thus, there is no problem doing the numeric integration. Without abs, we end up raising negative values to fractional powers, obtaining imaginary results.

This is a topic that has been much argued on MaplePrimes. The appropriate question is How much effort (or time or expense) should be expended determing whether a given expression is identically zero when that problem is known to be in general undecidable? You may adjust that level of effort using TestZero. But no matter what you set it to, there will always be some singular matrix whose singularity can't be detected. Thus, if you call it a bug, there will necessarily always be a bug. I'd say that somthing that is mathematically impossible to fix shouldn't be called a bug. See the Wikipedia article "Richardson's Theorem" https://en.wikipedia.org/wiki/Richardson%27s_theorem

If you could provide a reference for an algorithm, I could probably implement it in Maple. I'm browsing the Wikipedia article "Forward Error Correction" https://en.wikipedia.org/wiki/Forward_error_correction, but the topic is too large.

Without going into much detail, I see that your final plot command fails because there is no numeric value for q. Is your q supposed to have a value?

@mapleatha Sorry, I misread your Question. I thought that you were getting unevaluated output and the blue was what you were expecting. My fault, totally. This Answer can just be ignored.

Is the domain of the function a finite set?

@kfli For some reason that I can't figure out, the freeze command is intentionally "crippled" to not work on names such as x[n]. This crippling is obvious in the very brief code that you can see via showstat(freeze). But it will work on x(n), which is considered a  function rather than a name. So try changing all x[n] to x(n). If you want these to display as subscripted, that can still be done. You can freeze a whole batch of expressions in a single command in a variety of ways. One example is

assign(seq(x(k)= freeze(y(k)), k= 1..9));

Let me know how that works for you.

@ecterrab I think that your impression that the OP is trying to differentiate wrt a function may be based on my example rather than on the OP's code. I just used that example because I didn't have the patience to decipher the OP's convoluted alias commands.

@macmp91 I think that you may only be looking at the eigenvalues when they are correct. In procedure Fn, immediately after the sort command, put the command

print(D[1]);

Then run the code until it errors out. Immediately before the error, I believe that you'll see the negative eigenvalue. When the sqrt is applied to this number, it becomes the imaginary value which causes the error message.

@macmp91 You should check for negative eigenvalues in procedure Fn. Do they make sense for this problem? If not, then you need to adjust something. Perhaps the input to Fn is not realistic. It is the negative eigenvalues that are causing the error message. Perhaps you intended to use singular values rather than eigenvalues. (The singular values of A are the square roots of the eigenvalues of A.A^+ and are guaranteed to be nonnegative.) See ?SingularValues. The main floating-point algorithm computes them without first computing the eigenvalues, which is more robust.

Actually sin(t)^p and (sin(t))^p  and even (sin^p)(t) mean the same thing in Maple. Personally, I prefer the form with the fewest parentheses. The operator binding between f and (x) in the Maple expression f(x) has the highest precedence and never requires extra parentheses. (But when using 2D Input, make sure not to put a space between f and (x).)

The famous mathematical constant Pi is capitalized in Maple; lowercase pi is just a variable.

Would you please attach a Maple worksheet showing the situation where you obtained a result containing Float(infinity)? You can use the green uparrow on the toolbar of the MaplePrimes editor to upload worksheets.

Often such a result comes because the answer to the problem is truly infinity. And often it comes due to round-off error causing division by a very small number. Usually we can determine which is the situation, and often the latter case can be corrected.

@acer I agree with Acer 100% on this. And I'll add that even if applyrule correctly did everything that it was supposed to do, it'd still be a fairly weak command compared to evalindets or subsindets.

First 347 348 349 350 351 352 353 Last Page 349 of 709