almath

182 Reputation

2 Badges

17 years, 258 days

MaplePrimes Activity


These are questions asked by almath

 

 Dear all:

   I wonder how to integrate a function

 

f=t1^a1*t2^a2*t3^a3/(1-t1)^b1/(1-t2)^b2/(1-t3)^b3
 

  over the surface

 0<= t1,t2,t3 <=1, t1+t2+t3=1  ?

 

Thanks,

Peter

Dear all:

    I want to plot a function(say, z=x^2+y^2) on a nonsqure region(say, x^2+y^2<=1). What I did is to manually define a procedure so that it returns the function value if the sample point is inside the defined regioin, null otherwise.

 

region:=proc(x,y)
  if x^2 + y^2 <= 1 then
      return x^2+y^2;
   else
      return null;
   end if:
 
 end proc;

I hope to plot two functions f1:=x^2 ,f2:=x; and color regions in the 2d plane where f1(x) <  f2(x).  The function plot is easy but I don't know how to plot and color regions in 2D. The only solution I can think of is to sample points and use PLOT(POLYGONS())......

Is there any other ( easier !! ) ways to do this?

Thanks

Dear all:

   Maple help page says that POLYGONS() can only be used to plot convex polygons. I wonder how can I plot nonconvex polygons?

I tried a easy example
PLOT(POLYGONS([[0,0],[0,1],[1,1],[0.2,0.4],[1,0]]),COLOR(RGB,1,0,0));

which gives me sth. very strange plot...... :(

Thanks in advance.

Peter

Dear all: Inside maple, I want to call C program which is compiled using cygwin & gcc. I did a very easy one for testing. int _stdcall add( int num1, int num2 ) { return num1+num2; } and then gcc -o add.c && gcc -shared -o add.dll add.o However, this doesn't work. Maple continue to load the DLL forever...... Does anyone know the reason? I did it with Visual C++ with VC specific options and it works just fine. Thanks, Peter
1 2 3 Page 3 of 3