Carl Love

Carl Love

28055 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@Carl Love Does my Answer work for you?

@Ronan You wrote:

Thanks for spotting that analogy to my earlier Answer. In that case, I represented your iterated sum's multi-index as a cartesian product. In the present case, I represented it as all s-combinations from a master index set. That can be generalized thus: Let Iter be any operation using an index variable taking a finite number of values (such as sumproductaddmul, or a for loop). Suppose that we wish to compute

Iter(Iter( ... (
    Iter(
f(k[1], k[2], ..., k[s]), k[s]= J[s](k[1], ..., k[s-1])),
     
...), k[2]= J[2](k[1])), k[1]= J[1]()
)                                                           (eq. 1)

where s (the nesting level) is an arbitrary positive integer not known at the time that the code is written and J[1], ..., J[s] are set-valued functions (each of which may depend on all prior indices). In theory, the index tuples (k[1], ..., k[s]) can always be generated as a combinatorial object and the computation of (eq. 1) reduced to a single call to Iter somewhat like this

Iter(f(seq(K)), K= CombGen(...)),    (eq. 2)

where CombGen is some sort of generator of combinatorial objects. (The syntax shown in (eq. 2) is just an example that needs to be adjusted on a case-by-case basis.)  However, in practice, there may not be an efficient way to generate the combinatorial object.

@acer You can safely use evalc in situations where only some of the variables are intended to represent reals by assuming that the others have property complex.

I can't tell whether you actually want an Explore (or other interactive plot) with parameter a or you simply want to plot two functions together.

@acer His integrand is missing the arclength differential, sqrt((dx/dt)^2 + (dy/dt)^2).

I'm guessing that t is the independent variable of the polynomials. What do you mean by t with a subscript, such as t[j] and t[i]? Are these meant to be symbolic variables independent of t itself?

Is there a reason that you specifically want a recursive method? There are also several very good non-recursive ways to do it in Maple.

@tomleslie Do you have kernelopts(assertlevel= 2) set, perhaps from an initialization file?

@acer I don't think lack of precision is the culprit leading to spurious roots in this particular case. Try this code and let me know what you think:

restart:
Digits:= 100:
JD:= int(6-sqrt(9+8*x-x^2), x= 0..L);
R:= solve(10=JD, L);
R2:= [allvalues](R);
R3:= select(type, evalf(R2), realcons);

The end result is the same 3 real roots (extended to 100 digits), 2 of which are very wrong.

I'm totally willing to accept that spurious roots may occur for purely symbolic reasons---as we learn in high-school algebra II when solving equations with variables under square roots. But I haven't found the actual symbolic culprit here yet,

@acer My Comment here has nothing to do with the Question; I'm just commenting on a curiosity in the prettyprinted output shown both in the Question and in your Reply above. Notice that Pi/2.2 appears two different ways in the output of the definition of piecewise function f. It appears twice as 1.427996661 and twice as Pi/2.2.

@lcz There is no specific command for numeric eigenvalues because LinearAlgebra:-Eigenvalues (and related commands) chooses an algorithm based on the datatype (such as hfloat) and the shape (such as symmetric) of the matrix. The Answer by @dharr shows how to use this feature.

@ecterrab You seem to be answering a question which is nearly the opposite of what was asked. The OP has set infolevel[dsolve]:= 2, has run dsolve twice on the same ODE, and has noticed that the 2nd run produces much shorter userinfo output. This is of course because of remember tables, and the OP now understands that. The OP wants to obtain only the userinfo from that second run without needing to obtain the userinfo from the first run as a preliminary step. (The OP does not want to "see again the previous user level information", so using Forget() doesn't help.) My Answer shows how only that second-run userinfo can be obtained efficiently.

@dharr But the OP wants to do this over finite fields. The diagonalization proceeds in a mostly similar manner to what you showed, although one often needs to create more-elaborate splitting fields for the eigenvalues (of degree possibly as large as the matrix order). The major stumbling block will be the finite-field equivalent of the solve, there being no good algorithm to solve for an exponent. This is the "discrete logarithm problem" that I referred to in my Reply above.

Even in the case of 1x1 matrices (i.e., scalars), it is a hard problem---called the discrete logarithm problem---for which no fast algorithm is known. See the Wikipedia article "Discrete logarithm".

@lcz I consider it a serious breach of "netiquette" to delete one's own Question after it has been Answered. That is NOT nm's habit. I've only noticed that user deleting material that has not been replied to.

First 97 98 99 100 101 102 103 Last Page 99 of 709