2243 Reputation

11 Badges

13 years, 81 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

There are many double integrals for which the inner integral can be evaluated (not "solved") in closed form. It might then not be possible to evaluate te outer integral of this result in closed form. If all parameters are numeric, it should then be possible to evaluate the outer integral numerically. It doesn't take much to be faced with this challenge - a square root of a sum of squares is usually what makes this happen for me.

The MultiInt command in the Student MultivariateCalculus package will do what you want.

This command has three outputs: output=value, output=integral, output=steps. The third option will evaluate the integral in a stepwise fashion.

The Roots command in the Student Calculus1 package is the ideal tool for this. If this package is installed, the Roots functionality will be available in the Context Menu. I have separated the equation from the Roots command for convenience.


[arccos((1/7)*sqrt(14)), Pi-arccos((1/7)*sqrt(14)), Pi+arccos((1/7)*sqrt(14)), 2*Pi-arccos((1/7)*sqrt(14))]

Here is a way of generating an asymptotic expansion by repeated integration by parts using Maple to do most of the work. It does not use the recipe provided by the OP, but the following structure is used in my Advanced Engineering Math ebook more than once.

for k from 1 to 5 do
m||k:=eval(temp) assuming x>0;

The Parts command needs only an expression containing an unevaluated integral, and the factor that is to be differentiated in the integration-by-parts formula. The GetIntegrand command then extracts the integrand of the unevaluated integral that results. The remove command removes the exponential from that integrand, which leaves the next term that is to be fed to the Parts command as the factor that is to be differentiated. In order for the limits of integration to be evaluated, Maple needs to know that x is, for example, positive. So, the integration by parts is done first, then the limits are evaluated under the assumption that x>0. A simplify here brings everything into one fraction, not a useful step. The eval seems to force Maple to evaluate the limits under the assumption. Finally, m||k produces the names m1, m2, etc.

I find that the PlotVector command in either of the VectorCalculus packages is more convenient than the use of either of the arrow commands.

If q is the matrix whose columns are the vectors to be graphed, then


is a list of each such vector. (This is essentially the code used by the Context Menu to split a matrix into columns.

The command op([1,2],q) counts the number of columns in the matrix q. There are other ways to determine this number.)





Typesetting[Suppress]([r(t), _rho(t), phi(t), _phi(t)]):

R:=r(t)*_rho(t); (Note my use of r(t) for the radial component to avoid confusion with the name of the basis vector.)


The Suppress command suppresses the display of the independent variable t. If this is all done with typeset math, then you get exactly the textbook version of all the notation.

The attached worksheet shows what this all looks like and how to make it happen.Physics_Notation.mw


Setup(mathematicalnotation = true)


Typesetting[Settings](typesetdot = true)


R := r(t)*_rho(t)



diff(R(t), t) = (diff(r(t), t))*_rho(t)+r(t)*(diff(phi(t), t))*_phi(t)NULL


Typesetting[Suppress]([r(t), _rho(t), phi(t), _phi(t)])


diff(R(t), t) = (diff(r(t), t))*_rho(t)+r(t)*(diff(phi(t), t))*_phi(t)NULL


To jump up on top of R, press Control+Shift+", then type a period. Use the font-control icons in the toolbar to change R to R.


Download Physics_Notation.mw


If m(t) and S(t) are known functions, and h, Cp,  Te and Tw are constant, then your ODE is of the form y'+p(t)*y=r(t), where prime denotes differentiation with respect to t. There is a known form for the solution involving an integrating factor. Maple knows this form. So, the simplest way to proceed is to write the ODE with m and S appropriately supplied, then simply submit the whole thing to Maple's dsolve command. I suspect that the integrations needed for an explicit solution cannot be carried out i closed form, and you might have to resort to a numeric solution. If so, the t in front of T' might make it difficult to prescribe an initial condition at t=0. The behavior of the factor multiplying T' will also depend on m', and only you know what m(t) is.

This graph is easily drawn with the PlotPositionVector command in the Student VectorCalculus package.

Since r(t) is a planar curve, the graph would also be planar, not 3D.

There is no command that returns either the tangential or normal components of the acceleration vector. However, these are easily obtained since, if t is time, then the second derivative of r(t) is a linear combination of the tangent and principal normal vectors. The coefficient of the unit tangent vector is the derivative of the speed; the coefficient of the (unit) principal normal is kappa*speed^2, where kappa is the curvature of r(t) and the speed is the length of dr/dt.

