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

L:=[fsolve(x^8-4*x^7+6*x^6-4*x^5+x^4+x^2+2*x+1, x, complex)];
plots:-complexplot(L,style=point,symbol=solidcircle,symbolsize=15);

Assuming the data is in an Excel spreadsheet, it can be imported into Maple as a matrix via the Import Data Assistant. (See the Tools/Assistants menu.)

Further, assume the Maple name of the imported matrix is M, and it is an n-row, 2-column matrix in which the times are in the first column and the velocities are in the second. Also, assume that the times are equispaced, with gap d.

Construct a Trapezoid rule function that obtains the area from the first data point through the k-th data point. This would result in the position as a function of the (discrete) times. (Its graph would be a step function.)

A:=k->d*(M[1,2]+M[k,2]+2*add(M[j,2],j=1..k))/2;

plot(A,1..n)

The function A is not efficient because for each increment in time, the sum of the velocity values computed by the add command is repeated. Making this step efficient would require more coding. If the list of data points isn't excessive and your computer is fast enough, this naive approach might suffice. The Trapezoid rule is more accurate than rectangular rules, and no harder to compute. If even greater accuracy were needed, replace the Trapezoid rule with Simpson's rule.

This is an interesting problem because it resembles a typical question asked on calculus exams where at best, a calculator is allowed. A few data points are given, and the student has to use a rule such as the Trapezoid rule to compute the area under the "curve" from which the data was obtained. Over the years, I've noticed that Maple has no built-in tool for doing this, so even when Maple is available during an exam, the student is forced to work from first principles.

 

-Load the Student Calculus1 package. (Tools/Load Package)

-Enter the inert form of the indefinite integral:

     Method 1: Type Int(sin(5*x),x) in 1D math.

     Method 2: Type sin(5x) in 2D math. Context Menu: Constructions/Integral/x

     Method 3: Expression palette, indefinite integral template. This sets the "active" integral, the equivalent of int(sin(5*x),x) in 1D math. Context Menu: 2-D Math/Convert To/Inert Form

-On the inert indefinite integral, Context Menu: Solve/Show Solution Steps

Many of these syntax-free techniques are illustrated in a collection of solved problems that are recorded and stored on the Maplesoft website. The link to the home page for these examples:

http://www.maplesoft.com/teachingconcepts/

In particular, http://www.maplesoft.com/teachingconcepts/detail.aspx?cid=11 links to an integration-by-parts in which the use of the Integration Methods tutor is illustrated.

RJL Maplesoft

In a Document, using 2D math, if g is defined as a function, then the notation g'(2) evaluates the derivative g' at x=2. The prime can be an apostrophe, or it can be the more elegant prime symbol from the Punctuation palette.

The function can be defined as in the earlier answers, but I now prefer the following approach. Write in 2D math the "equation" g(x)=x^2 (or whatever rule is appropriate) and select the option "Assign Function" from the Context Menu. The advantage here is that in place of the explicit statement of the rule on the right side of the equal sign, a reference to the rule via its equation label can be use. Such indirect references cannot be used if the input is inlinear (1D math) mode. There, the unapply command is essential. So, using 2D math and the Context Menu, such devices as arrows, and unapply, can be avoided.

The Standard Maple interface comes in two "flavors." There's the Worksheet, which looks like the old classic interface, and there's the Document, where the "red prompts" are no longer visible. In either case, it is possible to enter text and math instructions in either math mode or text mode. Maple calls math mode "2D math" and text mode "1D math."

The "Clickable Calculus" examples you find here

http://www.maplesoft.com/teachingconcepts/

are done in a Document using math mode input. In a Document, all 2D math is live, and a secondary click will bring up the Context Menu with which syntax-free calculations can be performed. But there are other tools in the suite of "Clickable Math" in Maple, and these include Assistants, Tutors, and Task Templates.

Here is a link to the recording of a monthly webinar that covers these matters:

http://www.maplesoft.com/demo/streaming/Getting_Started_Maple_Aca_Evaluators.aspx

 

 

