Rouben Rostamian

MaplePrimes Activity


These are answers submitted by Rouben Rostamian

Perhaps it's best if you would ask your teacher for help.  He/She can gauge the amount of appropriate help that may be supplied in order to make this a worthwhile learning experience for you.  Your questions are not about Maple after all; they are about how to solve the assigned problem.

I assume you know about

    interface(imaginaryunit=j);

See if you can stick it in Maple's initialization file.  In Linux it is "~/.mapleinit".  I don't know what it is in other operating systems.

Will this do?

> Matrix(3,3, (i,j) -> diff(R[i](p[1],p[2],p[3]), p[j]));



Terminate each "end do" with a colon or semicolon.

Furthermore, need to initialize "dummy", as in dummy := 0; before entering the loops.

You don't want -pi/2 < alpha < pi/2.  For one thing, the term sec(alpha) in your formula blows up at Pi/2.  For another thing, sec(alpha) is an even function, so there is no reason to evaluate it on the negative range.  Therefore using Kitonum's parameters, that is,

v := <1, 0, 0>:  u := beta -> <0, cos(beta), sin(beta)>:  c := <0, 0, 0>:  a := 2:  b := 3:

plot the graph with the command

plot3d(c+a*v*sec(alpha)+b*u(beta)*tan(alpha), beta = 0 .. 2*Pi, alpha =0..Pi/3);

and you will get:

 

We know that the expression x$3 expands to x,x,x.  But what does x$0 expand to?  Nothing!  So your code runs into a problem in the k=0 case.  To fix, put the x$k inside a list, as in
    diff(f(x), [x$k]);
By the way, don't use "D" for a variable name.  In Maple D is the differntiation operator.

 

The Maple equivalent of your Matlab code is:

for i from 1 to 5 do
  for j from 1 to 5 do
    M[i,j] := i + j;
  end do;
end do;

Let's say you put that in a file named tryme.maple.  Then read that file by entering the following command in Maple:

read "tryme.maple";

 

You have

    d := plots[pointplot]([x0, y0]);

but you haven't said what x0 and y0 are.

    

Let's say you want the z axis to go from zmin to zmax.  Then give the plotting option view=zmin..zmax. 

I don't see why you would want to insist on using display() when there is no need for it.

Here is a slightly different way of doing your plots, without the help of the plots package, and without display():

for i from 1 to 5 do
    plot([sin(a[i]*x), sin(a[i+1]*x)], x=-2..2, -2..2, color=["Red","Green"],
            legend=[typeset("Curve1:",sin(a[i]*x)), typeset("Curve2:",sin(a[i+1]*x))]
    );
end do;

Push the "!!!" button.

Why do you limit yourself to ".jpg" and ".png"?  If it is for publication in a journal or a book, you (and your publisher) will want the image in the ".eps" (Encapsulated Postscript) format which is "high resolution" by default.  In fact, "high resolution" makes no sense in EPS since it is a vector image format which maintaions100% accuracy at any magnification.

I am not aware of keyboard shortcuts for zoom and pan.  As you have observed, you may do them through the drop-down menu.  A quicker way is to use the icons that appear along the top toolbar.  Here is a screenshot:

 

Click on the red icon to zoom, the blue icon to pan.

Maple is cautious with fractional powers since a fractional power of a complex number is multivalued in general.  To reassure Maple of your intent, apply abs() to y(x), as in

de := diff(y(x),x) = 3*abs(y(x))^(2/3);

 

1. In mathematical formulas the parenteses (), brackets [], and braces {} tend to be used interchangeably, but in Maple they have quite distinct meanings.  Go through your worksheet and replace all [] and {} with ().

2. The Maple syntax for defining a function like f(x,y) = x^2 + y^2 is

f := (x,y) -> x^2 + y^2

You seem to use the notation

f(x,y) := x^2 + y^2

which is incorrect.  Go through your worksheet and fix those as well.

3. Your equations contain a parameter Gr sub zero, but you have given a numerical value to Gr without the sub zero.  Why?

First 54 55 56 57 Page 56 of 57