2985 Reputation

14 Badges

19 years, 135 days

Dr. Robert J. Lopez, Emeritus Professor of Mathematics at the Rose-Hulman Institute of Technology in Terre Haute, Indiana, USA, is an award winning educator in mathematics and is the author of several books including Advanced Engineering Mathematics (Addison-Wesley 2001). For over two decades, Dr. Lopez has also been a visionary figure in the introduction of Maplesoft technology into undergraduate education. Dr. Lopez earned his Ph.D. in mathematics from Purdue University, his MS from the University of Missouri - Rolla, and his BA from Marist College. He has held academic appointments at Rose-Hulman (1985-2003), Memorial University of Newfoundland (1973-1985), and the University of Nebraska - Lincoln (1970-1973). His publication and research history includes manuscripts and papers in a variety of pure and applied mathematics topics. He has received numerous awards for outstanding scholarship and teaching.

MaplePrimes Activity

These are replies submitted by rlopez


I don't recall if the OrthogonalExpansions package provides code for creating the periodic extension of a function defined on an interval, but you can find it in Example 3 of the first worksheet in the series of 4 that I mentioned earlier.


The extension can be defined in one line of code using the floor command as the greatest-integer function.

@vv Apparently, I didn't make myself clear. Let me try again: use the input style that is appropriate for the task at hand.


All generalizations are false, including this one. Not all Maple experts use text (linear, 1d) input exclusively. It depends on what the expert is trying to do. Coders prefer textual input. Writers of Maple content, even experts within Maplesoft, will use typeset input that looks more natural mathematically, when appropriate.

Many opinions about this distinction can be found in past posts to MaplePrimes. Each style of Maple input has its advantages and disadvantages. It all depends on what the end-use for the resulting document might be.


Apparently, you work in a Maple worksheet using red commands at red prompts. In that case, your only recourse is to use unapply. I'm not sure about how this is coded in Maple, but from experience I know that you cannot use as a rule to the right of the mapping arrow any reference, whether it be %, the named of a pre-defined expression, or an equation label.

However, if at the red prompt you would switch to math mode so that the line is typed in typeset math, then

f(x)=... will define a function if the Context Menu option "Assign Function" is selected, and the ellipsis is any form of the rule, whether it be %, the name of an existing expression, or an equation label.

If you do this, you will see the Maple code that executes, and it makes liberal use of the unapply command. Perhaps one of the Maple developers will weigh in on your question and give a more insightful answer as to why the mapping arrow cannot point to a "reference". I just know by experience that it can't.

A list, Matrix, or Array can be used to store the data in what mathematically can be thought of as a "vector." In Maple, at top-level (no packages installed) a Vector defined with the "Vector" command or with angle brackets (inequality symbols) is the same type object as the "Vector" defined in the LinearAlgebra or Student:-MultivariateCalculus packages. These vectors do not carry coordinate information. Vectors defined with the confines of the VectorCalculus packages carry a coordinate system as an attribute. This is the fundamental difference between working inside or outside a VectorCalculus package. The Physics:-Vectors package contains a completely different structure for representing vectors in 3-space.

As with any degree of flexibility, these additional forms and options present their own complexities, especially when some of these different structures are used together.

@vv I think that the first argument to IntOverDomain should be called fx, not f. Then, if Q=int(fx,x) were called f, the code would have been clearer. Then, instead of seeing int(Q*dy,...), one would have seen int(f*dy...), a more natural bit of notation.

Because y is a linear function along each segment of a polygonal line, dy is just the coefficient of x (or t, depending on the parametrization along the line) in the expression for the line.

The nodes defining a polygonal line must be listed in the order in which they are encountered as the line is traversed in the direction induced by the positive orientation of the SCROC. This direction is generally counterclockwise: walk the boundary with the left hand pointing into the interior of the region enclosed by the SCROC. If you do this with, say, a circle, you will see that the direction of motion is counterclockwise. If Maple's Flux command is used for the line integral, then simply list the nodes in the proper order. For segments defined parametrically, parametrize each segment so as to continue in the counterclockwise direction as the parameter advances in value.

I thank vv for having answered the questions posed. I saw them earlier today, but I was busy preparing for a week's vacation and didn't clear the agenda until hours later.

@vv -exp(3*Pi) raised to the power (1+I) does not equal 1. Similarly, for all solutions other than 1 and -exp(Pi).

The only way I can see that the given equation has an infinite number of solutions is by taking a different branch of the logarithm for each of these many solutions. If the principal branch of the log is used, then there are not an infinite number of solutions. That seems to be at the heart of the confusion here. Maple uses "ln" to mean both the principle logarithm and symbolically, to mean "true on some branch." I have always found this usage difficult in Maple.

