## 178 Reputation

17 years, 121 days

## implicit multiplication... 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.         I used context menus in both cases to generate the plots.                 This post was generated using the MaplePrimes File Manager

View file details

## Using map...

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]

## convert...

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?

## Two methods...

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.

## SetCoordinates...

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

> restart:

> with(VectorCalculus):

> SetCoordinates( 'spherical'[r,phi,theta] ); > v:=< sqrt(2), Pi/2, Pi/4 >; > MapToBasis(v,'cartesian'); To change back to set other vectors

> SetCoordinates( 'cartesian'[x,y,z] ); > w:=< 2, 3, 1>; > v; Thomas

This post was generated using the MaplePrimes File Manager

View file details

## Coords Help...

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>; > MapToBasis(v,'cylindrical'); > MapToBasis(v,'spherical'); 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>; > MapToBasis(w,'spherical'); You can change from basis format to vector format by using the "BasisFormat" command

> BasisFormat(false); > v; > MapToBasis(v,'cylindrical'); > MapToBasis(v,'spherical'); You can change back by

> BasisFormat(true); > v; Thomas

This post was generated using the MaplePrimes File Manager

View file details

## Vector and scalar projections...

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?

## Vector projection...

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

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=, 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);

## Antiderivative...

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

## How differentiate and integrate a functi...

It should work as you have written it. restart: f:=x+x*x+x*x*x; f:= x + x x + x x x diff(f,x); 1 + x + x x int(int(int(f,x=0..1),x=0..1),x=0..1); 7 - 8 Have you assigned values to x, x and x 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.

## Statistics[Quantile]...

See the help page for Statistics[Quantile]

## cartesian to polar equations...

changecoords(exp(sqrt(x^2 + y^2)), [x,y], polar, [r,theta]); simplify(%) assuming r>0;

## Plot a projection...

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