Markiyan Hirnyk's solution seems to assume that the question means "edit the input form of the Maple command."

Perhaps the question really meant "How can a 2D math output in Maple be transferred to Word, and then edited as a Word equation?" If that is actually the intent of the question, then the prognosis isn't sanguine, as far as I know. The underlying structure of a Maple display is sufficiently different from that of Word that I don't know of any way to translate one format to the other.

It is possible to convert Maple output to LaTeX, but I don't know if Word then imports LaTeX and formats such an import as a Word equation. If someone in the user community knows how to do this type of transformation of Maple to Word, it would make a useful post to MaplePrimes.

RJL Maplesoft

If the equation contains a derivative of a function of two variables, Maple will see the equation as a partial differential equation. The solve command is for solving algebraic equations; the dsolve command, for ordinary differential equations; and pdsolve, for partial differential equations.

RJL Maplesoft

An extended discussion that introduces the DifferentialGeometry package can be found here:

http://www.maplesoft.com/applications/view.aspx?SID=33840

a past Tips & Techniques article in the Maple Reporter, now stored in the Application Center where the full title appears as

Classroom Tips and Techniques: Tensor Calculus with the Differential Geometry Package

In the last block of code, change Solution:=op(2,SolutionSet) to Solution:=op(2,SolutionSet[])

SolutionSet is a list of a single list, so SolutionSet has only one operand, namely, the inner list. Placing [] at the end of SolutionSet in the op-call selects the inner list, then takes the second operand of what's in the inner list.

That change allows the code to execute.

It should be possible to extract the values of the solution directly from the pds module. Try the following:

U:=rhs(pds:-value(output=listprocedure)[3]):

interface(rtablesize=100):

Matrix(51,3,(i,j)->U((i-1)/50,(j-1)/8));

None of the numeric differential equation solvers, either ordinary or partial, will provide the values of the highest-ordered derivative appearing in the equation. You can det the values of the lower-ordered derivatives only.

To get the values of the highest-ordered derivative, either apply numeric differentiation to U or trick the system into thinking it is second order, or that the derivative is actually one of the system's dependent variables.

S:=[RootFinding:-Analytic(eq,x=-5-5*I..5-5*I)];

plots:-complexplot(S,style=point);

The zeros here are calculated numerically.

There are solutions along the imaginary axis. If only the real solutions are desired, change the bounding box to one that's closer to the real axis: x=-5+0.1*I..5-0.1*I

 

Another approach for real solutions is solve(eq,x,AllSolutions), which gives all possible real solutions in the form sqrt(2)*sqrt(_Z1) and its negative. The symbol _Z1 represents an integer.

 

This question reminds me of the "root locus" problem in control engineering.

Q:=solve(eq1,t[min]):
plots:-implicitplot(Q[3],d=-.01..0.01);

These two lines of code in Maple 17 will provide a glimpse of the complex solutions for t[min]. Perhaps the original question implied just real solutions, but there are complex solutions as well.

Not sure if your assignment demands an implementation of Newton's method built from first principles, but if you can get by with the built-in command, here's where it is.

with(Student[Calculus1]):

NewtonsMethod(f(x), x=a, iterations=posint);

(The value of "a" is the starting point for the iteration.

Note that this command can be made to output a graph or an animation of the tangent lines used by the method. The best way to see the graphical output is to invoke the Newton's Method tutor, available through the Tools/Tutors/Calculus-Single-Variable menu. 

 

RJL Maplesoft

The Student VectorCalculus package is much more forgiving with respect to coordinate systems and coordinate names. However, it recognizes only Cartesian (2D and 3D), polar, cylindrical, and spherical coordinates, and makes assumptions as to the default coordinate names.

with(Student[VectorCalculus]):
F:=VectorField(<x,y,z>);
Divergence(F);

No need to set coordinates or to declare the differentiation variables.

 

Apply the rationalize command to the "unsimplified" form.

RJL Maplesoft

First 19 20 21 22 23 24 25 Page 21 of 27