rlopez

3020 Reputation

14 Badges

20 years, 236 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 answers submitted by rlopez

 In the Slider Properties dialog, use a floating-point number for either "Value at Lowest Position" or "Value at Highest Position." This will convert the whole slider to floats.

RJL Maplesoft

 See the Blog post "Understanding the Question", which analyzes the implicit function at the heart of this question.

RJL Maplesoft

 Maple 14 has a problem with some forms of the PlotPositionVector command. However, it seems you are trying to do something that Maple has built-in commands for. For example, the following command will draw 5 TNB frames along the graph of the given curve.

Student[VectorCalculus][TNBFrame](<cos(t), sin(t), cos(2*t)>, t, 'output'=plot, 'range'=0 .. 2*Pi, 'frames'=5,binormaloptions=[color=red],normaloptions=[color=blue],tangentoptions=[color=orange]);

The output option even takes the "animate" parameter to create an animation of one TNB frame moving along the curve.

Alternatively, use the Space Curves tutor accessible from Tools/Tutors/VectorCalculus. This will give the same results in an interactive environment.

RJL Maplesoft

 The Minimize command in Maple's Optimization package hits a complex number in its iteration, and throws an error message. I couldn't get this package to produce anything worth discussing.

But, the given equation, of the form f(x,y,z)=0, can be solved explicitly for x = x(y,z) by Maple. There are four branches to the solution, only two of which are real.

Hence, each of the two real branches can be plotted with plot3d on the square 0<=y,z<=1. From these two plots, it is easy to see that one branch has a minimum of approximately 0.123 at (y,z) = (0,1).

The other branch has a minimum on the face y=0. Substituting y=0 into this branch gives a function x=x(z) which can be graphed to observe that there is a minimum of approximately -0.236 at (y,z) = (0,0.4). This function can be differentiated, etc., and fsolve will produce the critical value z = 0.4567706470, from which the actual constrained minimum of x = -0.2363733816 can be found.

RJL Maplesoft

 Looks to me like you have a system of three second-order ODEs in three unknowns. However, your boundary conditions contain values of only two of the functions. Since you are looking for a numeric solution, the solver in Maple will issue various complaints about this calculation. You need to impose two conditions on each of the three unknown functions.

RJL Maplesoft

 Maple integrates 1/x to ln(x) and not ln(abs(x)) by design. It is correct, provided the logarithm is interpreted to be defined over the complex plane. This isn't necessarily satisfying in a beginning calculus course, so one way around the issue is the following kluge.

Suppose the ln(x) appears in an expression called q. The following command is one way to change ln(x) to ln(abs(x)).

eval(q,ln=ln@abs)

The "at" symbol @ is Maple's symbol for composition, so the eval command is evaluating the given expression and any "ln" that it finds will be replaced by ln composed with abs.

RJL Maplesoft

 Suppose the three vertices that "sit on the table" are A,B,C, and that the vertex not "on the table" is D. If you have the vectors from A to B and A to C, called respectively AB and AC, you can obtain their cross-product, giving a vector N that is "perpendicular to the table." The length of the component of the vector AD along the normal N is the height of the tetrahedron.

The geom3d package allows a definition of a general tetrahedron. Then, using the package's "volume" command, it should be possible to check your answer more directly.

RJL Maplesof

 If "q" has the value 2, your nested seq commands should produce a sequence of four equations. If "q" is not assigned, you should get an error message to the effect that Maple is unable to execute the seq command.

RJL Maplesoft

 You have two choices: You can either assign the expression to a name, or you can reference the expression via its equation label.

q:=x^2+1 is the way you assign the expression the name "q".

It's not clear what flavor of Maple you're working with, so the issue of equation labels may or may not be relevant. If  you see equation labels on the right edge of  your worksheet, you can use those to reference the item so labeled. Use Ctrl+L (in Windows) to bring up the Equation Label dialog, and here, enter the number of the label (do not type any parentheses).

RJL Maplesoft

 Surprisingly, the Wronskian command is not in LinearAlgebra, but in VectorCalculus. The old linalg package contained a "wronskian" command - perhaps that's the basis for the confusion.

