<

## 12497 Reputation

12 years, 232 days

## Hmm...

Let's see if I have this straight.

You have a (syntactically incorrect) ODE, with no boundary or initial conditions, which does not contain the parameters alpha, A0, or a.

You want a solution containing the parameters alpha, A0, and a. That would be magic not mathematics!

## Your...

@WA573 original ode is third-order. So any solution will contain three arbitrary constants.

Even if an analytic solution were possible (which it seems is not the case), it would still contain three arbitrary constants. These three arbitrary constants can only be resolved by having three initial/boundary conditions

## Weird one...

I can only include that your worksheet  rt.m.mw contains some weird non-printiing character. I exported this worksheet to a .mpl file, cleaned out anything that looked suspicious (superfluous blank lines and a NULL statement!?), then read the resulting .mpl file back into Maple, and - hey presto - now everything works. So the code in the attached *looks* exactly the same as you woirksheet rt.m.m - but it isn't!! > restart;   with(plots):   pu:=1/(2)*exp(-u^(2));   ode:= diff(x(u), u, u) +1/(2)*pu*x(u) = 0:   cons1:= x(0)=1, D(x)(0)=0:   cons2:= x(2)=1, D(x)(2)=0:   sol1:= dsolve([ode, cons1], numeric);   sol2:= dsolve([ode, cons2], numeric);   display( [ plot( pu,                    u=-8..8,                    color=black                  ),              odeplot( sol1,                       [u,x(u)],                       u=-8..8,                       color=blue                     ),              odeplot( sol2,                       [u,x(u)],                       u=-8..8,                       color=red                     )             ]          );    >  ## Use the big green up-arrow...

in the Mapleprimes toolbar to post the Maple 12 worksheet with the error message - If I can read the error message I *might* be able to fix it.

But using 14-year old software is always likely to be problematic

## If your objective...

is to obtain a solution to the original ODE, then why not supply three initial/boundary conditions and a numeric value for 'c' and then just use dsolve(....numeric), as shown in the attached

NB I just made up the boundary conditions and c-value for this example

 > restart;   eq := U(z)^2*diff(U(z), z) - (diff(U(z), z)*diff(U(z), z, z) - diff(U(z), z, z, z)*U(z))*c^2/U(z) = 0;   sol:=dsolve(eval( [eq, U(0)=1, D(U)(0)=0, D[1,1](U)(0)=1], c=1), numeric);   plots:-odeplot( sol,                   [z, U(z)],                   z=0..10                  );    ## Hmm BVP issue...

In the  worksheet  you have specified a bounary-value problem, implied by the initial/boundary conditions , which use both x=0 and x=2. These are the 'boundaries' of the problem and any numeric solution will only be valid for 0<x<2.

However so far as I can tell the two equations which you have are completely independent. In the first, only the dependent variable x() is used. In the second, only the dependent variable x1() is used. If this is correct theneach of these odes (with associtaed conditions) is technically an ivp and can be solved separately and plotted for any value of the independent variabl x.

In fact you are using the same ode with different boundary conditions (and a different name fro the dependent variable)

With the second set of conditions ie x(2)=0, D(x)(2)=0, the obtaained solution is x(u)=0 for all u.

See the attached.

 > restart;   with(plots):   pu:=1/(2)*exp(-u^(2));   ode:= diff(x(u), u, u) +1/(2)*pu*x(u) = 0:   cons1:= x(0)=1, D(x)(0)=0:   cons2:= x(2)=0, D(x)(2)=0:   sol1:= dsolve([ode, cons1], numeric);   sol2:= dsolve([ode, cons2], numeric);   display( [ plot( pu,                    u=-2..2,                    color=black                  ),              odeplot( sol1,                      [u,x(u)],                      u=-2..2,                      color=blue                   ),              odeplot( sol2,                       [u,x(u)],                       u=-2..2,                       color=red                     )             ]           );    > ## I assume...

that you have three differential equations, which you want to solve simultaneously, as shown in the attached? If this is not the case then you are going to have to explain your objective more clearly,

