## 2418 Reputation

14 years, 103 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.

## MultiInt...

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.

## Roots command...

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.

q:=7*cos(2*t)=7*cos(t)^2-5;
Student:-Calculus1:-Roots(q,t=0..2*Pi);

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

## Using IntegrationTools...

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.

with(IntegrationTools):
m0:=Int(exp(-x*t)/sqrt(t^2+t),t=1..infinity);
for k from 1 to 5 do
temp:=Parts(m||(k-1),remove(has,GetIntegrand(m||(k-1)),exp));
m||k:=eval(temp) assuming x>0;
print(m||k);
od:

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.

## PlotVector command...

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

L:=[seq(q[1..-1,k],k=1..op([1,2],q))];

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.)

plots:-display(seq(VectorCalculus:-PlotVector(L[k]),k=1..10),insequence=true)

## Use Physics Vectors package...

with(Physics:-Vectors):

Setup(mathematicalnotation=true):

Typesetting[Settings](typesetdot=true):

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.)

diff(R,t)

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

 (1)

=

=

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.

## First-order linear ODE...

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.

## PlotPositionVector command...

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:

with(Student:-VectorCalculus):

R:=PositionVector([36*cos(2*t),sin(2*t)]);

kappa:=Curvature(R,t);
v:=Norm(diff(R,t))

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.

## Operating-system dependent...

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.

## solve vs. evaluate...

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

https://www.maplesoft.com/products/studyguides/multivariatecalculus/index.aspx

## Lagrange multiplier technique...

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])

## There is no finite max...

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).

## evaluation rules are complicated...

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.

## Arc Length tutor...

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.)

## General case vs specific instance...

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.

## It works for me...

I wrote this Task Template, so I'm instantly on alert if someone claims it doesn't work. I just tried it in Maple 2017.3 and it works.

According to the second bullet point on the left, press the Initialize button to make this template work.

To see the code, right-click on the Initialize button and select the option "Edit Click Action."

If there's a problem with this task template, please let me know.

 1 2 3 4 5 6 7 Last Page 3 of 21
﻿