acer

32385 Reputation

29 Badges

19 years, 334 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are answers submitted by acer

Using evalf[4] is a bad idea. The prevents Maple from using an adequate amount of working precision. If you only need 4 digits of accuracy then better would be to utilize the epsilon=10.0^(-4) option of evalf(Int(...)) .

If you want to do purely numeric integration then call evalf(Int(...)) where capitalised Int is inert. Your worksheet was trying to do symbolic integration first (and consuming large resources until it failed, partly because symbolic integration in the presence of float coefficients is not a good idea). 

The following are all done (in Maple 18, just as you tried it) very quickly.

restart

`λ1_B`[so] := 10.94:

NULL

W[1] := evalf(Int(`α_B`[so]^2/((z-1+`α_B`[so])^2*(z^(`λ2_B`[so]/`λ1_B`[so])-1+`α_B`[so])), z = 1 .. infinity));

.9534065377

0.4866131761e-2

0.1272340450e-2

0.1743379456e-1

0.6784880009e-3

0.3346927628e-2

0.5053345966e-3

0.1359458287e-3

0.1640449195e-3

0.5093746803e-4

0.7366478346e-4

NULL

NULL

Download ask_maple_ac.mw

m2 := map(rhs,m1);

It's not clear whether you expect all other variables (parameters) to be free, or subject to some conditions.

When you call solve(sys,{p,q}) you are asking for solutions without restrictions on the parameters. But perhaps that's not what you are after.

Compare with the result of calling simply  solve(sys);

If the condition C=0 holds then any p and q provide a solution.

There are other restricted cases. For example if R takes its values from a specific formula (in the remaining parameters) then there are infinitely many solutions where p=I*q or p=-I*q and q is anything. Notice that in some of the following omega__n cannot be zero.

restart;

Eq1:=61*q*L__1^2*C*e*eta/(16*omega__n^2)+5*q*L__1^2*C*e^3*eta^3/(8*omega__n^4)
+3*C*p^3*gamma__1*(1/4)+3*q*C*p^2*R__n/(4*omega__n)
+q*L__1^2*C*e^4*eta^4/(16*omega__n^5)+145*q*L__1^2*C/(64*omega__n)
+3*q^3*C*R__n/(4*omega__n)+3*p*C*q^2*gamma__1*(1/4)+q*R*C/(4*omega__n)
+19*q*L__1^2*C*e^2*eta^2/(8*omega__n^3);

(61/16)*q*L__1^2*C*e*eta/omega__n^2+(5/8)*q*L__1^2*C*e^3*eta^3/omega__n^4+(3/4)*C*p^3*gamma__1+(3/4)*q*C*p^2*R__n/omega__n+(1/16)*q*L__1^2*C*e^4*eta^4/omega__n^5+(145/64)*q*L__1^2*C/omega__n+(3/4)*q^3*C*R__n/omega__n+(3/4)*p*C*q^2*gamma__1+(1/4)*q*R*C/omega__n+(19/8)*q*L__1^2*C*e^2*eta^2/omega__n^3

Eq2:=-3*C*p^3*R__n/(4*omega__n)-3*p*C*q^2*R__n/(4*omega__n)
-p*L__1^2*C*e^4*eta^4/(16*omega__n^5)-5*p*L__1^2*C*e^3*eta^3/(8*omega__n^4)
-19*p*L__1^2*C*e^2*eta^2/(8*omega__n^3)-61*p*L__1^2*C*e*eta/(16*omega__n^2)
-145*p*L__1^2*C/(64*omega__n)-p*R*C/(4*omega__n)+3*q*C*p^2*gamma__1*(1/4)
+3*q^3*C*gamma__1*(1/4);

-(3/4)*C*p^3*R__n/omega__n-(3/4)*p*C*q^2*R__n/omega__n-(1/16)*p*L__1^2*C*e^4*eta^4/omega__n^5-(5/8)*p*L__1^2*C*e^3*eta^3/omega__n^4-(19/8)*p*L__1^2*C*e^2*eta^2/omega__n^3-(61/16)*p*L__1^2*C*e*eta/omega__n^2-(145/64)*p*L__1^2*C/omega__n-(1/4)*p*R*C/omega__n+(3/4)*q*C*p^2*gamma__1+(3/4)*q^3*C*gamma__1

sys := {Eq1, Eq2}:

solve(sys, {p,q});

{p = 0, q = 0}

solve(sys);

{C = 0, L__1 = L__1, R = R, R__n = R__n, e = e, eta = eta, p = p, q = q, gamma__1 = gamma__1, omega__n = omega__n}, {C = C, L__1 = L__1, R = -(1/16)*(4*L__1^2*e^4*eta^4+40*L__1^2*e^3*eta^3*omega__n+152*L__1^2*e^2*eta^2*omega__n^2+244*L__1^2*e*eta*omega__n^3+48*R__n*p^2*omega__n^4+48*R__n*q^2*omega__n^4+145*L__1^2*omega__n^4)/omega__n^4, R__n = R__n, e = e, eta = eta, p = p, q = q, gamma__1 = 0, omega__n = omega__n}, {C = C, L__1 = L__1, R = R, R__n = R__n, e = e, eta = eta, p = 0, q = 0, gamma__1 = gamma__1, omega__n = omega__n}, {C = C, L__1 = L__1, R = -(1/16)*L__1^2*(4*e^4*eta^4+40*e^3*eta^3*omega__n+152*e^2*eta^2*omega__n^2+244*e*eta*omega__n^3+145*omega__n^4)/omega__n^4, R__n = R__n, e = e, eta = eta, p = RootOf(_Z^2+1)*q, q = q, gamma__1 = gamma__1, omega__n = omega__n}

