Robert Israel

6577 Reputation

21 Badges

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

MaplePrimes Activity


These are replies submitted by Robert Israel

Use the option gridlines = true (in Standard GUI: does not work in Classic).

The option filledregions was introduced, I think, in Maple 11.  In earlier versions you could use
filled=true

To get red for > 423e-6 and green for < 423e-6, try

> implicitplot(1/2*L*(14.4/(1.5+R))^2 = 423e-6, L=757.4e-6..1135.1e-6, R = 13.85..15.95,
   filled = true, coloring = [green, red]);

The option filledregions was introduced, I think, in Maple 11.  In earlier versions you could use
filled=true

To get red for > 423e-6 and green for < 423e-6, try

> implicitplot(1/2*L*(14.4/(1.5+R))^2 = 423e-6, L=757.4e-6..1135.1e-6, R = 13.85..15.95,
   filled = true, coloring = [green, red]);

Of course you have to give values to the parameters, and as Dave mentioned earlier in this thread you need quotes.  So:

> with(Statistics):
    X := RandomVariable('Beta(3,5)');
    f := PDF(X,u);
    plot(f, u = 0 .. 1);

 

It really would help if you showed us an example of what you'd like as output.

Yes, it will, but you need to give it a list (in [] brackets) rather than a set (in {}).

Try

pointplot3d([[p1],[p2],[p3],[p4],[p1],[p6],[p5],[p2],[p5],[p8],
[p3],[p8],[p7],[p4],[p7],[p6]],style=line, colour=black);

 

 

Yes, it will, but you need to give it a list (in [] brackets) rather than a set (in {}).

Try

pointplot3d([[p1],[p2],[p3],[p4],[p1],[p6],[p5],[p2],[p5],[p8],
[p3],[p8],[p7],[p4],[p7],[p6]],style=line, colour=black);

 

 

Great choice!  Congratulations, Doug.

> F:= c*ln((exp(a))/(1+exp(a)))+d*ln(1-(exp(a))/(1+exp(a)))+e*ln((exp(a+b))/(1+exp(a+b)))+f*ln(1-(exp(a+b))/(1+exp(a+b)));

(avoiding the problems Joe referred to)

> focs:= simplify([diff(F,a), diff(F,b)]); 

(I assume this is what you meant, not diff(F,a) for both)

> simplify(eval(focs, solve({p1=exp(a)/(1+exp(a)), p2 = exp(a+b)/(1+exp(a+b))},{a,b})));

[-c*p1+c-d*p1-e*p2+e-f*p2, -e*p2+e-f*p2]

The maple tag is acting up again: that result should be [-c*p1+c-d*p1-e*p2+e-f*p2, -e*p2+e-f*p2]

> F:= c*ln((exp(a))/(1+exp(a)))+d*ln(1-(exp(a))/(1+exp(a)))+e*ln((exp(a+b))/(1+exp(a+b)))+f*ln(1-(exp(a+b))/(1+exp(a+b)));

(avoiding the problems Joe referred to)

> focs:= simplify([diff(F,a), diff(F,b)]); 

(I assume this is what you meant, not diff(F,a) for both)

> simplify(eval(focs, solve({p1=exp(a)/(1+exp(a)), p2 = exp(a+b)/(1+exp(a+b))},{a,b})));

[-c*p1+c-d*p1-e*p2+e-f*p2, -e*p2+e-f*p2]

The maple tag is acting up again: that result should be [-c*p1+c-d*p1-e*p2+e-f*p2, -e*p2+e-f*p2]

My first try was using unevaluation quotes:

> plot( 2*cos(x/2-Pi/6), x=-2*Pi..2*Pi,
      tickmarks=[spacing(Pi/2,0),3],
      title=typeset("A plot of one period of \n", y='2*cos(x/2-Pi/6)') );
 

That is still not perfect: it gives you y=2*cos(1/2*x - 1/6*Pi).   So I tried this, which worked:

> plot( 2*cos(x/2-Pi/6), x=-2*Pi..2*Pi,
      tickmarks=[spacing(Pi/2,0),3],
      title=typeset("A plot of one period of \n", y=Typesetting[Typeset](2*cos(x/2-Pi/6)) ));
 

My first try was using unevaluation quotes:

> plot( 2*cos(x/2-Pi/6), x=-2*Pi..2*Pi,
      tickmarks=[spacing(Pi/2,0),3],
      title=typeset("A plot of one period of \n", y='2*cos(x/2-Pi/6)') );
 

That is still not perfect: it gives you y=2*cos(1/2*x - 1/6*Pi).   So I tried this, which worked:

> plot( 2*cos(x/2-Pi/6), x=-2*Pi..2*Pi,
      tickmarks=[spacing(Pi/2,0),3],
      title=typeset("A plot of one period of \n", y=Typesetting[Typeset](2*cos(x/2-Pi/6)) ));
 

Your question does not make sense as stated, but the answer to the question I think you meant to ask is no. 
Look at the symbolic solution I got, and ask yourself what happens as i -> infinity.

Your question does not make sense as stated, but the answer to the question I think you meant to ask is no. 
Look at the symbolic solution I got, and ask yourself what happens as i -> infinity.

Then you'd better use that.  For example:

> n := 6:
   solve( eval( {seq(x[i-1]+x[i]+x[i+1]=i,i=1..n)}, {x[0]=0, x[n+1]=0}));

{x[1] = -2, x[2] = 3, x[3] = 1, x[4] = -1, x[5] = 4, x[6] = 2}

However, note that there's no solution if n+1 is divisible by 3.

You could try for a symbolic solution.

> rsolve({x(0)=0, x(i-1)+x(i)+x(i+1)=1}, x(i));

(1/3*I)*sqrt(3)*x(1)*(-1/2-(1/2*I)*sqrt(3))^i-(1/3*I)*x(1)*sqrt(3)*(-1/2+(1/2*I)*sqrt(3))^i-(2/3)*(-2/(1-I*sqrt(3)))^i/(1-I*sqrt(3))-(2/3)*(-2/(1+I*sqrt(3)))^i/(1+I*sqrt(3))+1/3

> simplify(evalc(%));

(2/3)*sqrt(3)*x(1)*sin((2/3)*i*Pi)-(1/3)*cos((2/3)*i*Pi)-(1/3)*sin((2/3)*i*Pi)*sqrt(3)+1/3

Note that I didn't use the end condition x(n+1) = 0.  That can be used to determine x(1) (if sin((2/3)*(n+1)*Pi) is not 0).

First 111 112 113 114 115 116 117 Last Page 113 of 187