Still no guarantees for correct operation in Maple 12

 > restart;   p(u):= 1/2*exp(-u^2):   odeSys:= diff(x(u), u, u) + 1/2*p(u)*x(u) = 0,            diff(y(u), u, u) - 1/2*p(u)*y(u) = 0,            diff(v(u), u, u) + 1/4*diff(p(u), u)*(x(u)^2 - y(u)^2) + p(u)*(x(u)*diff(x(u), u) - y(u)*diff(y(u), u)) = 0:   conds:= v(0) = 1,           D(v)(0) = 0,           y(0) = 1,           D(y)(0) = 0,           x(0) = 1,           D(x)(0) = 0:   sol:= dsolve( [ odeSys, conds] ,                 numeric               );   plots:-odeplot( sol,                   [ [u, p(u)],                     [u, x(u)],                     [u, y(u)],                     [u, v(u)]                   ],                   u = -8 .. 8,                   color = [red, blue, green, black],                   legend = ['p(u)', x(u), y(u), v(u)]                 );  >

## Just noticed...

that you are using Maple 12, which was released in 2008.

My answer was produced in the current version (Maple 2022). I have just checked it in the oldest Maple version I have (Maple 18 from 2014)  and the code still executes.

No guarantees for Maple 12

## Slightly different color definitions...

Firs of all,  I agree with you that defining colors in display() rathere than in the individual plot() commands within display() results in a black/black color scheme, except for a little "splash" of red arounf the areas where the two plots "intersect". (This little "splash" of red at the intersection are does not appear on this site, but it does in the worksheet!!)

On the other hand if the color is defined within individual plot commands, then it *appears* to be obeyed. See the difference in the attached.

 > with(plots):   interface(version); (1)
 > display   ( tubeplot     ( [cos(t), 0, sin(t)],       t = -Pi .. Pi, radius = .2     ),     tubeplot     ( [cos(t), sin(t), 0],       t = -Pi .. Pi, radius = .2     ),     style = surface,     color = [red, red]   );   display   ( tubeplot     ( [cos(t), 0, sin(t)],       t = -Pi .. Pi, radius = .2,       color = [red]     ),     tubeplot     ( [cos(t), sin(t), 0],       t = -Pi .. Pi, radius = .2,       color = [red]     ),     style = surface   );  >
 >

## Interesting one...

because I cannot reproduce.

If you use the plottools:-getdata() command as in the attached, what colors are returned?

 > restart;
 > kernelopts(version); (1)
 > with(plots):

Two intersecting tori colored red and green -- works as expected:

 > display(         tubeplot([cos(t), 0, sin(t)], t=-Pi..Pi, radius=0.2),         tubeplot([cos(t), sin(t), 0], t=-Pi..Pi, radius=0.2), style=surface, color=[red,green]); plottools:-getdata(%, 'includecolor')[1..2,4];  (2)

When we set both colors to red, one of the surfaces is painted black!  Why?

Please note: This website displays the colors corectly as red and red.  But

within the worksheet the colors are read and black.

 > display(         tubeplot([cos(t), 0, sin(t)], t=-Pi..Pi, radius=0.2),         tubeplot([cos(t), sin(t), 0], t=-Pi..Pi, radius=0.2), style=surface, color=[red,red]); plottools:-getdata(%, 'includecolor')[1..2,4];  (3)

Specifying colors as red/red within the tubeplots still produces red/black!

 > display(         tubeplot([cos(t), 0, sin(t)], t=-Pi..Pi, radius=0.2, color=red),         tubeplot([cos(t), sin(t), 0], t=-Pi..Pi, radius=0.2, color=red), style=surface); plottools:-getdata(%, 'includecolor')[1..2,4];  (4)
 >

## Observation...

The code below will at least pull-up (what appears to be?) the relevant help page. At least it has a couple of examples of using the Query(algName, "Parabolic") command.

```restart:
with(DifferentialGeometry):
with(LieAlgebras):
?Query[Parabolic];
```