Indeed, take the real and imaginary parts of (a+b*I)^(1+I)-1 and draw an implicit plot. Only two solutions of the resulting simultaneous equations appear to exist. These two solutions correspond to z=1 and z=-exp(Pi).

Does this example need further investigation or interpretation?

@ The worksheet in Maple 7 is constructed with software issued by a company that went out of business sometime after Maple 9 was released. Hence, there is no way to continue developing that form of the product.

From Maple 10 onwards, it is possible to save a file as a "Maple Classic Worksheet (.mws)."

So, which meaning do you attach to "classic"? Do you mean the format used prior to the introduction of the Java-based interface that arrived with Maple 10, or do you mean the "Maple Classic Worksheet (.mws)" that is available from Maple 10 onwards? If you mean the former, does that imply that the latter is not a satisfactory replacement? And if so, why? What are the shortcomings of the extant Maple Classic Worksheet (.mws)?

A final note: Until recently, my home computer was a desktop running Windows XP. The last version of Maple that would install under that OS was Maple 18. It does not surprise me that in a newer operating system, an older version of Maple will not work. However, it is the case that Maple 2017, installed under Windows10, saves a worksheet as a Maple Classic Worksheet (.mws).


RJL Maplesoft

I'm not sure that the statement "Maplesoft wants everyone to switch to clickable things" is exactly true. I devised the term "Clickable Calculus" as a banner for the ease-of-use features that were beginning to appear in Maple, from Maple 10 onwards. Maplesoft at first wrinkled it nose at the term, then embraced as when it saw that "clickability" worked with an appropriate audience. (Think of all the users and students who don't need to master Maple commands in order to get value from the product.)

I was never aware of a Maplesoft mindset to get all Maple users to surrender the worksheet with text input, modes that appear to serve coders and programmers best. If there really is such a hidden agenda at Maplesoft, I'm as troubled about that as the many users who consistently report such feelings here on MaplePrimes.

Couldn't stop thinking about this calculation. The line integral on the right in the Divergence form of Green's theorem is actually the line integral of the normal component of <f,g> along a curve. Hence, this is a flux calculation, for which Maple has a built-in tool. So, using Kitonum's structure, it is possible to implement the line integral on the bounding SCROC with the Flux command in the Student VectorCalculus package. Just to prove to myself that this works, I shortened the code to the following, and verified that it gives the same answer(s) as the earlier code. By no means does this detract from the original insight exhibited by Kitonum.

IntOverDomain := proc(f, L)
local n, i, j, m, yk, yb, xk, xb, Q, p, P, R, V;
use Student:-VectorCalculus in
for i from 1 to n do
if type(L[i], listlist(algebraic)) then
add(P[i], i = 1 .. n);
end use:
end proc:

@vv I was under the impression that inverting would change the meaning of the residuals, and hence, the meaning of the least-squares fitting function. Is this a misapprehension on my part?


Note to self: It's actually in Maple! In the Format menu, select Styles. In the resulting dialog, select "Maple Plot" in the collection of items listed on the left. Then click "Modify". In the dialog that results from this, change "Alignment" to "left", then click OK. Any graph drawn after this will be left-aligned.


Kitonum's answer is correct, and finally, I see why. The construction suggested by the OP's question is that of an ellipse. However, the length of the string looped around the given foci is the distance between the foci. That's why the calculations one normally uses to obtain the equation of an ellipse result in the equation of a line. That it becomes a line segment is apparent with some additional inspection. Indeed, I graphed the surface representing the left-hand side of the equation

evalc(abs(a+I*b+3-2*I))+evalc(abs(a+I*b-3-8*I)) = 6*sqrt(2)

and the plane z=6(sqrt(2). These surfaces intersect in a line segment. Why a line segment I kept asking myself. The algebra for obtaining the equation of an ellipse degenerates to (1-b+5)^2=0, so why not a degenerate ellipse which is a line. It's a line segment because the distance between the foci is itself the sum of the distances from the foci. Like a dog with a bone...

@Marzio Giaveno 

Try assign~(seq(X[k]=X[0]+k*(X[N]-X[0])/N, k = 1 .. N-1));

This sets up a sequence of equations, and assign~ maps the assignment operator onto each of the equations in the sequence. That does not generate the first error shown in your post.

The list of points in P each contain a function f evaluated at a known X but an unknown Y. But what about the function f? The  sum of distances between adjacent points in SL is then the argument of the Minimize command, which acts numerically. If the unknown function f is in this argument, again errors will be thrown. At this point, either there's the coding error of forgetting to define f, or a logic error in thinking Minimize can do its job without knowing what the function f is.

I did not progress to the third error because the second one is insurmountable.

What are F, V, A, and B?

You define P1, P2, P3, P4 with upper case, but display p1, p2, p3, p4 with lower case. (Maple is case sensitive.)

First 8 9 10 11 12 13 14 Last Page 10 of 20