rlopez

2840 Reputation

14 Badges

17 years, 364 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

The Conic Sections Tutor in the Student Precalculus package will provide the graph of this ellipse, and report the coordinates of the foci, vertices, center, and equation of the directrix. No coding or programming needed.

The following handfull of Maple commands will provide the tangent planes. Verifying that points lie on a surface is merely a matter of making substitutions.

with(Student:-VectorCalculus):
BasisFormat(false):

Define the surface in spherical coordinates as a way of avoiding the division-by-zero errors one gets in Cartesian coordinates. (An example on the help page for the TangentPlane command sparked this insight.)


S:=Vector(<2,s,t>,coords=spherical);

Convert the points to spherical from Cartesian coordinates:


A:=simplify(MapToBasis(<1,1,sqrt(2)>,spherical)):
B:=simplify(MapToBasis(<sqrt(2),sqrt(2),0>,spherical)):
C:=simplify(MapToBasis(<2,0,0>,spherical)):
A,B,C

The tangent planes are given parametrically (parametric expressions are stacked in a vector) by the following commands:

simplify(TangentPlane(S,s=Pi/4,t=Pi/4));
simplify(TangentPlane(S,s=Pi/2,t=Pi/4));
simplify(TangentPlane(S,s=Pi/2,t=0));

Write the "name" that you want to use on the left side of the assignment, select it, and convert it to an Atomic Variable.

The conversion can be done as follows:

Format Menu/Convert To/Atomic Variable (Note the keyboard shortcut keys - Control+Ahift+A)

To see that you actually have created an Atomic Variable, select "Atomic Variables" in the View Menu. Atomic Variables will then display in a magenta color. Unfortunately, each time you want to refer to this variable, you have to re-create it, or copy/paste it. 

I just experimented with the following. It might work for the OP.

alias(t'=q)

The symbol t' should be made into an atomic variable. (I select the expression and use the keyboard: Control+Shift+a. Alternatively, Select "Convert To" from the Format menu and pick the Atomic option.)

Upon input, use f(x,q), and this will echo back as f(x,t'). Of course, the alias step could be skipped, and t' could be set as an atomic variable each time it is to be entered. As this could be tedious, choose your path of least annoyance.

Another possibility is to assign the equivalent of the atomic form of t' to a name. To discover the correct atomic form of the atomic variable, execute lprint(t'), where t' is set as atomic. The echo in this case will be `#mrow(mi("t"),mo("&apos;"))`

Make an assignment such as T := `#mrow(mi("t"),mo("&apos;"))`, and the input f(x,T) will echo back as f(x,t').

Try sending an email to info@maplesoft.com. If that doesn't work, let us know so we can make an alternate suggestion.

Optimization:-Minimize(g1,{g2=0},initialpoint={x1=-1,x2=3})

Returns the solution instantly. The initial point is guesswork, and is needed. 

The Tangent command in the Student Calculus1 package will do exactly what you want. It will provide the equation of the tangent line and also draw a graph showing the curve and the tangent line. No need to write any code. Just look at the help page: ?Tangent

 

First, draw a graph of the left and right sides of the inequality.

plot([abs(sin(x)-x),4/1000],x=-0.3 .. 0.3)

Then, solve explicitly for those x values that make the inequality an equality. Two choices here:

fsolve(abs(sin(x)-x)=4\/1000,x)

q:=solve(abs(sin(x)-x)=4\/1000,x):
evalf(q[1]);
evalf(q[2])

The solve command returns a RootOf structure that does not readily yield exact solutions. Hence, the evalf option.

 

The odeplot command in the plots package is designed for exactly this task.

Assign a name to the dsolve command, as in

q:=dsolve(...

Then, use the odeplot command with, for example, the following syntax.

odeplot(q,[[t,x(t)],[t,y(t)]],t=0..1,color=[red,green])

Access the help page for odeplot with ?odeplot to see the full range of options provided by this graphing tool.

Make use of the Lines&Planes tools in the Student Multivariate Calculus package to find the distance from the unknown line to each of the known lines. Each distance must be zero if the intersections are to occur. Thus, two equations in the three unknown parameters of the direction vector for the unknown line. Solve these two equations for two unknowns in terms of the third. But the length of the direction vector is immaterial. Choose a convenient value for that third parameter.

restart;
with(Student:-MultivariateCalculus):

#Define the three lines in this exercise as "Line Objects" in the Maple package.

L0:=Line([x=1+a*t,y=-2+b*t,z=3+c*t]):
L1:=Line([x=2*s+1,y=s,z=-2*s-3]):
L2:=Line([x=1-r,y=r,z=2*r+3]):

#Determine the distance from the unknown line to each of the two given lines.

d1:=Distance(L0,L1):
d2:=Distance(L0,L2):

#Set each distance to zero, and solve for, say, b and c in terms of a.

S:=solve({d1,d2},{b,c}) assuming a<>0:
#Insert the values of b and c into the unknown line, and return its equation in parametric form.
q:=GetRepresentation(eval(L0,S),form=parametric):

#The choice of a=6 removes fractions and the arbitrary length of the direction vector.
eval(q,a=6)
 

The conversions between input forms are in the Format menu. If you start with ALT R to launch the Format menu, then you will see the hot keys for "Convert To: and then 2-D Math Nonexecutable, 2-D Math Input, and 1-D Math Input. (If you use the mouse to launch the Format menu, the hot keys are not underlined.)

So, for example, if you type an expression in 2-D Math Input, use ALT-R-v-i to convert it to linear (1-D) input form.

Student[Calculus1][Roots]( (f, t = 0 .. 2*Pi, numeric=false );
 

I think you want an implementation of the Method of Lines (MoL). It's not built into Maple, but a 1-dimensional example can be found in the following video

https://www.youtube.com/watch?v=CinWCHCTjJA

in which Dr. Sam Dao shows how to use Maple's dsolve command to obviate the need to solve the time-dependent ODEs by RK4. In fact, he shows how to implement MoL using many other of Maple's labor-saving devices.

In a forthcoming webinar (November or December) I will show how to extend Dr. Dao's methods to a PDE over a 2D (spatial) region.

 

To assign a value to a name, use the syntax name := value, not just name = value.

Maple provides "literal subscripts" that are in essence, Atomic variables, and "indexed" subscripts that are essentially table values. If your Maple is set to form indexed variables when you subscript, then note that you should not assign to a name such as y if you intend assigning to a subscripted version of y. It is because of this "gotcha" that the literal subscript was made the default in Maple. You can see all such atomic variables if you select "Atomic Variables" in the View menu. All atomic variables show up in a maroon color.

The Maple syntax y[1] creates an indexed variable. If you had assigned to y[1], you would then not want to assign to y itself. The name y[1] pretty-prints as a subscripted y, so it can easily be confused visually with the Atomic version.

Assuming that your Maple is set up in its default mode, your subscripted variables will be Atomic, and you can ignore the complications referred to above.

I didn't find where y_sub_one was assigned a value. Hence, in the plot command, that quantity is unknown to Maple.

Finaly, in the plot command, the square brackets around what you want to graph are superfluous. Square brackets represent a list. You can graph what's in a 1-element list, but making a list for the graph of a single expression isn't necessary.

 

And, by the way, the error message is telling you precisely what the problem is. It's saying that y[1] contains no t, the variable that the plot command is looking for.

For many years I have used "Advanced Find and Replace" by Abacre Software to manage all my Maple files. Although it's a commercial product, not a Maplesoft product, it has served me very well as I rummaged through the thousands of files in the AEM ebook and the three Study Guides I have maintained for Maplesoft.

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