Opening this help page as a worksheet (that is View->Open Page as Worksheet from the help page menu), and executing it, all the examples in this help page *appear* to work.

## Although you have been given...

a couple of good "work-arounds" I would still consider this to be a "bug"

I have submitted an SCR (aka Software Change Request, aka bug report)

## Don't use big words...

which you don't understand.

An SEIR model is a compartment model which is used in epidemiology - it involves four dependent variables S(t), E(t), I(t), R(t) -hence the name SEIR, where the four dependent variables represent

1. S(t) - number of susceptiblel individuals in a population as a function of time. For a completely "new" infection, this is pretty much the whole population
2. E(t) - number of individual in a population who have been expose to the infection, but are not yet capable of spreading the infection. Although they have been exposed, they may, or may not, become infectious, and may or may not actually become infected themselves
3. I(t) - number of infected individuals as a function of time. Generally this is some fraction of the number of people who what been exposed.
4. R(t) - number oif individuals for whom the infection has been "resolved" - usually taken to mean that they have either recovered or they are dead. In other case, they are generally considered to be no longer infectious, nor are they any longer capable of being infected.

an SEIR model is a set of four (first-order) differential equations which involves the above four dependent variables.

You present a system of 8 equations, which

1. has four equations too many for an SEIR model
2. are static - since there are no differential equations, none of the dependent variables will vary with the independent variable (ie time)
3. thus the whole system cannot evolve with 'time' - the independent variable, and hence can never "bifurcate", because,(as presented) any solution is static - nothing varies with time

Maybe you could ask a sensible question without using words you obviously don't understand?

## Actually...

Digits:=16 seems to work. See attached.

Not sure why this changed between Maple 2015 and Maple 2022 though.

I'm also not sure why the curve in the first figure doesn't render on this site - it exists in the Maple worksheet - honest! It looks exactly like the original you have posted - ie OK up to about t=~140 or so, and non-existent beyond that point

 > restart:   interface(version);   plot(140^t*exp(-140)/t!, t = 0 .. 300);   Digits:=16:   plot(140^t*exp(-140)/t!, t = 0 .. 300);   Digits:=10:   >
 >

## You have BIG problems...

in fact it is a long time since I have seen a worksheet with so many basi syntactical and logical errors. In fact, so many I cannot even hope to fix them