RJL Maplesoft

 The equations of the plane and cylinder define their objects implicitly. Hence, the implicitplot3d command could be used to plot both items at the same time. Unfortunately, the "cylinder" in this question contains two equal signs. If that is what was sent to a plot command in Maple, an error would definitely be generated.

The following syntax would be an example of something that would work in Maple.

plots[implicitplot3d]([2*x+3*y-z = 5,x^2+4*y^2 = 1],x=-3..3,y=-3..3,z=-3..3);

RJL Maplesoft

 Maple does not yet have the ability to "fill" between two arbitrary curves or surfaces. However, there are several tricks that sometimes allow Maple to nearly do this task. The plot command admits the filled=true option that shades between a curve and the horizontal axis. The generalization of this in the plot3d command "fills" to the z=0 plane.

In Maple 14 there are five new task templates for drawing regions of integration. (See in the Task Browser under Calculus, Multivariate, Integration, Visualizing Regions of Integration.) In several of these, "solids" are drawn. These drawings are done surface-by-surface, each of the six possible bounding surfaces being drawn parametrically. Open one of these task templates and view the code through the Context Menu for the Graph buttons.

Without a general all-purpose tool for drawing an arbitrary solid, each example requires tricks and devices specific to the given solid. I wish it were otherwise.

RJL Maplesoft

 Somehow, I have the feeling that if the flight of a baseball is the bottom line here, then a differential equation might just be at stake. If so, why are we re-inventing the wheel? Maple's dsolve/numeric command has enough flexibility to handle these data-storage issues without having to micromanage the data the way this discussion is going.

So, if I'm right, then we should be talking about Maple's dsolve/numeric capability and how to use it efficiently, and not about storing the individually computed data points. Let Maple's internal routines handle that and just use the top-level integrator to set up and solve for the trajectory.

Of course, you could have been assigned the task or re-writing a numeric solver for ODEs. If so, I doubt you will reproduce (in the time the typical assignment takes) the sophistication already built into the existing Maple code.

So, can we step back and see what the underlying issue really is?

RJL Maplesoft

 After seeing that individual components of the sublists (i.e., triples) need to be changed, I decided to ask one of the Maple programmers about the efficiency of this approach. Turns out that changing an element of a list requires Maple to recreate the full list. Not very efficient.

The suggestion was to use an Array or Matrix of size 3x120. Each column would represent one of the triples, and the 120 columns would be the 120 "vectors" you originally asked about. It's much more efficient computationally to change an element in an Array or Matrix. It all has to do with allocation to memory locations, pointers, etc.

If you need the "linear algebra" properties of these 120 vectors, use a Matrix. If the data structure is just a storage for 360 numbers, an Array will suffice.

Create the Array with A:=Array(1..3,1..120);

Assign a value to the location row=2, column=25 with the syntax A(2,25):=x;

Access this value with A(2,25);

If instead, a Matrix is appropriate, use B:=Matrix(3,120);

Assign a value to location row=2, column=25 with the same syntax as in the Array.

A single column can be extracted from the Matrix with the command LinearAlgebra:-Column(B,25);

Of course, if a number of commands from the LinearAlgebra package are to be used, simply load the package via the syntax with(LinearAlgebra) so that calls to commands in the package don't need the prefix LinearAlgebra:-

It would be useful to know what kind of "advanced calculus functions" are to be applied to the columns of the Array or Matrix. Some of these functions might reside in the VectorCalculus package. Recall that I pointed out earlier that a VectorCalculus Vector carries as an attribute its coordinate system. This is not the case for LinearAlgebra Vectors, so a conversion might be necessary. However, if the vector operations are just dot and cross products, it is not necessary to go to the VectorCalculus package. We can give better advice if we know more specifically just what operations you need to inflict on your vectors, or triples, as the case may be.

RJL Maplesoft

 This is a problem encountered in physics, or in the calculus of variations (think variational mechanics). The diff command is modified in the Physics package to do what you want.

For example, to differentiate sin(x) with respect to sin(x), and therefore get the answer 1, you can use

Physics:-diff(sin(x),sin(x))

RJL Maplesoft

First 24 25 26 27 Page 26 of 27