Robert Israel

6577 Reputation

21 Badges

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

MaplePrimes Activity


These are replies submitted by Robert Israel

This looks pretty similar to the old question, with a small change of variables.  What I might do is this:

> eq1:= tan(sqrt(lambda*alpha-(alpha/2)^2))
       = -2/alpha*(sqrt(lambda*alpha-(alpha/2)^2));
   eq2:= simplify(eval(eq1,lambda=mu*alpha)) assuming alpha > 0;

(I hope I'm right in assuming alpha > 0 for your problem)

eq2 := tan(1/2*alpha*(4*mu-1)^(1/2)) = -(4*mu-1)^(1/2)

> _EnvAllSolutions:= true;
  alphaz:=solve(eq2,alpha);

alphaz := 2*(-arctan((4*mu-1)^(1/2))+Pi*_Z1)/(4*mu-1)^(1/2)

>  alpha1 := eval(alphaz, _Z1=1); lambda1 := mu*alpha1;

(_Z1 = 1 seems to give the least positive lambda for given alpha)

> plot([alpha1, lambda1, mu=0.27 .. 7.9], labels = [alpha, lambda]);

 

 

 

My procedure should also give you plots in the "line" style if you wish: just include the option style = line.  Thus

> integerplot(cos(Pi*x/2),x=0..100/Pi, style=line);

 

My procedure should also give you plots in the "line" style if you wish: just include the option style = line.  Thus

> integerplot(cos(Pi*x/2),x=0..100/Pi, style=line);

 

Maybe.  I suspect what LPSolve is doing is using the type of the first argument to test whether it's being called in Matrix form or algebraic form.

Maybe.  I suspect what LPSolve is doing is using the type of the first argument to test whether it's being called in Matrix form or algebraic form.

There may be several issues:

1) You need to load the Student[Calculus1] package:

> with(Student[Calculus1]);

2) Case is important: it's CriticalPoints, not criticalpoints.

3) This is a particularly nasty example, where CriticalPoints takes a  long time to solve a fourth degree polynomial and return two very big expressions.   If you just want numerical values,  use the  numeric  option. 

> CriticalPoints(2*x^5-5*x^4+3*x^3-3*x^2+x+2,numeric);

There may be several issues:

1) You need to load the Student[Calculus1] package:

> with(Student[Calculus1]);

2) Case is important: it's CriticalPoints, not criticalpoints.

3) This is a particularly nasty example, where CriticalPoints takes a  long time to solve a fourth degree polynomial and return two very big expressions.   If you just want numerical values,  use the  numeric  option. 

> CriticalPoints(2*x^5-5*x^4+3*x^3-3*x^2+x+2,numeric);

It's fairly unlikely that guessing a name like "criticalpoints" will get you what you want.
You need to learn how to use the help system.  Choose Help, Maple Help, type critical in the box to the left of the Search button and press that button.  This brings up four results, of which one should look promising: CriticalPoints,Calculus1,Student.  Click on that and you get the help page for the command you're looking for.  In particular, look at the examples.

 In other cases you may need to search Text instead of Topics, or think of possible synonyms or terms related to what you are looking for, or think of other ways to express what you want to do.

It's fairly unlikely that guessing a name like "criticalpoints" will get you what you want.
You need to learn how to use the help system.  Choose Help, Maple Help, type critical in the box to the left of the Search button and press that button.  This brings up four results, of which one should look promising: CriticalPoints,Calculus1,Student.  Click on that and you get the help page for the command you're looking for.  In particular, look at the examples.

 In other cases you may need to search Text instead of Topics, or think of possible synonyms or terms related to what you are looking for, or think of other ways to express what you want to do.

I believe your mistake is that in this syntax c should be a Vector.  Try it with

c := Vector(32);

If there is no solution, the error message should be

Error, (in Optimization:-LPSolve) no feasible solution found
 

 

 

I believe your mistake is that in this syntax c should be a Vector.  Try it with

c := Vector(32);

If there is no solution, the error message should be

Error, (in Optimization:-LPSolve) no feasible solution found
 

 

 

Try this:

integerplot:= proc(f,r::name=range)
    local x,a,b, ff;
    a,b:= op(op(2,r)); ff:= subs(op(1,r)=x,f);
    plot([seq]([x,eval(ff)], x = ceil(a) .. floor(b)), 
       style=point,args[3..-1]);
 end proc;

For example:

> integerplot(cos(Pi*x/2),x=0..100/Pi, colour=blue, symbol=box);

 

Try this:

integerplot:= proc(f,r::name=range)
    local x,a,b, ff;
    a,b:= op(op(2,r)); ff:= subs(op(1,r)=x,f);
    plot([seq]([x,eval(ff)], x = ceil(a) .. floor(b)), 
       style=point,args[3..-1]);
 end proc;

For example:

> integerplot(cos(Pi*x/2),x=0..100/Pi, colour=blue, symbol=box);

 

From the help page ?type,atomic:

An object is of type atomic if it cannot be mapped over, that is, map(f, x)=f(x). Objects in Maple which have this property are of type name, complex(extended_numeric), indexed, string, procedure, or `module`.
 

What I am doing with dchange is a change of variables Pm = 1/u - 1, making the integral for Pm from 0 to infinity into an integral for u from 0 to 1, which should be much quicker to compute.

First 147 148 149 150 151 152 153 Last Page 149 of 187