solve(eval(sys,C=0), {p,q});

{p = p, q = q}

solve(eval(sys,gamma__1=0), {p,q}, explicit);

{p = (1/12)*(-3*R__n*(4*L__1^2*e^4*eta^4+40*L__1^2*e^3*eta^3*omega__n+152*L__1^2*e^2*eta^2*omega__n^2+244*L__1^2*e*eta*omega__n^3+48*R__n*q^2*omega__n^4+145*L__1^2*omega__n^4+16*R*omega__n^4))^(1/2)/(R__n*omega__n^2), q = q}, {p = -(1/12)*(-3*R__n*(4*L__1^2*e^4*eta^4+40*L__1^2*e^3*eta^3*omega__n+152*L__1^2*e^2*eta^2*omega__n^2+244*L__1^2*e*eta*omega__n^3+48*R__n*q^2*omega__n^4+145*L__1^2*omega__n^4+16*R*omega__n^4))^(1/2)/(R__n*omega__n^2), q = q}, {p = 0, q = 0}, {p = 0, q = (1/12)*(-3*R__n*(4*L__1^2*e^4*eta^4+40*L__1^2*e^3*eta^3*omega__n+152*L__1^2*e^2*eta^2*omega__n^2+244*L__1^2*e*eta*omega__n^3+145*L__1^2*omega__n^4+16*R*omega__n^4))^(1/2)/(R__n*omega__n^2)}, {p = 0, q = -(1/12)*(-3*R__n*(4*L__1^2*e^4*eta^4+40*L__1^2*e^3*eta^3*omega__n+152*L__1^2*e^2*eta^2*omega__n^2+244*L__1^2*e*eta*omega__n^3+145*L__1^2*omega__n^4+16*R*omega__n^4))^(1/2)/(R__n*omega__n^2)}

solve(sys,{p,q,R},explicit);

{R = R, p = 0, q = 0}, {R = -(1/16)*L__1^2*(4*e^4*eta^4+40*e^3*eta^3*omega__n+152*e^2*eta^2*omega__n^2+244*e*eta*omega__n^3+145*omega__n^4)/omega__n^4, p = I*q, q = q}, {R = -(1/16)*L__1^2*(4*e^4*eta^4+40*e^3*eta^3*omega__n+152*e^2*eta^2*omega__n^2+244*e*eta*omega__n^3+145*omega__n^4)/omega__n^4, p = -I*q, q = q}

solve(sys,{p,q},parametric); # wide output

 

Download solveparametric.mw

