Question: maximum & minimum of aN implicit function

Hi every one,

Q1:

I tried to get the max $ min of a following function:

 

l:=1:alpha:=1:b:=100:k:=20:

eq1 := (alpha+(l+alpha)*u+alpha*k*u^2)*a =
u*(alpha+(l+alpha)*u+alpha*k*u^2)*(1+l*alpha*b/((alpha+(l+alpha)*u+alpha*k*u^2))):

I did this code but it seems it didnt work for this equation

maximize(eq, u=1..12, location);

minimize(eq, u=1..12, location);

Also, I think about solving the cubic i feel i'm so close to the solve but couldn't

factor((rhs-lhs)(eq1));

eq:=collect(%,u);

Q:=(a,u)->eq;sol:=evalf(solve(Q(a,u),u)): S:=array([],1..3): S[1]:=sol[1]:S[2]:=sol[2]:S[3]:=sol[3]:

Q2:

the same thing wanted to get the maximum and the minimum of the function v

here the code

restart;
eq1:=(alpha+(l+alpha)*u+alpha*k*u^2)*a=
u*(alpha+(l+alpha)*u+alpha*k*u^2)*(1+l*alpha*b/((alpha+(l+alpha)*u+alpha*k*u^2)));
eq2:=v=alpha*b*(1+u+k*u^2)/(alpha+(l+alpha)*u+alpha*k*u^2);
factor((rhs-lhs)(eq1));
eq1:=collect(%,u);
params:={l=10,alpha=0.5,b=100,k=20};
U:=[solve(eval(eq1,params),u)]; #3 solutions for u
#plots:-complexplot(U,a=0..20,style=point); #plot in the complex u-plane
vua:=eval(solve(eq2,v),params): #v expressed in terms of u and a
V:=eval~(vua,u=~U): #the 3 solutions for v in terms of a

## PLOT the function V
plot(V,a=0..75,v=0..100,color=black,labels=[a,v],axes=boxed,numpoints=90,linestyle=1,font=[1,1,18],thickness=2,tickmarks=[4,4],view=[0..65,25..100]);

I do appricaited any advises

Please Wait...