rlopez

2448 Reputation

11 Badges

14 years, 166 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

I found the question interesting enough to examine it further, especially since it provoked another round of anti-2D sentiment.

The command piecewise(x < 1, a, x < 2, b, x < 3, c, d); creates a piecewise function that I actually entered from the piecewise template in the Expression palette (using 2D, or typeset, math). Now, what does it mean to delete a row? Suppose it is the second row that is to be deleted. What function value takes the place of "b" on the interval [1,2)? I think that's the essential question. Is the function to be undefined on that subinterval? or is the value to be, say, "c" on that subinterval? So, just deleting the row isn't enough. One has to determine what is to happen when the condition in that row is removed.

For example, to have the function assume the value "c" on that subinterval, I used Context Menu/ Evaluate at a Point, and set b=c, then invoked Simplify/Simplify from the Context Menu. The result was the piecewise function that could be described by the command-form piecewise(x < 1, a, x < 3, c, 3 <= x, d);

But the OP might have meant the following work-flow. The Piecewise template is entered from the Expression palette and a row is added. Immediately, it is recognized that this row is not wanted. Control-z will undo the insertion of the row.

What other scenario could have provoked the original question?

The original functionality for displaying the steps in the evaluation of an integral was put into the Calculus1 package, and was designed for a single integral. Functionality for setting and evaluating iterated integrals was then placed into the MultiInt command in the Student MultivariateCalculus package. Initially, this command did not have the ability to provide a stepwise evaluation. Eventually, the output was augmented with the option output=steps, which apparently is nothing more than the iteration shown by Kitonum.

Student:-MultivariateCalculus:-MultiInt(exp(cos(x)), y=0..sin(x), x=0..Pi/2, output = steps)

The other possible outputs are output=integral and output=value, the first giving the unevaluated integral; the second, the value of the integral. Since this is the default, if the option output=value is omitted, the command then returns the value of the integral.

None of the 13 fitting commands in Maple accept an implicitly defined fitting function. Only one accepts a set of equations, and that is the LeastSquares command in the LinearAlgebra package. So, form a set of equations determined by the data and the implicitly defined fitting function, apply the appropriate command, and get a terrible fit. Conclusion - find a better fitting function.

The details are in the attached worksheet.Implicit_Least_Squares.mw

Simplest extension of solve and fsolve is the Roots command in the Student Calculus1 package. Here, use

Student:-Calculus1:-Roots(3.2+0.4*sin(1.25*x)=3.5,x=0..5);

to get the two roots in the interval [0,5].

RootFinding:-Analytic finds roots in a region of the complex plane, and is often slower and less accurate than Roots. For a strictly real problem, I find Roots easier to apply. It will return exact solutions where it can, numeric solutions for numeric examples, and has the option "numeric" to force the use of numeric algorithms.

I've never found a setting for what you want to do, but that doesn't mean it isn't there. However, my first recourse would be to put the graph into a 1x1 table,squeeze the table (which will be left-justified by default) to fit the graph, and probably hide the command that created the graph (use the Table Properties dialog). I would be edified to learn where the setting for what you want might be hiding.

The "int" command in either of the VectorCalculus packages is modified to understand integration over some specific domains, and the triangle is one such domain. This functionality is also captured in a set of Task Templates in the Calculus-Vector collection under the grouping "Integration."

In particular, for the unevaluated integral, the syntax in the VectorCalculus package would be

VectorCalculus:-int(x^2+y^2,[x,y]=Triangle(<0,1/2>,<1/2,1>,<1,0>),inert);

Delete "inert" to obtain the value of the integral. In the Student package, replace "inert" with "output=integral."

 

 

Maple functions enclose their arguments in round parentheses. Square brackets denote lists, or subscripts.

So, change the two Dirac[...] expressions to Dirac(...).

The coeff command will extract coefficients from expressions. If all your equations have the coefficients on the right, then you would need syntax such as c:=coeff(rhs(eq), t). In a test I just tried, I used coeff to extract the coefficient of tan(x), so where t appears in your example and in the syntax shown in the previous sentence, tan(x) appears to be OK too.

The coefficient of f'' is zero at t=0. Hence, a series solution at t=0 cannot be generated from the DE. That is the meaning of the error message. It's not a Maple issue, it's a mathematical one in the DE itself. The fundamental existence and uniqueness theorem for an ODE is based on an equation that can be solved for the highest derivative, and this derivative must be defined at the initial point. If the DE bacomes 0*f''(0)=..., then f''(0) is not defined, and a solution probably does not exist.

Unless the Tutor provides for returning some result to the calling worksheet, it is not possible in general to insert the result of a Tutor experience into the worksheet. At best, you can take a screen-shot and paste that into the worksheet, but of course, that is then a static image. Of course, I would imagine that all users of Maple's Tutors would be happy to see the day when the Tutors are an integral part of the worksheet and not just a pop-up.

The siderels (side relations) option in simplify might be of help.

First, include in the dsolve command the option output=listprocedure. This creates a list of procedures that include R(theta)=proc(theta)... and mu(theta)=proc...

Access the procedures that generate the values of R and mu as follows. Use names other than R and mu. For example:

RR:=eval(R(theta),F);

M:=eval(mu(theta),F);

Then, write just Int(... using RR and M in place of R and mu. Apply evalf to this unevaluated integral. When i did this, I immediately obtained 46087.3499759295 as the value of the integral.

In other words, assigning the result of the dsolve command to F as was originally done does not access the solutions for R and mu in any way useful for computing. It is only useful in odeplot, the command to graph numeric solutions.

Then, writing Int(... = evalf(int(... isn't optimal. Use of Int provides the unevaluated integral. Use of int causes Maple to try to obtain an exact solution, after which, (when that fails) Maple tries to implement a numeric solution. That's wasteful. Since the integration must be carried out numerically, write just Int, the unevaluated integral, and apply evalf to that.

Finally, the use of eval is a handy strategy in Maple when trying to access the left-hand side of an equation. Suppose the equation is x=5 and it is included in a long list L of other such equations. To extract the value of x and assign it to a different name, use X:=eval(x,L) which evaluates the name x with the equation in the list L, thereby picking out the value 5 and assigning it to the new name X.

As Carl Love points out, code can be in plain sight, or it can be in a Start-Up region so that it executes just after the worksheet is launched. There is also the Code Edit region in which code can be inserted, and the region shrunk to an icon. Finally, code can be hidden behind an output in a table cell. Use the Table Propery dialog to expose the code. I tuck the code for graphs behind such table cells so that only the graph itself shows.

Some of the newer worksheets crafted by Samir Khan use even more sophisticated techniques that were explained in a post to this forum within the last year.

normal(expr,expanded) returned B for me. This command simplifies fractions, and the option expands the denominator.

solve(identity(f,x),[a,b]) returns the values of a and b.

map(coeff,f,sin(2*x)) and map(coeff,f,cos(2*x)) returns the two equations in a and b.

5 6 7 8 9 10 11 Last Page 7 of 22