I have edited my response so that it works in Maple 18.02, 2015.2, 2016.2, 2017.2, 2018.2 and 2019.1, etc (and so that it doesn't rely on the so-called "hover-over" contour labelling functionality introduced in Maple 2017).

I also added support for filledregions, and it works similarly to plots:-contourplot in the sense that it uses solid colors for the regions. This is in contrast to plots:-densityplot which fills the regions with color gradations. (See the last example for the distinction.)

It properly supports only the "zgradient" scheme. And it only supports the expression form calling sequence of plots:-contourplot.

But the main point is that it allows for schemes other than just the original request. (Ie. not just mimicing part of a rainbow.)

restart;

kernelopts(version);

`Maple 18.02, X86 64 LINUX, Oct 20 2014, Build ID 991181`

CP:=proc({contours::list(numeric):=[]},
         {colorscheme::list:=NULL})
  local cP,CPraw,CVlist,CVnew,CVvals,pnP,PNlist,PNnew,PNvals,
        Carray,pCarray,CVPN,F,helper,i,j,other,T,pnT,u,vars,version;
  version:=parse((s->s[7..StringTools:-Search(",",s)-1])(convert(kernelopts(version),
                                                                 string)));
  vars := [seq(lhs(u),u=select(type,[_rest],name=range(realcons)))];
  F:=unapply(args[1],vars);
  if nops(contours)=0 then error "at least one contour is required"; end if;
  CPraw:=plots:-contourplot(_rest,':-contours'=contours,
                            ':-coloring'=["red","blue"]);
  CVPN,other:=selectremove(type,[op(CPraw)],'specfunc'(anything,{CURVES,POLYGONS}));
  CVlist,PNlist:=selectremove(type,CVPN,'specfunc'(anything,{CURVES}));
  CVlist:=subsindets(CVlist,'specfunc'(anything,{COLOR,COLOUR}),()->NULL);
  CVlist:=select(u->hastype(u,[numeric,numeric]),CVlist);
  PNlist:=subsindets(PNlist,'specfunc'(anything,{COLOR,COLOUR}),()->NULL);
  PNlist:=select(u->hastype(u,[numeric,numeric]),PNlist);
  # Separating all the polygons is possible, but it's not
  # worth it since densityplot is more efficient.
  ##PNlist:=map(pn->seq(POLYGONS(this,op(remove(type,[op(pn)],list))),
  ##                    this=select(type,[op(pn)],list)),PNlist);
  helper:=proc(c) local cc;
                    if nops(c)>0 then
                      add(F(op(cc)),cc=c)/nops(c);
                    else undefined; end if;
                  end proc;
  CVvals:=map(CV->helper([op(indets(CV,[numeric,numeric]))]),CVlist);
  if version < 2016 then
    cP:=plots:-pointplot3d([seq([i,1,CVvals[i]],i=1..nops(CVvals))],
                           ':-colorscheme'=colorscheme);
  else
    cP:=plot([seq([i,CVvals[i]],i=1..nops(CVvals))],
             ':-colorscheme'=colorscheme);
  end if;
  Carray:=op([2],indets(cP,{'specfunc'(anything,{COLOR,COLOUR})})[1]);
  if nops(ArrayTools:-Dimensions(Carray))=2 then
    T:=table([seq(CVvals[i]=[seq(Carray[i,j],j=1..3)],i=1..nops(CVvals))]);
  elif nops(ArrayTools:-Dimensions(Carray))=3 then
    T:=table([seq(CVvals[i]=[seq(Carray[i,1,j],j=1..3)],i=1..nops(CVvals))]);
  end if;
  CVnew:=seq(CURVES(op(CVlist[i]),`if`(CVvals[i]<>undefined,
                                       COLOUR(RGB,op(T[CVvals[i]])),
                                       NULL)),i=1..nops(CVlist));
  PNvals:=map(PN->helper([op(indets(PN,[numeric,numeric]))]),PNlist);
  if PNvals::list(numeric) and nops(PNvals)>0 then
    if version < 2016 then
      pnP:=plots:-pointplot3d([seq([i,1,PNvals[i]],i=1..nops(PNvals))],
                              ':-colorscheme'=colorscheme);
    else
      pnP:=plot([seq([i,PNvals[i]],i=1..nops(PNvals))],
                ':-colorscheme'=colorscheme);
    end if;
    pCarray:=op([2],indets(pnP,{'specfunc'(anything,{COLOR,COLOUR})})[1]);
    if nops(ArrayTools:-Dimensions(Carray))=2 then
      pnT:=table([seq(PNvals[i]=[seq(pCarray[i,j],j=1..3)],i=1..nops(PNvals))]);
    elif nops(ArrayTools:-Dimensions(pCarray))=3 then
      pnT:=table([seq(PNvals[i]=[seq(pCarray[i,1,j],j=1..3)],i=1..nops(PNvals))]);
    end if;
    PNnew:=seq(POLYGONS(op(PNlist[i]),COLOUR(RGB,op(pnT[PNvals[i]]))),i=1..nops(PNlist));
  else
    PNnew:=NULL;
  end if;
  PLOT(CVnew,PNnew,op(other));
end proc:

#
#
#

cont1:=[-0.99, seq(-0.9 .. -0.1, 0.1), seq(0.1 .. 0.9, 0.1), 0.99]:

scheme1:=["zgradient",["Blue", "Green", "Yellow", "Red"]];

["zgradient", ["Blue", "Green", "Yellow", "Red"]]

P1:=CP(sin(x*y), x = -2 .. 2, y = -2 .. 2,
       axes = framed, gridlines=false, grid=[101,101],
       contours = cont1,
       colorscheme=scheme1):
P1;

transformer:=plottools:-transform((x,y)->[x,y,-1]):

plots:-display(
  plot3d(sin(x*y), x = -2 .. 2, y = -2 .. 2,
         colorscheme = scheme1),
  subsindets(transformer(P1),
             'specfunc'(anything,_GRIDLINES),()->NULL)
);

#
# The procedure CP also handles filledregions.
#
P1filled:=CP(sin(x*y), x = -2 .. 2, y = -2 .. 2,
       axes = framed, gridlines=false, grid=[101,101],
       contours = cont1, filledregions,
       colorscheme=scheme1):
P1filled;

plots:-display(
  plot3d(sin(x*y), x = -2 .. 2, y = -2 .. 2,
         colorscheme = scheme1),
  subsindets(transformer(P1filled),
             'specfunc'(anything,_GRIDLINES),()->NULL)
);

P2:=CP(cos(s*t), s = -2 .. 2, t = -2 .. 2,
       axes = framed, gridlines=false, grid=[101,101],
       contours = cont1,
       colorscheme=["zgradient",["Blue", "Cyan", "Green", "Orange", "Yellow", "Red"]]):
P2;

cont2:=[seq(-1.0 .. -0.05, 0.05), seq(0.05 .. 1.0, 0.05)]:
scheme2:=["zgradient",["Green", "Purple", "Yellow", "Blue"]];

["zgradient", ["Green", "Purple", "Yellow", "Blue"]]

P3:=CP(sin(a)*b^2, a = -Pi+0.1 .. Pi-0.1, b = -1..1,
       axes = framed, gridlines=false,
       contours = cont2, colorscheme=scheme2):
P3;

transformer:=plottools:-transform((x,y)->[x,y,-1]):

plots:-display(
  plot3d(sin(a)*b^2, a = -Pi+0.1 .. Pi-0.1, b = -1..1,
         colorscheme = scheme2),
  subsindets(transformer(P3),
             'specfunc'(anything,_GRIDLINES),()->NULL)
);

P3filled:=CP(sin(x)*y^2, x = -Pi+0.1 .. Pi-0.1, y = -1..1,
       axes = framed, gridlines=false, filledregions,
       contours = cont2,
       colorscheme=scheme2):
P3filled;

plots:-display(
  plot3d(sin(x)*y^2, x = -Pi+0.1 .. Pi-0.1, y = -1..1,
         colorscheme = scheme2),
  subsindets(transformer(P3filled),
             'specfunc'(anything,_GRIDLINES),()->NULL)
);

# without the contour lines themselves
plots:-display(
  plot3d(sin(x)*y^2, x=-Pi+0.1..Pi-0.1, y=-1..1,
         colorscheme=scheme2),
  subsindets(transformer(P3filled),
             'specfunc'(anything,{CURVES,_GRIDLINES}),()->NULL)
);

P3dens:=plots:-densityplot(sin(x)*y^2,x=-Pi+0.1..Pi-0.1,y=-1..1,
                           style=surface,colorscheme=scheme2,axes=box):
P3dens;

plots:-display(
  plot3d(sin(x)*y^2, x=-Pi+0.1..Pi-0.1, y=-1..1,
         colorscheme=scheme2),
  transformer(P3dens)
);

 

contourplot_colorscheme_P_1802.zip

Here is my original answer, which requires the so-called "hover-over" contour labelling functionality introduced in Maple 2017.

Download contourplot_colorscheme.mw

You are trying to concatenate the strings (possibly including some white space, etc, to separate them).

How about something like these:

SetProperty(Label0, caption, sprintf("%s %s", textOne, textTwo) );

SetProperty(Label0, caption, sprintf("%s, %s", textOne, textTwo) );

Using Kitonum's procedure with Carl Love's improvements:

    https://mapleprimes.com/posts/202222-Contour-Curves-With-Labels

But also using plottools:-transform to get the plot of u versus x and t.

You may wish to adjust the choice of colors, or the choice of labelled contour values (assigned to conts1 in the code below) so as to get better placement.

restart;

# Kitonum's procedure with Carl Love's improvements.
#
# https://mapleprimes.com/posts/202222-Contour-Curves-With-Labels
#
ContoursWithLabels:= proc(
     Expr::algebraic,
     Range1::(name= range(realcons)), Range2::(name= range(realcons)),
     {contours::{posint, {set,list}(realcons)}:= 8},
     {ImplicitplotOptions::{list,set}({name, name= anything}):= NULL},
     {GraphicOptions::{list,set}({name, name= anything}):= NULL},
     {TextOptions::{list,set}({name, name= anything}):= NULL},
     {Coloring::{list,set}({name, name= anything}):= NULL}
)
local
     r1, r2, f, L1, h, S1, P, r, M, C, T, p, p1, m, n, i,
     x:= lhs(Range1), y:= lhs(Range2)
;
     f:= unapply(Expr, (x,y));
     if contours::posint then
          r1:= rand(convert(rhs(Range1), float));
          r2:= rand(convert(rhs(Range2), float));
          L1:= select(type, (f@op)~({seq([r1,r2](), i= 1..205)}), realcons);
          h:= (L1[-6]-L1[1])/contours;
          S1:= [seq(L1[1]+h/2+h*(n-1), n= 1..contours)]
     else #contours::{set,list}(realcons)
          S1:= [contours[]]
     end if;
     userinfo(1, ContoursWithLabels, print('Contours' = evalf[2](S1)), `\n`);
     r:= k-> rand(20..k-20);
     for C in S1 do
          P:= plots:-implicitplot(
               Expr = C, Range1, Range2,
               gridrefine= 3, ImplicitplotOptions[]
          );
          for p in [plottools:-getdata(P)] do
               p1:= convert(p[3], listlist);
               n:= nops(p1);
               if n < 500 then
                    m:= `if`(40 < n, r(n)(), round(n/2));
                    M[`if`(40 < n, [p1[1..m-11], p1[m+11..n]], [p1])[]]:= NULL;
                    T[[p1[m][], evalf[2](C)]]:= NULL
               else
                    h:= trunc(n/2);
                    m:= r(h)();
                    M[p1[1..m-11], p1[m+11..m+h-11], p1[m+h+11..n]]:= NULL;
                    T[[p1[m][], evalf[2](C)], [p1[m+h][], evalf[2](C)]]:= NULL
               end if
          end do
     end do;
     plots:-display(
          [`if`(
               Coloring = NULL,
               NULL,
               plots:-densityplot(Expr, Range1, Range2, Coloring[])
          ),
          plot([indices(M, 'nolist')], color= black, GraphicOptions[]),
          plots:-textplot([indices(T, 'nolist')], TextOptions[])
         ], 'axes'= 'box', 'gridlines'= false, _rest
     )
end proc:

#
#
#

u:=1-(8*(10.3968*t^2-5.8368*t*f-.229376*f^2-5.1984))/(4.56*t^2-2.56*t*f+.8192*f^2+2.28)^2:

x:=f+t-(8*(-2.28*t+.64*f))/(2.28+2*(-t+.64*f)^2+2.56*t^2):

#
#
#

conts1:=[0.1, 0.3, 0.5, 0.7, 0.9, 1.3, 2.0]:
Pft := ContoursWithLabels(
       u,f=-7..7, t=-7..7, contours= conts1,
       TextOptions=[font=[HELVETICA,BOLD,10], color=red],
       ImplicitplotOptions=[gridrefine=4],
       GraphicOptions=[thickness=0],
       labelfont=[TIMES,BOLDITALIC,16], axesfont=[HELVETICA,8]):

conts2:=[seq(0.0..1.0, 0.1), seq(2.0..6.0, 1.0)]:
plots:-display(
  plottools:-transform((a,b)->eval([x,t],[f=a,t=b]))(Pft),
  subsindets(plots:-contourplot([x,t,u], f=-7..7, t=-7..7, grid=[101,101],
                       coloring=["Orange","Blue"], contours=conts2,
                       thickness=0, filledregions),
              specfunc(CURVES),()->NULL),
  size=[800,400], labels=["x","t"]
);


Download contour_labels_transformed.mw

 

It's not helpful or polite to only supply an image of the equations. And so I may have mistyped something.

Also, I notice that you changed your system since you first posted the Question.

What did you obtain from calling solve?

restart;

interface(imaginaryunit=IM):

local gamma:

eqs := [lambda__H-beta__1*S__H*I__R/(S__R+I__R)-beta__2*S__H*I__H/(S__H+E__H+I__H+R__H)-mu*S__H=0,
        beta__1*S__H*I__R/(S__R+I__R)+beta__2*S__H*I__H/(S__H+E__H+I__H+R__H)-gamma*E__H-mu*E__H=0,
        gamma*E__H-kappa*I__H-alpha*I__H-mu*I__H=0,
        alpha*I__H-mu*R__H=0,
        lambda__R-tau*S__R*I__R/(S__R+I__R)-phi*S__R-delta*S__R=0,
        tau*S__R*I__R/(S__R+I__R)-phi*I__R-delta*I__R=0
       ]:

map(print, eqs):

lambda__H-beta__1*S__H*I__R/(S__R+I__R)-beta__2*S__H*I__H/(S__H+E__H+I__H+R__H)-mu*S__H = 0

beta__1*S__H*I__R/(S__R+I__R)+beta__2*S__H*I__H/(S__H+E__H+I__H+R__H)-gamma*E__H-mu*E__H = 0

E__H*gamma-I__H*alpha-I__H*kappa-I__H*mu = 0

I__H*alpha-R__H*mu = 0

lambda__R-tau*S__R*I__R/(S__R+I__R)-phi*S__R-delta*S__R = 0

tau*S__R*I__R/(S__R+I__R)-phi*I__R-delta*I__R = 0

sols := simplify(solve(eqs, [I__R,S__R,S__H,E__H,I__H,R__H], explicit)):

length(sols);

12299

nops(sols);

4

new:=map(uuuu->map(uuu->lhs(uuu)=subsindets(collect(numer(rhs(uuu)), [beta__1,beta__2], u->simplify(u,size)),`^`,uu->`^`(collect(op(1,uu), [beta__1,beta__2], u->simplify(u,size)),op(2,uu)))/simplify(denom(rhs(uuu)),size),uuuu),sols):

length(new);

8990

simplify(sols-new);

[[0, 0, 0, 0, 0, 0], [0, 0, 0 = 0, 0 = 0, 0 = 0, 0 = 0], [0, 0, 0 = 0, 0 = 0, 0 = 0, 0 = 0], [0, 0, 0 = 0, 0 = 0, 0 = 0, 0 = 0]]

new[1];

[I__R = 0, S__R = lambda__R/(delta+phi), S__H = lambda__H/mu, E__H = 0, I__H = 0, R__H = 0]

new[2];

[I__R = 0, S__R = lambda__R/(delta+phi), S__H = lambda__H*(mu^2+(alpha+gamma+kappa)*mu+alpha*gamma)/(mu*gamma*(beta__2-kappa)), E__H = (gamma*lambda__H*beta__2-(gamma+mu)*(alpha+kappa+mu)*lambda__H)/(gamma*(beta__2-kappa)*(gamma+mu)), I__H = (gamma*lambda__H*beta__2-(gamma+mu)*(alpha+kappa+mu)*lambda__H)/((beta__2-kappa)*(gamma+mu)*(alpha+kappa+mu)), R__H = (alpha*gamma*lambda__H*beta__2-alpha*(gamma+mu)*(alpha+kappa+mu)*lambda__H)/((beta__2-kappa)*(gamma+mu)*(alpha+kappa+mu)*mu)]

new[3];

[I__R = -lambda__R*(delta+phi-tau)/(tau*(delta+phi)), S__R = lambda__R/tau, S__H = -(1/2)*(-(mu^2+(alpha+gamma+kappa)*mu+alpha*gamma)*(delta+phi-tau)*lambda__H*beta__1+gamma*mu*tau*lambda__H*beta__2+(((mu^2+(alpha+gamma+kappa)*mu+alpha*gamma)^2*(delta+phi-tau)^2*beta__1^2+(-2*(mu^2+(alpha+gamma+kappa)*mu+alpha*gamma)*(delta+phi-tau)*mu*gamma*tau*beta__2-2*(mu^2+(alpha+gamma+kappa)*mu+alpha*gamma)*(delta+phi-tau)*(gamma+mu)*(alpha+kappa+mu)*mu*tau)*beta__1+beta__2^2*gamma^2*mu^2*tau^2-2*mu^2*gamma*(gamma+mu)*(alpha+kappa+mu)*tau^2*beta__2+mu^2*(gamma+mu)^2*(alpha+kappa+mu)^2*tau^2)^(1/2)+mu*(mu^2+(alpha+gamma+kappa)*mu+gamma*(alpha-kappa))*tau)*lambda__H)/(gamma*(((-phi+tau-delta)*beta__1+mu*tau)*kappa-beta__2*mu*tau)*mu), E__H = -(1/2)*((delta+phi-tau)*(mu^2+(alpha+gamma+kappa)*mu+gamma*(alpha+2*kappa))*lambda__H*beta__1+gamma*mu*tau*lambda__H*beta__2-(((mu^2+(alpha+gamma+kappa)*mu+alpha*gamma)^2*(delta+phi-tau)^2*beta__1^2+(-2*(mu^2+(alpha+gamma+kappa)*mu+alpha*gamma)*(delta+phi-tau)*mu*gamma*tau*beta__2-2*(mu^2+(alpha+gamma+kappa)*mu+alpha*gamma)*(delta+phi-tau)*(gamma+mu)*(alpha+kappa+mu)*mu*tau)*beta__1+beta__2^2*gamma^2*mu^2*tau^2-2*mu^2*gamma*(gamma+mu)*(alpha+kappa+mu)*tau^2*beta__2+mu^2*(gamma+mu)^2*(alpha+kappa+mu)^2*tau^2)^(1/2)+mu*tau*(gamma+mu)*(alpha+kappa+mu))*lambda__H)/(gamma*(((-phi+tau-delta)*beta__1+mu*tau)*kappa-beta__2*mu*tau)*(gamma+mu)), I__H = -(1/2)*((delta+phi-tau)*(mu^2+(alpha+gamma+kappa)*mu+gamma*(alpha+2*kappa))*lambda__H*beta__1+gamma*mu*tau*lambda__H*beta__2-(((mu^2+(alpha+gamma+kappa)*mu+alpha*gamma)^2*(delta+phi-tau)^2*beta__1^2+(-2*(mu^2+(alpha+gamma+kappa)*mu+alpha*gamma)*(delta+phi-tau)*mu*gamma*tau*beta__2-2*(mu^2+(alpha+gamma+kappa)*mu+alpha*gamma)*(delta+phi-tau)*(gamma+mu)*(alpha+kappa+mu)*mu*tau)*beta__1+beta__2^2*gamma^2*mu^2*tau^2-2*mu^2*gamma*(gamma+mu)*(alpha+kappa+mu)*tau^2*beta__2+mu^2*(gamma+mu)^2*(alpha+kappa+mu)^2*tau^2)^(1/2)+mu*tau*(gamma+mu)*(alpha+kappa+mu))*lambda__H)/((gamma+mu)*(alpha+kappa+mu)*((mu*tau-(delta+phi-tau)*beta__1)*kappa-beta__2*mu*tau)), R__H = -(1/2)*((delta+phi-tau)*alpha*(mu^2+(alpha+gamma+kappa)*mu+gamma*(alpha+2*kappa))*lambda__H*beta__1+alpha*gamma*mu*tau*lambda__H*beta__2-(((mu^2+(alpha+gamma+kappa)*mu+alpha*gamma)^2*(delta+phi-tau)^2*beta__1^2+(-2*(mu^2+(alpha+gamma+kappa)*mu+alpha*gamma)*(delta+phi-tau)*mu*gamma*tau*beta__2-2*(mu^2+(alpha+gamma+kappa)*mu+alpha*gamma)*(delta+phi-tau)*(gamma+mu)*(alpha+kappa+mu)*mu*tau)*beta__1+beta__2^2*gamma^2*mu^2*tau^2-2*mu^2*gamma*(gamma+mu)*(alpha+kappa+mu)*tau^2*beta__2+mu^2*(gamma+mu)^2*(alpha+kappa+mu)^2*tau^2)^(1/2)+mu*tau*(gamma+mu)*(alpha+kappa+mu))*alpha*lambda__H)/((gamma+mu)*(alpha+kappa+mu)*mu*((mu*tau-(delta+phi-tau)*beta__1)*kappa-beta__2*mu*tau))]

new[4];

[I__R = -lambda__R*(delta+phi-tau)/(tau*(delta+phi)), S__R = lambda__R/tau, S__H = -(1/2)*(-(mu^2+(alpha+gamma+kappa)*mu+alpha*gamma)*(delta+phi-tau)*lambda__H*beta__1+gamma*mu*tau*lambda__H*beta__2+(-((mu^2+(alpha+gamma+kappa)*mu+alpha*gamma)^2*(delta+phi-tau)^2*beta__1^2+(-2*(mu^2+(alpha+gamma+kappa)*mu+alpha*gamma)*(delta+phi-tau)*mu*gamma*tau*beta__2-2*(mu^2+(alpha+gamma+kappa)*mu+alpha*gamma)*(delta+phi-tau)*(gamma+mu)*(alpha+kappa+mu)*mu*tau)*beta__1+beta__2^2*gamma^2*mu^2*tau^2-2*mu^2*gamma*(gamma+mu)*(alpha+kappa+mu)*tau^2*beta__2+mu^2*(gamma+mu)^2*(alpha+kappa+mu)^2*tau^2)^(1/2)+mu*(mu^2+(alpha+gamma+kappa)*mu+gamma*(alpha-kappa))*tau)*lambda__H)/(gamma*(((-phi+tau-delta)*beta__1+mu*tau)*kappa-beta__2*mu*tau)*mu), E__H = -(1/2)*((delta+phi-tau)*(mu^2+(alpha+gamma+kappa)*mu+gamma*(alpha+2*kappa))*lambda__H*beta__1+gamma*mu*tau*lambda__H*beta__2-(-((mu^2+(alpha+gamma+kappa)*mu+alpha*gamma)^2*(delta+phi-tau)^2*beta__1^2+(-2*(mu^2+(alpha+gamma+kappa)*mu+alpha*gamma)*(delta+phi-tau)*mu*gamma*tau*beta__2-2*(mu^2+(alpha+gamma+kappa)*mu+alpha*gamma)*(delta+phi-tau)*(gamma+mu)*(alpha+kappa+mu)*mu*tau)*beta__1+beta__2^2*gamma^2*mu^2*tau^2-2*mu^2*gamma*(gamma+mu)*(alpha+kappa+mu)*tau^2*beta__2+mu^2*(gamma+mu)^2*(alpha+kappa+mu)^2*tau^2)^(1/2)+mu*tau*(gamma+mu)*(alpha+kappa+mu))*lambda__H)/(gamma*(((-phi+tau-delta)*beta__1+mu*tau)*kappa-beta__2*mu*tau)*(gamma+mu)), I__H = -(1/2)*((delta+phi-tau)*(mu^2+(alpha+gamma+kappa)*mu+gamma*(alpha+2*kappa))*lambda__H*beta__1+gamma*mu*tau*lambda__H*beta__2-(-((mu^2+(alpha+gamma+kappa)*mu+alpha*gamma)^2*(delta+phi-tau)^2*beta__1^2+(-2*(mu^2+(alpha+gamma+kappa)*mu+alpha*gamma)*(delta+phi-tau)*mu*gamma*tau*beta__2-2*(mu^2+(alpha+gamma+kappa)*mu+alpha*gamma)*(delta+phi-tau)*(gamma+mu)*(alpha+kappa+mu)*mu*tau)*beta__1+beta__2^2*gamma^2*mu^2*tau^2-2*mu^2*gamma*(gamma+mu)*(alpha+kappa+mu)*tau^2*beta__2+mu^2*(gamma+mu)^2*(alpha+kappa+mu)^2*tau^2)^(1/2)+mu*tau*(gamma+mu)*(alpha+kappa+mu))*lambda__H)/((gamma+mu)*(alpha+kappa+mu)*((mu*tau-(delta+phi-tau)*beta__1)*kappa-beta__2*mu*tau)), R__H = -(1/2)*((delta+phi-tau)*alpha*(mu^2+(alpha+gamma+kappa)*mu+gamma*(alpha+2*kappa))*lambda__H*beta__1+alpha*gamma*mu*tau*lambda__H*beta__2-alpha*(-((mu^2+(alpha+gamma+kappa)*mu+alpha*gamma)^2*(delta+phi-tau)^2*beta__1^2+(-2*(mu^2+(alpha+gamma+kappa)*mu+alpha*gamma)*(delta+phi-tau)*mu*gamma*tau*beta__2-2*(mu^2+(alpha+gamma+kappa)*mu+alpha*gamma)*(delta+phi-tau)*(gamma+mu)*(alpha+kappa+mu)*mu*tau)*beta__1+beta__2^2*gamma^2*mu^2*tau^2-2*mu^2*gamma*(gamma+mu)*(alpha+kappa+mu)*tau^2*beta__2+mu^2*(gamma+mu)^2*(alpha+kappa+mu)^2*tau^2)^(1/2)+mu*tau*(gamma+mu)*(alpha+kappa+mu))*lambda__H)/((gamma+mu)*(alpha+kappa+mu)*mu*((mu*tau-(delta+phi-tau)*beta__1)*kappa-beta__2*mu*tau))]

map( u->print(simplify(eval(eqs, u))), new ):

[0 = 0, 0 = 0, 0 = 0, 0 = 0, 0 = 0, 0 = 0]

[0 = 0, 0 = 0, 0 = 0, 0 = 0, 0 = 0, 0 = 0]

[0 = 0, 0 = 0, 0 = 0, 0 = 0, 0 = 0, 0 = 0]

[0 = 0, 0 = 0, 0 = 0, 0 = 0, 0 = 0, 0 = 0]

 

Download solve_sys.mw

You may notice that the regions overlap since they are both filled between their curves and y=0.

And so for your example (done successfully with plot and filled) the region of overlap thus gets rendered with an effect with both specified colors. Both filled regions are constructed by the plot command with a transparency. This produces a darker, purple visual appearance for the lower region (which is all overlap).

And if you added more curves then regions with more overlap would be appear darker still.

If you wish to specify colors for shading the regions between curves separately (without overlap) then you can use the plots:-shadebetween command. This allows you to force the shading to be precisely the colors you specifiy.

For example,

restart;
with(plots):

animate(display,
        ['shadebetween'(sqrt(x), sqrt(x)-1, x=0..t, color="Red"),
         'shadebetween'(sqrt(x)-1, 0, x=0..t, color="Blue"),
        view=[0..20,0..5]], t=0..20);

Here are some things you can try out:

restart;

eq := (1 + a * cos(theta1*x)) * cos(theta2*x) = b:

this := eval(eq, [a=0.25,b=0.1,theta1=2,theta2=24.5]):

this;

       (1 + 0.25 cos(2 x)) cos(24.5 x) = 0.1

#plot( (rhs-lhs)(this), x=0..1 );

fsolve( this, x=0..1 );

                   0.06084048514

fsolve( this, x=0..1, maxsols=10 );

      0.06084048514, 0.1956614960, 0.3171692501, 0.4523388447,
      0.5733212716, 0.7091939827, 0.8293033344, 0.9661987166

You can reduce the size of your expression.

for_transfer_to_word_ac.mw

If that's still too big then you could try splitting it into a sum of terms.

You don't need to construct procedures to do this.

You may find that additional plotting command options can make the results nicer.

u := 1-(8*(10.3968*t^2-5.8368*t*f-.229376*f^2-5.1984))/(4.56*t^2-2.56*t*f+.8192*f^2+2.28)^2:
x := f+t-(8*(-2.28*t+.64*f))/(2.28+2*(-t+.64*f)^2+2.56*t^2):

plot([eval(x,t=0), eval(u,t=0),f=-5..5]);

plot3d([x,t,u], f=-5..5, t=-5..5);
plot3d([x,t,u], f=-5..5, t=-5..5, grid=[251,251]);
plot3d([x,t,u], f=-5..5, t=-5..5, grid=[251,251], style=surface);
plot3d([x,t,u], f=-5..5, t=-5e-1..5e-1, grid=[101,101]);

You should be using left-ticks (single left quotes, a.k.a. name quotes) instead of right-ticks (single right quotes, a.k.a. unevaluation quotes).

Eg,  `-+++` instead of  '-+++'

It appears that (in three places) you wrote else if where you intended what elif would provide instead.

So, as it is, you have too few terminators (and too many stray else instances). Have a look at this recent comment if you don't understand the difference.

I don't understand what assignments you're trying to accomplish. It seems suspicious to me that you are trying to assign to the subscripted h__k in a loop with k as the loop-index. Do you understand the difference between h[k] and h__k (both of which may appear as subscripted in 2D Math)?

I don't see what's wrong with your original suggestion. Eg,

restart;

L := proc(t::realcons, A::list, B::list)
   plots:-display(plottools:-line(A, t*B-(t-1)*A));
end proc:

P, Q := [2,3], [5,-2];
N := 100;

plots:-animate(L, [t, P, Q], t=0..1, paraminfo=false, frames=N);

S := [seq(L(t,P,Q), t=0..1, 1/(N-1))]:
nops(S);

plots:-display(S, insequence);

I may be misunderstanding your request, which is not worded very clearly.

As I read your question, the only points mentioned are the end-points. But you haven't actually stated that you want the animation to consist of plotting points. So above I've connected the two end-points with a (growing, animated) line segment. Please clarify your intention.

In Maple square brackets denote lists, and they do not group terms, ie. they do not indicate mathematical grouping of subexpressions.

So your expectation is invalid, given the role of square brackets in Maple. It works if you remove them.

expr := A*sin(x)^2+A*cos(x)^2;

                        2           2
        expr := A sin(x)  + A cos(x)

simplify(A);

                     A

You can use parentheses (round brackets) to group terms in Maple. None are needed for your example, however. For example the following produces the same expression as above,

A*(sin(x)^2)+A*(cos(x)^2);

                    2           2
            A sin(x)  + A cos(x)
First 151 152 153 154 155 156 157 Last Page 153 of 336