## 295 Reputation

16 years, 232 days

## Plot Riemann sums for double integals...

Maple

I know that student[middlebox] can graph an approximation of an integral.
For example,
with(plots):
with(student):
f:=x->sin(x)+0.2*x+0.5:
a:=0: b:=16: N:=10:
C:=plot(f(x), x=a..b):
R:=middlebox(f(x), x=a..b, N):
display(C,R);

I need to know how to use Maple to do the same plotting for double integrals. Thanks for your help.

## numpoints vs grid...

Maple

In implicitplot, to insure the accuracy  of a curve, I usually increase the number of points (numpoints=*** ) or increase the number of grids ( grid=[***,***] ). Both can improve the quality of the curve. And sometimes one works better than the other. But I don't quite understand the relationship between the two options , and which is more effective and more economical. Thanks.

## Implicitplot problem...

Maple

I want to plot  the astroid by the following code, but only the part in the first quadrant appears. I don't know that is wrong and how to solve the problem. Thanks.

with(plots):
a:=1:
implicitplot(x^(2/3)+y^(2/3)=a^(2/3),x=-a..a,y=-a..a);

## regular polygon...

Does Maple have a command for plotting  regular polygons? How can I plot a regular polygon insrcibed in a circle? Thanks.

By the way, I read from a book that an N-polygon can be plotted as follows. But I wonder if this is the easiest way.

with(plots):with(plottools):
R:=1:
C:=circle([0,0],R,color=red,thickness=3):
N:=7:
a:=I*(2*Pi*i/N+Pi/2):t:=R*exp(a):
P:=polygonplot([[seq([Re(t),Im(t)],i=1..N)]],color=blue):
display(C,P);

## An animation problem...

Maple

I wanted to make an animation of the 3-leaved rose, but the following codes only produce the separate figures.

with(plots):
r:=sin(3*t):

K:=30: for i from 1 to K do ti:=i*2*Pi/K:

curve[i]:=polarplot(r(t), t=0..ti) od:

C:=display(seq(curve[i],i=1..K), insequence=true):

display(C, scaling=constrained,tickmarks=[0,0], thickness=3);

The following codes produces the animation I needed.
with(plots):
r:=sin(3*t):

K:=30: for i from 1 to K do ti:=i*2*Pi/K:

curve[i]:=polarplot(r(t), t=0..ti) od:

C:=display(seq(curve[i],i=1..K), insequence=true):

display(C, C, scaling=constrained,tickmarks=[0,0], thickness=3);

The only difference is in the last line, where the “C” has been written twice instead of once. I don’t know why. Could anyone explain it to me? Thanks.

 1 2 3 Page 2 of 3
﻿