Robert Israel

6577 Reputation

21 Badges

18 years, 210 days
University of British Columbia
Associate Professor Emeritus
North York, Ontario, Canada

MaplePrimes Activity


These are answers submitted by Robert Israel

The first thing to do is decide what mathematical model to use. Is this supposed to be an exponential growth question (the 1000 being a red herring), or perhaps logistic growth with a carrying capacity of 1000? Actually I doubt that either of these is a very good model for an ant colony (since there is just one queen, and the workers don't reproduce), but that's probably not an issue if this is a homework problem.
How should the cone and/or plane be moving in the animation? Perhaps something like this?
> with(plots):
  cone:= plot3d([z,t,z],t=0..2*Pi,z=-2..2,
     coords=cylindrical, style=patchnogrid):
  P:= t -> display([
       plot3d([cos(t)*s,y,1+sin(t)*s],s=-4..4,y=-2..2,
         style=patch,grid=[6,6]),
       intersectplot(
         surface(x^2+y^2=z^2,x=-2..2,y=-2..2,z=-2..2),
         surface([cos(t)*s,y,1+sin(t)*s],s=-4..4,y=-2..2))]):
  animate(P, [t], t=0..Pi, background=cone, paraminfo=false,
        orientation=[20,80],scaling=constrained);
You might try singularities in the DEtools package. Of course, your instructor might prefer that you do the work rather than Maple.
I assume you mean you want the double integral of sqrt(1-x^2-y^2) over the region x^6 + y^6 <= 1. If you want the x integral outside and the y integral inside, x goes from -1 to 1 and y from -(1-x^6)^(1/6) to (1-x^6)^(1/6). However, Maple can't do this in closed form. Even getting a numerical value is not so straightforward, because there are nasty singularities involved. You could first transform to polar coordinates, and do the inner integral symbolically:
> J:= Int(int(r*sqrt(1-r^2),r=0..(cos(t)^6+sin(t)^6)^(-1/6)),
          t=0..2*Pi);
  J:= simplify(J);
  evalf(J);
2.094395102+.2938004862*I
dsolve is the command to solve differential equations and initial value problems. For example:
> dsolve({m*D(v)(t) = -k*v(t)^n, v(0)=v0}, v(t));
If I understand you correctly, you want your function f to solve the system of inequalities (x-t)^2 + y^2 < 1, t > 0, t < T (where T is some given numeric constant > 0). You can do it (for numeric values of x and y) with
> f := (x,y) -> 
    solve({(x-t)^2 + y^2 < 1, t > 0, t < T}, t);
I was somewhat disappointed to see that this would not work with symbolic x, y. But with a little thought you can define it by hand:
> f := (x,y) -> piecewise(abs(y) <1,   
      RealRange(Open(max(0,x-sqrt(1-y^2))),
        Open(min(T,x+sqrt(1-y^2)))),
      NULL);
First of all, this is Fourier series, not the Fourier transform. Second, if you're working on the interval [0,Pi/2], the functions cos(n*x) are not orthogonal. Perhaps you mean to use [0, Pi] instead? Third, you might try Karel Srot's FourierTrigSeries package, available here.
I suspect the problem here is that koandrew has b(b-1) instead of b*(b-1). When using 2D Math input, you can put a space between these instead of *, but if you just type b(b-1) Maple will think this is the function b applied to b-1. This is just one reason that it's best to avoid 2D Math input.
Does "within one standard deviation" include the case where it's exactly one standard deviation away? If so:
> with(Statistics):
  X:= RandomVariable(Poisson(16));
  mu:= Mean(X);
  sigma:= StandardDeviation(X);
  Probability(abs(X - mu) <= sigma);
mu := 16 sigma := 4 61124790107770978304/9280784638125*exp(-16)
> evalf(%);
.7411753641
It's so much simpler to type *. Implied multiplication starts out as a convenience, but when you look closer there are all these little traps for the unwary. I hope nobody is planning to introduce the next bit of "natural" mathematical notation: removing parentheses in the trig and log functions.
> P := proc(L::list, V::listlist)
  local S,t;
  for S in combinat[powerset]([$1..nops(L)]) do
    if S = {} then next end if;
    print(add(L[t],t=S), add(V[t],t=S))
  end do
end proc;
So for your example:
> P([a,b,c],[[1,0,0],[0,1,0],[0,0,1]]);
I'd do it this way.
> koch:= proc(p1,p2,p3,n,flag)
    local R; 
    R:= [p1,p2,p3];
    if n >= 1 then
      R:= R, koch(p1, p1+(p2-p3)/2, (p1+p2)/2, n-1, false),
          koch(p2, p2+(p3-p1)/2, (p2+p3)/2, n-1, false);
      if flag then
         R:= R, koch(p3,p3+(p1-p2)/2,(p1+p3)/2, n-1, false)
      end if
    end if;
    R
  end proc;
  plots[polygonplot](
    [koch([0,0],[.5,sqrt(3.)/2],[1,0], 6, true)],
     colour=blue, axes=none, scaling=constrained);
1) It's a telescoping series or 2) ln(1 + x) >= x/2 for 0 <= x <= 1
Try this:
> with(plottools):
  sierpinski:= proc(x,y,r,n)
   rectangle([x+r/3,y+r/3],[x+2*r/3,y+2*r/3],colour=white),
     `if`(n>0,seq(sierpinski(x+L[1]*r/3,y+L[2]*r/3,r/3,n-1),
        L = [[0,0],[1,0],[2,0],[0,1],[2,1],[0,2],[1,2],[2,2]]),NULL)
  end proc;
  plots[display](sierpinski(0,0,1,4),
    rectangle([0,0],[1,1],colour=blue), style=patchnogrid);
Start studying early, and get plenty of sleep the night before the exam (this may be too late for this exam, but hopefully there will be others...) Make sure you understand the question before you start calculating. THINK! What information is given? What do I need to find out? Is there another way of doing it? Is the answer reasonable?
First 120 121 122 123 124 125 126 Last Page 122 of 138