Thomas Madden

183 Reputation

7 Badges

20 years, 22 days

MaplePrimes Activity


These are answers submitted by Thomas Madden

Maple Equation

My guess is that you are using document mode. The problem comes from the implied multiplication being interpreted as a function definition. Maple uses parenthesis for function notation, for example f(x). You need to insert a space, or explicitly add the operator * between expressions to tell maple you intend multiplication, for example f (x) or f*(x) will mean multiplication.

Your example without spaces inserted

Maple Equation

Maple Equation

Maple Equation

Maple Plot

Maple Equation

Your example with spaces inserted

Maple Equation

Maple Equation

Maple Equation

Maple Plot

I used context menus in both cases to generate the plots.

Maple Equation

Maple Equation

Maple Equation

Maple Equation

Maple Equation

Maple Equation

Maple Equation

Maple Equation

Maple Equation

Maple Equation

Maple Equation

Maple Equation

Maple Equation

Maple Equation

Maple Equation

Maple Equation

Maple Equation

This post was generated using the MaplePrimes File Manager

View 162_implicit multiplication.mw on MapleNet or Download 162_implicit multiplication.mw
View file details

Using map you can do restart: X:=[$1..5]; X := [1, 2, 3, 4, 5] map(n->irem(n,13),X); [1, 2, 3, 4, 5] or you can do map(n->modp(n,13),X); [1, 2, 3, 4, 5] It does not reveal very much until you get past 12 S:=[$1..26]; S := [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26] map(n->modp(n,13),S); [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0]
BTW in regard to the OP, I thought there might be a simpler way to convert the coordinates of a point from one coordinate system to another. Something that did not involve VectorCalculus like convert(3 + 4*I, polar); polar(5, arctan(4/3)) but I was unable to find it. Is there a quick method that I missed?
You can use "spacecurve" in the "plots" package restart: with(plots): spacecurve([t,t^2,1/2*t^3],t=-5..5, axes=boxed, thickness=2); Note that in this case you can use a list [ t, t^2, 1/2*t^3] or vector < t, t^2, 1/2*t^3 > or you can use "SpaceCurve" in the "VectorCalculus" package restart: with(VectorCalculus): SpaceCurve(,t=-5..5, axes=boxed, thickness=2); In this case I think you can only use a vector < t, t^2, 1/2*t^3 > edit: I should have written two methods that I can think of, there may be other methods as well.

You can set the coordinates by using the "SetCoordinates" command.

> restart:

> with(VectorCalculus):

> SetCoordinates( 'spherical'[r,phi,theta] );

Maple Equation

> v:=< sqrt(2), Pi/2, Pi/4 >;

Maple Equation

> MapToBasis(v,'cartesian');

Maple Equation

To change back to set other vectors

> SetCoordinates( 'cartesian'[x,y,z] );

Maple Equation

> w:=< 2, 3, 1>;

Maple Equation

> v;

Maple Equation

Thomas

This post was generated using the MaplePrimes File Manager

View 162_coords2a.mw on MapleNet or Download 162_coords2a.mw
View file details

One method is to load the VectorCalculus package. This is done by using the "with" command (The restart command causes the Maple kernel to clear its internal memory so that Maple acts (almost) as if just started.)

> restart:

> with(VectorCalculus):

This is the shortcut for constructing a vector, see the help by typing "?shortcut" then "enter"

> v:=<1,1,1>;

Maple Equation

> MapToBasis(v,'cylindrical');

Maple Equation

> MapToBasis(v,'spherical');

Maple Equation

Note that in spherical coordinates Maple uses the convention that phi is measured from the positive z-axis with ordered triples (r, phi, theta), not (r, theta, phi).

> w:=<1,1,0>;

Maple Equation

> MapToBasis(w,'spherical');

Maple Equation

You can change from basis format to vector format by using the "BasisFormat" command

> BasisFormat(false);

Maple Equation

> v;

Maple Equation

> MapToBasis(v,'cylindrical');

Maple Equation

> MapToBasis(v,'spherical');

Maple Equation

You can change back by

> BasisFormat(true);

Maple Equation

> v;

Maple Equation

Thomas

This post was generated using the MaplePrimes File Manager

View 162_coords2.mw on MapleNet or Download 162_coords2.mw
View file details

jmwolfpack, Do you know how to find these by hand and just want to know how to do it with Maple? Or, do you need help with both?
That is the vector projection of a onto b. edit: This is a reply to Georgios, but I forgot to hit reply first.
Another method that is sometimes useful with this type of problem is plotting contours. For example with your problem: restart: with(plots): contourplot(abs(x-y)+abs(x)-abs(y), x=-4..4, y=-4..4, contours=[2], filledregions=true); It is a good idea to look at the graph in R^3 first to see the behavior of the function. For this problem: plot3d(abs(x-y)+abs(x)-abs(y), x=-3..3, y=-3..3, axes=boxed);
Additionally, if you would like the antiderivative produced by Maxima you can use expand first: expand(5-(5-x)^2); -20+10*x-x^2 int(%,x); -20*x+5*x^2-(1/3)*x^3 or more simply int(expand(5-(5-x)^2),x); -20*x+5*x^2-(1/3)*x^3
It should work as you have written it. restart: f:=x[1]+x[1]*x[2]+x[1]*x[2]*x[3]; f:= x[1] + x[1] x[2] + x[1] x[2] x[3] diff(f,x[1]); 1 + x[2] + x[2] x[3] int(int(int(f,x[1]=0..1),x[2]=0..1),x[3]=0..1); 7 - 8 Have you assigned values to x[1], x[2] and x[3] anywhere in your worksheet prior to executing those commands? What version of Maple are you using? Also, are you using document mode or worksheet mode? You have to be careful with indexed names. See this discussion.

See the help page for Statistics[Quantile]

changecoords(exp(sqrt(x^2 + y^2)), [x,y], polar, [r,theta]); simplify(%) assuming r>0;
Are you looking for something like this? restart: with(VectorCalculus): pv:=PositionVector([v*cos(t),t,0], cartesian[x,y,z]); PlotPositionVector(pv, t=-Pi/2..Pi/2, v=-Pi..Pi); Note: I changed your variables since "fi" is a reserved word.
1 2 3 4 5 6 Page 2 of 6