I suggest you read the comments I have added in the atttached - and fix every one of them, before doing anything else > restart: with(plots): with(plottools): with(Student[LinearAlgebra]): #infolevel[Student[LinearAlgebra]]:=1: # why does this exist? Comment out #with(LinearAlgebra): # why does this exist? Comment out #with(linalg,vector,matrix,crossprod,angle): # why does this exist? Comment out pu:=Pi/180: evalf(pu): d:=172;t := (2 *Pi*((d - 1) / 365)):Phi:=37.52*pu;  (1)
 > d:=72: t:=(2*Pi*((d-1)/365)): Phi:=37.52*pu:
 > delta:=evalf(((0.322003-22.971*cos(t)-0.357898*cos(2*t)-0.14398*cos(3*t)+3.94638*sin(t)+0.019334*sin(2*t)+0.05928*sin(3*t)))*pu);: (2)
 > ws:=evalf(-arccos(-tan(Phi)*tan(delta))); # why does this next command exist? - comment out # # evalf(ws); (3)
 > alpha:=arcsin(cos(Phi)*cos(delta)*cos(omega)+sin(Phi)*sin(delta)): # # the following is only used as a constituent of # the variable 'Colm' which is not used anywhere # in this worksheet, so why does this exist? # # Comment it out # # colm1:=evalf(seq(alpha,omega=ws..0,0.01)/pu):
 > gama:=arccos((sin(delta)-sin(alpha)*sin(Phi))/(cos(alpha)*cos(Phi))): # # the following is only used as a constituent of # the variable 'Colm' which is not used anywhere # in this worksheet, so why does this exist? # # Comment it out # # colm2:=evalf(seq(gama,omega=ws..0,0.01)/pu):
 > x:=cos(alpha)*cos(gama); # # the following is only used as a constituent of # the variable 'Colm' which is not used anywhere # in this worksheet, so why does this exist? # # Comment it out # # colm3:=(seq(x,omega=ws..0,0.01)): (4)
 > y:=cos(alpha)*sin(gama); # # the following is only used as a constituent of # the variable 'Colm' which is not used anywhere # in this worksheet, so why does this exist? # # Comment it out # # colm4:=(seq(y,omega=ws..0,0.01)): (5)
 > z:=sin(alpha); # # the following is only used as a constituent of # the variable 'Colm' which is not used anywhere # in this worksheet, so why does this exist? # # Comment it out # # colm5:=(seq(z,omega=ws..0,0.01)): # # The variable Colm is not used anywhere in this worksheet # so why does the following exist? Comment it out # # Colm:=(,,,,): (6)
 > c:=sphere([0,0,0],1,color=white,transparency=0.5):              h3:=spacecurve([-x,-y,z],omega=ws..0,color=green,thickness=5): h4:=spacecurve([-x,y,z],omega=ws..0,color=blue,thickness=5): blu:=op([1,1], h4): whattype(blu); gre:=op([1,1], h3): whattype(gre); # # Observation - both 'blu' and 'gre' are Arrays whos entries # may be accessed using square brackets - as in blu[1,1] etc # # Loop index for the following started from 0 when the indexing # for blu starts from 1, so fixed this # # But why do you write stuff out to a file and then read the # the same stuff back again - this is completely pointless. # # A total waste of time and space on your hard drive # for i from 1 to 200 do      MyFile := cat(currentdir(), "/PP.txt"):      writeto(MyFile): # # 'blu' is an array whise lements can be accessed using square brackets # as in blu[1,1]. As used below with round brackets  'blu' is a function/ # procedure with supplied arguments - no relation to the Array previously # defined - so I have no idea what the rest of this loop is attempting to # achieve. I can pretty much guarantee that whatever the OP wnats, this isn't # going to do it # #      PlanePlot(blu(i,1)*xx+blu(i,2)*yy+blu(i,3)*zz=0,[xx,yy,zz], showbasis ):      close(MyFile):      writeto(terminal):      with(StringTools):      fine:= readline(MyFile):      while fine <> 0 do            last := fine:            fine := readline(MyFile):            if   fine <> 0 and Search("basis vectors:", fine) =1            then bv := StringSplit(fine, "basis vectors:"):                 bv1||i, bv2||i := parse(%):            end if:      end do: od: ##`basis vector 1` = bv1; ##`basis vector 2` = bv2;# benim işime yarayan vektör  (7)
 > # # Following commmand will 'Error' because 'h5' is # not defined anywhere - exactly how do you think # you can plot something whihc is undefined???? # # Comment it out # #  display(c,h4,h3,h5); # # 'c' 'h3' and 'h4' have been defined so can be # displayed #   display(c,h4,h3); > # # Hmmmmmm we seem to be repeating ourselves. Writing stuuf out to a # hard drive, then reading the same stuff back in again. # # why? WHY? WHY? # # MyFile := cat(currentdir(), "/PP.txt"): writeto(MyFile): # # Well this won't work because it requires 'blu' to be a function/ # procedure which accepts two arguments. OP probably wants entries # of the Array 'blu' whihc would require square brackets - as in # blu[1,1]. # # But we still won't get anywhere because the name 'as' is not # defined anywhere in this worksheet # PlanePlot(blu(as,1)*xx+blu(as,2)*yy+blu(as,3)*zz=0,[xx,yy,zz], showbasis ): close(MyFile): writeto(terminal): with(StringTools): fine:= readline(MyFile): while fine <> 0 do    last := fine:    fine := readline(MyFile):    if   fine <> 0 and Search("basis vectors:", fine) =1    then bv := StringSplit(fine, "basis vectors:"):         bv1, bv2 := parse(%):    end if: end do: #`basis vector 1` = bv1; #`basis vector 2` = bv2;# benim işime yarayan vektör 