## 2493 Reputation

15 years, 82 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.

## Difficult integral...

I added the option "output=integral" to see just how difficult this integral might be. The integrand is pretty complicated. I didn't have patience to wait for the calculation to produce the message about running out of memory. I doubt the integral can be evaluated in closed form. If the parameter r is given a numeric value, the integral can be evaluated numerically instantly. Not much help, though, if a closed-form is essential.

RJL Maplesoft

## Have you tried setting infolevel?...

Commands in the Optimization package should support infolevel. See the help page for the Optimization package itself.

RJL Maplesoft

## Possible solution...

Look at the help page for try, a mechanism for detecting an error condition, with provision for what Maple code to execute upon finding the error.

RJL Maplesoft

## Is this what you want?...

Not completely sure what you want, but consider the following constructions.

q1:=polar(3,2.):
q2:=polar(5,1.5):
C1:=evalc(q1):
C2:=evalc(q2):
V1:=<Re(C1),Im(C1)>:
V2:=<Re(C2),Im(C2)>:
V2:=VectorCalculus:-RootedVector(root=V1,V2):
VectorCalculus:-PlotVector([V1,V2],color=[black,red],scaling=constrained,width=.5);

The "phasors" would be q1 and q2, complex numbers expressed in terms of magnitude and angle. C1 and C2 would be the rectangular forms for q1 and q2. V1 and V2 are then planar vectors representing these complex numbers, but V2 has its tail at the head of V1. (This construction is the simplest way I know how to put the tail of a vector at a specific location.) The PlotVector command is the nicest way I know to graph several vectors at once.

RJL Maplesoft

## Use Maple's built-in tools...

The curve you proposed is an elliptic helix if a does not equal b.

If you load the Student VectorCalculus package, and write the curve as

<X,Y,Z>, where X,Y,Z are the appropriate functions of t, and right-click on this, in the Context Menu that appears you will see Student Vector Calculus, and in that, Tutors. Pick the Space Curves tutor.

The tutor that launches will have your vector in it, and you can modify the domain for t. You get a graph of the curve, and you can also ask the tutor to show the various Frenet-Serret basis vectors, even animating them to move along the curve.

RJL Maplesoft

## SurfaceOfRevolution...

SurfaceOfRevolution(x^2, 1..2, 'axis'='horizontal', 'distancefromaxis' = 1, 'output'='plot');

This command lives in the Student Calculus1 package. I obtained this exact syntax by launching the SurfaceOfRevolution tutor, using it to craft the requisite surface, then copied (and pasted) the command from the bottom of the tutor.

RJL Maplesoft

## Out of the depths of the Little Red Book...

Ages ago I asked one of our developers this question. Here is the reply I have recorded in my Little Red Book of Maple Magic.

Q:=indets(indets(ode,'specfunc'('anything','diff')),'And'('function','Not'('known')));

Q will be of the form {y(x)} and op(0,Q[1]) gives y, while op(1,Q[1]) gives x.

I suspect the single quotes are a habit of our developers who do their best to protect users from themselves.

RJL Maplesoft

## Make the dependence explicit...

If I understand your question correctly, you need to apply the differentiation operator d/du to F(x(u),y(u)). Otherwise, your ambiguous use of "total derivative" blows by me like a knuckle-ball. (A baseball allusion: a knuckle-ball is a spinless pitch for which air resistance causes erratic fluctuations that baffle most batters, and even the catcher.)

RJL Maplesoft

## Implementation of the trapezoid rule...

I thought this was an interesting enough question that I actually did a search, then decided that it would be faster to experiment. Here's my implementation of the trapezoid rule for nonuniform data.

X:=<1,4,5,9>:
Y:=<2,4,6,8>:
Z:=<seq(1+.1*k,k=0..80)>:
F:=CurveFitting:-ArrayInterpolation(X,Y,Z):

The first two lines define some data. The third line gives the points at which interpolation is to be done by the ArrayInterpolation command. Note that this is part of the CurveFitting package. The return of the command is a vector of values at the interpolation points. The last line is an implementation of the trapezoid rule from first principles.

It would be nice if Maple had a built-in process for numerically integrating data. Maple is so "big" that this functionality could actually be there but I'm not aware of it! If it is, perhaps I'll learn something from a future Primes post.

RJL Maplesoft

## Typo?...

Change D(x)*0 to D(x)(0)

RJL Maplesoft

## Try the Physics:-Vectors package...

The only place where Maple has implemented symbolic vector manipulations is in the Physics:-Vectors package.

RJL Maplesoft

## There is a built-in tool...

Use the getdata command in the plottools package. Look at the help page for how this command works. It will give the data points used by Maple when constructing a graph.

RJL Maplesoft

## The difference between sets and lists...

In the final "display" command, change the set (given by {...}) to a list (given by [...]). A list is like a file-drawer. The things you put in it stay in the order in which they are placed. A set is like the desk drawer in which items are tossed randomly. In other words, sets do not preserve order, but lists do.

RJL Maplesoft

## Use Control L...

Typing the equation number directly into Maple does not work. Use Control+L to bring up the "Insert Label" dialog. In this pop-up, type just the equation number, not the parentheses around the number.

RJL Maplesoft