Since r(t) defines a circle, the curvature is constant. So is the speed constant. So, the acceleration vector lies along the principal normal. There is no tangential component of the acceleration in this case.

The speed is 72, kappa=1/36, so the length of the acceleration vector is 144. The radius of the circle is 36, so each acceleration vector points inward, passes through the center of the circle, and goes beyond the circumference by a considerable amount. The unit tangent vector is so small in comparison, that it is nearly invisible on a graph of the circle.

Some command that might be helpful:




PlotPositionVector(R,t=0..Pi,pvdiff=[t$2])  (Draws circle with the acceleration vector that necessarily lies along the principal normal)

PlotPositionVector(R,t=0..Pi,normal=true) (Draws circle with principal normal vectors. They are more visible than tangent vectors, but barely so.)

Change "normal" to "tangent" and you get a graph of the circle with unit tangent vectors, but they are so small as to be just about invisible. The visualization problem stems from taking a circle with such a large radius. Change that 36 to something smaller like 5 and both the tangent and normal vectors along the circle will assume more reasonable dimensions.




Maple 10 will not install under Windows7. Only Maple 11 onwards. Also, Maple 2017 would not install under Windows XP. Hence, even if you had the source-code for Maple 6, I doubt that you would have an operating system old enough to allow its installation.

I have an old laptop (more than 20 years old) with Maple 6 running under Windows 95. I'm not sure how things work under other operating systems and/or other platforms, but probably your best bet is to contact Maple's Tech Support group for definitive answers.

Please reserve the word "solve" for the solution of equations. Use "evaluate" when merely making a substitution or obtaining the value of an integral, derivative, or limit. There are no equations to solve when t=2. At that time, both vectors are identical, so the angle between is zero.

If you are new to Maple in a Calc 3 class, might I recommend the Multivariate Calculus Study Guide



The problem yields immediately to the Lagrange multiplier technique as embodied in the Maple command

Student:-MultivariateCalculus:-LagrangeMultipliers(obj, [lhs(cnsts)-rhs(cnsts)], [x, y])

In the objective function, replace either x or y with its value from the constraint. In either case an upward-oening parabola results. Each such parabola has a minimum, but no finite maximum.

Using Maple's built-in LagrangeMultiplier command, the single extrema is at (4/3, 2/3).

Maple's evaluation rules are complicated. In addition to the issues raised, note that Maple will immediately apply the distributive law to 2*(x+1)  but not to a*(x+1). Learn to live with these design decisions.

For your second question, the evalf command converts an exact expression to a numeric (floating-point, or deciman) one. Hence, with evalf, you get the equivalent of 1.0, a floating point number. Without evalf, you get 1, the exact value.

And by the way, there's one other way to get the exponential e: If you are entering in typeset (math) mode, type e and press the Esc key to bring up a list of all things beginning with the letter e. The very first one is the exponential e. Select that and you have the exponential e. (The Escape key performs command completion, which can also be implemented from the Tools menu.

In the Tools menu, select Tutors/Calculus-Single Variable/Arc Lengths. In this pop-up tool (housed in the Student Calculus1 package) simply enter the expression for the curve and the x-coordinates of the endpoints between which the arc length is to be calculated. If Maple can't produce a closed-form solution, it will return a numeric value of the arc-length integral.

At the bottom of the tutor you can see the actual command that produces the graph shown. To use this command, copy it and paste it into your worksheet. Be sure to install the Student[Calculus1] package. If the output option in the command is changed to "integral" the arc-length integral is returned. If this option is not there, the value of the integral is returned. (Or use output=value.)

If a combine/trig is applied to the integrand in the general case, four cosine terms appear. The arguments in each case are x times one of (K-L-M), (K-L+m), (K+L-M), (K+L+M). When K=14, L-2, M=12, that first term is cos(0)/4, and hence the integral is Pi/4. If none of these factors is zero, and each integer is even, the integral will be zero.

In the general case, add the option AllSolutions=true to the int command and this anomaly will be completely clarified by the piecewise result that is returned.

1 2 3 4 5 6 7 Last Page 1 of 19