## 13202 Reputation

12 years, 350 days

## Hmmm...

fdiff() seems to be doing something pretty crazy - and I don't understand why, so, in the attached, I have changed the method of computing the numerical derivative - the answer looks a lot more plausible

At the moment I can't upload a worksheet here, because someone has broken the big green up-arrow! However you need to replace the code

```Tv := eval(T(y, t), (pds[i]):-value(t = 1, output = listprocedure));
f := yv -> (1 + Nr*(Tv(yv) + 1))*fdiff(Tv(y), y = yv, workprec = 1.5);
plt1[i] := plot('f(y)', y = 0 .. 1, color = AA[i], size = [1000, 600], axes = boxed, axesfont = ["Arial", 14, Bold], thickness = 3);```

with

```h := 0.001;
Tv := eval(T(y, t), (pds[i]):-value(t = 1, output = listprocedure));
f := yv -> (1 + Nr*(Tv(yv) + 1))*(Tv(yv + h) - Tv(yv))/h;
plt1[i] := plot('f(y)', y = 0 .. 1, color = AA[i], size = [1000, 600], axes = boxed, axesfont = ["Arial", 14, Bold], thickness = 3);```

## Clarification required...

You say that you have

list say like this

[(0, 1), (1, 2), (1, 10), (2, 3), (3, 4), (4, 5), (4, 9), (5, 6), (6, 7), (7, 8), (8, 9), (10, 11), (11, 12), (11, 16), (12, 13), (13, 14), (14, 15), (15, 16)]

You can't generate such a list in Maple, because in this context the round brackets are meaningless,  If you actually type such a construct in Maple, then Maple will return

[0, 1, 1, 2, 1, 10, 2, 3, 3, 4, 4, 5, 4, 9, 5, 6, 6, 7, 7, 8, 8, 9, 10, 11, 11, 12, 11, 16, 12, 13, 13, 14, 14, 15, 15, 16]

So where did this original list come from?

Furthermore, there is no such thing as an ordered set. The set {1, 2} and the set {2, 1} are mathematically identical. As a matter of convenience Maple will usually display sets with the elements in lexicographic order - but you should never rely on the order of elements in a set.

I think you need to explain exactly what your starting point is (and maybe clarify  the end point as well)

## Mea culpa...

Although the problem is not with my statement "and there is probably not much you can do about it!", (or a Maple version issue), but entirely due to the fact that I introduced a couple of simple typos in the original PDE. Amazinng how much difference a couple of sign changes can make!

See the revised worksheet below, which seems to agree pretty much with the one you posted.

 > restart:   with(plots):   PDE  := diff(u(x, t), t) = -u(x, t)*diff(u(x, t), x) + 0.1 * diff(u(x, t), x\$2):   IC   := u(x, 0) = sin(x):   BC   := u(0, t)=u(2*Pi, t), D[1](u)(0, t)=D[1](u)(2*Pi, t):   IBC  := {IC, BC}:   pds := pdsolve          ( PDE,            IBC,            numeric,            time=t,            range=0..2*Pi          ):   display   ( seq     ( pds:-plot            ( t=tau ),       tau=0.9..2, 0.05      )   );   pds:-plot3d        ( t=0..10,          x=0..2*Pi,          axes=boxed,          style=surface,          color=gold,          labelfont=[times, bold, 20]        );
 >

## I agree...

and there is probably not much you can do about it!

See the attached, where the 3D plot is over the ranges x=0..2*PI and t=0..0.9, For t>~0.7, the solution stasrts to get a bit "funky"

 > restart:   PDE  := diff(u(x, t), t) = u(x, t)*diff(u(x, t), x) - 0.1 * diff(u(x, t), x\$2):   IC   := u(x, 0) = sin(x):   BC   := u(0, t)=u(2*Pi, t), D[1](u)(0, t)=D[1](u)(2*Pi, t):   IBC  := {IC, BC}:   pds := pdsolve( PDE, IBC, numeric, time=t, range=0..2*Pi):   pds:-plot3d( t=0..0.9,                x=0..2*Pi,                axes=boxed,                labelfont=[times, bold, 20]              );
 >

See the attached

 >
 >
 >
 >
 >

## Hmmmm...

1. I have some Maple code which generates an error
2. I am not going to upload this Maple code using the big green up-arrow in the Mapleprimes toolbar, so that anyone can see precisely how the error is produced
3. Please fix the code which isn't shown

Get real!

## I'm not really convinced...

that there is a porblem here - more of a misunderstanding about how units should be applied in different unit "environments".

See the attached - hmm I see that this site is still rendering units with '[[]]' brackets, how annoying.

 >
 (1)
 >
 (2)

## Don't see anything wrong...

with your code - but a simple loop structure will suffice, (and save typing). See the attached.

PS I notice you still have T=1: this was a guess I made just to get the original code to run. You should substitute an appropriate value.

 >
 >
 >
 >
 >

I used Maple 2022, although I do have the capability to use any of the six (or so) major releases if I have to

Relatively easy to plot all curves on the same figure (see the attached), but the difference in the vertical range of each individual curve means that this is not always a great idea

 >
 >
 >
 >
 >
 >
 (1)
 >
 (2)
 >
 (3)
 >
 (4)
 >
 (5)
 >
 (6)
 >
 (7)
 >
 (8)
 >
 (9)
 >
 (10)
 >
 (11)
 >
 (12)
 >
 >
 (13)
 >
 >

## Hyperbola...

added in the attached. In order to speed up execution times, I have forced floating-point arithmetic. There are potential dangers in doing this, but it is a trade-off with 'expression explosion' using exact arithmetic.

I notice that this is the sixth version of this construction which I have produced. How many more?

 > restart:   with(geometry):   with(plots):   _EnvHorizontalName = 'x':   _EnvVerticalName = 'y':    R := 5:    circle(cir, [point(OO, [0, 0]), R]):    ang := evalf~([3/4*Pi, -(3*Pi)/4, -Pi/6, 4*Pi/9]):    seq    ( point      ( `||`(P, i),        [ R*cos(ang[i]), R*sin(ang[i])]      ),      i = 1 .. 4    ):    trpts:=combinat:-choose([P1, P2, P3, P4], 3):    for j from 1 by 1 to numelems(trpts) do        triangle        ( `||`( Tr, j),          trpts[j]        ):        EulerCircle        ( `||`(Elc, j),          `||`(Tr, j),          'centername'=`||`(o, j)        ):    od:    intersection    ( G,      line      ( L1,        [P1, P3]      ),      line      ( L2,        [P2, P4]      )    ):    segment    ( s1,      [o1, o3]    ):    segment    ( s2,      [o2, o4]    ):    intersection    ( E,      Elc1,      Elc2    ):    conic( Hyp, [P1, P2, P3, P4, orthocenter(H, Tr1)]):    display    ( [ draw        ( [ seq            ( [ `||`(P, j)(color = black, symbol = solidcircle, symbolsize = 12),                `||`(o, j)(color = black, symbol = solidcircle, symbolsize = 12),                `||`(Tr, j)(color = green),                `||`(Elc, j)              ][],              j=1..4            ),            cir(color = blue),            G(color = blue, symbol = soliddiamond, symbolsize = 24),            OO(color = blue, symbol = soliddiamond, symbolsize = 24),            s1(color=blue),            s2(color=blue),            E[1](color = blue, symbol = soliddiamond, symbolsize = 24),            H(color = black, symbol = solidcircle, symbolsize = 12),            Hyp(color=black, linestyle=dash)          ]        ),        polygonplot        ( [ [ seq              ( coordinates                ( `||`(P, j)                ),                j=1..4              )            ],            [ seq              ( coordinates                ( `||`(o, j)                ),                j=1..4              )            ]          ],          color = [blue, red],          filled=true,          transparency = 0.7        ),        textplot        ( [ seq            ( [ [ coordinates(`||`(P, i))[],                  convert(`||`(P, i), string)                ],                [ coordinates(`||`(o, i))[],                  convert(`||`(o, i), string)                ]              ][],              i=1..4            ),            [coordinates(G)[], "G"],            [coordinates(OO)[], "OO"],            [coordinates(E[1])[], "E"],            [coordinates(H)[], "H"]          ],            align=[above, right]        )      ],      axes=none,      view=[-6..6, -6..6]    );;
 >

## Si in the attached...

I have moved the point E to where the four Euler circles intersect.

 > restart:   with(geometry):   with(plots):   _EnvHorizontalName = 'x':   _EnvVerticalName = 'y':    R := 5:    circle(cir, [point(OO, [0, 0]), R]):    ang := [3/4*Pi, -(3*Pi)/4, -Pi/6, 4*Pi/9]:    seq    ( point      ( `||`(P, i),        [ R*cos(ang[i]), R*sin(ang[i])]      ),      i = 1 .. 4    ):    trpts:=combinat:-choose([P1, P2, P3, P4], 3):    for j from 1 by 1 to numelems(trpts) do        triangle        ( `||`( Tr, j),          trpts[j]        ):        EulerCircle        ( `||`(Elc, j),          `||`(Tr, j),          'centername'=`||`(o, j)        ):    od:    intersection    ( G,      line      ( L1,        [P1, P3]      ),      line      ( L2,        [P2, P4]      )    ):    segment    ( s1,      [o1, o3]    ):    segment    ( s2,      [o2, o4]    ):    intersection    ( E,      Elc1,      Elc2    ):    display    ( [ draw        ( [ seq            ( [ `||`(P, j)(color = black, symbol = solidcircle, symbolsize = 12),                `||`(o, j)(color = black, symbol = solidcircle, symbolsize = 12),                `||`(Tr, j)(color = green),                `||`(Elc, j)              ][],              j=1..4            ),            cir(color = blue),            G(color = blue, symbol = soliddiamond, symbolsize = 24),            OO(color = blue, symbol = soliddiamond, symbolsize = 24),            s1(color=blue),            s2(color=blue),            E[1](color = blue, symbol = soliddiamond, symbolsize = 24)          ]        ),        polygonplot        ( [ [ seq              ( coordinates                ( `||`(P, j)                ),                j=1..4              )            ],            [ seq              ( coordinates                ( `||`(o, j)                ),                j=1..4              )            ]          ],          color = [blue, red],          filled=true,          transparency = 0.7        ),        textplot        ( [ seq            ( [ [ coordinates(`||`(P, i))[],                  convert(`||`(P, i), string)                ],                [ coordinates(`||`(o, i))[],                  convert(`||`(o, i), string)                ]              ][],              i=1..4            ),            [coordinates(G)[], "G"],            [coordinates(OO)[], "OO"],            [coordinates(E[1])[], "E"]          ],            align=[above, right]        )      ],      axes=none    );;
 >

,

## In the attached...

1. G: the point where the diagonals of the quadrilateral P1, P2, P3, P4 intersect
2. OO: the center of the circles which circumscribes the quadrilateral P1, P2, P3, P4
3. However, I can find no definition of the Euler center of P1 ,P2, P3 ,P4 (and Google is no help!). So I have made a random guess and plotted the point where the diagonals of the quadrilateral o1, o2, o3, o4 intersect. This is very probably wrong! You need to define what you mean by "the Euler center of P1 ,P2, P3 ,P4"
 > restart:   with(geometry):   with(plots):   _EnvHorizontalName = 'x':   _EnvVerticalName = 'y':    R := 5:    circle(cir, [point(OO, [0, 0]), R]):    ang := [3/4*Pi, -(3*Pi)/4, -Pi/6, 4*Pi/9]:    seq    ( point      ( `||`(P, i),        [ R*cos(ang[i]), R*sin(ang[i])]      ),      i = 1 .. 4    ):    trpts:=combinat:-choose([P1, P2, P3, P4], 3):    for j from 1 by 1 to numelems(trpts) do        triangle        ( `||`( Tr, j),          trpts[j]        ):        EulerCircle        ( `||`(Elc, j),          `||`(Tr, j),          'centername'=`||`(o, j)        ):    od:    intersection    ( G,      line      ( L1,        [P1, P3]      ),      line      ( L2,        [P2, P4]      )    ):    segment    ( s1,      [o1, o3]    ):    segment    ( s2,      [o2, o4]    ):    intersection    ( E,      line      ( L3,        [o1, o3]      ),      line      ( L4,        [o2, o4]      )    ):    display    ( [ draw        ( [ seq            ( [ `||`(P, j)(color = black, symbol = solidcircle, symbolsize = 12),                `||`(o, j)(color = black, symbol = solidcircle, symbolsize = 12),                `||`(Tr, j)(color = green),                `||`(Elc, j)              ][],              j=1..4            ),            cir(color = blue),            G(color = blue, symbol = soliddiamond, symbolsize = 24),            OO(color = blue, symbol = soliddiamond, symbolsize = 24),            s1(color=blue),            s2(color=blue),            E(color = blue, symbol = soliddiamond, symbolsize = 24)          ]        ),        polygonplot        ( [ [ seq              ( coordinates                ( `||`(P, j)                ),                j=1..4              )            ],            [ seq              ( coordinates                ( `||`(o, j)                ),                j=1..4              )            ]          ],          color = [blue, red],          filled=true,          transparency = 0.7        ),        textplot        ( [ seq            ( [ [ coordinates(`||`(P, i))[],                  convert(`||`(P, i), string)                ],                [ coordinates(`||`(o, i))[],                  convert(`||`(o, i), string)                ]              ][],              i=1..4            ),            [coordinates(G)[], "G"],            [coordinates(OO)[], "OO"],            [coordinates(E)[], "E"]          ],            align=[above, right]        )      ],      axes=none    );;
 >

## A 'point'...

as far as polygonplot() is concerned is just a list of two points - corresponding to just the coordinates() of the entity defined by geometry:-point().

see the attached

 > restart:   with(geometry):   with(plots):   _EnvHorizontalName = 'x':   _EnvVerticalName = 'y':    R := 5:    circle(cir, [point(OO, [0, 0]), R]):    ang := [3/4*Pi, -(3*Pi)/4, -Pi/6, 4*Pi/9]:    seq    ( point      ( `||`(P, i),        [ R*cos(ang[i]), R*sin(ang[i])]      ),      i = 1 .. 4    ):    trpts:=combinat:-choose([P1, P2, P3, P4], 3):    for j from 1 by 1 to numelems(trpts) do        triangle        ( `||`( Tr, j),          trpts[j]        ):        EulerCircle        ( `||`(Elc, j),          `||`(Tr, j),          'centername'=`||`(o, j)        ):    od:    display    ( [ draw        ( [ seq            ( [ `||`(P, j)(color = black, symbol = solidcircle, symbolsize = 12),                `||`(o, j)(color = black, symbol = solidcircle, symbolsize = 12),                `||`(Tr, j)(color = green),                `||`(Elc, j)              ][],              j=1..4            ),            cir(color = blue)          ]        ),        polygonplot        ( [ [ seq              ( coordinates                ( `||`(P, j)                ),                j=1..4              )            ],            [ seq              ( coordinates                ( `||`(o, j)                ),                j=1..4              )            ]          ],          color = [blue, red],          filled=true,          transparency = 0.7        ),        textplot        ( [ seq            ( [ [ coordinates(`||`(P, i))[],                  convert(`||`(P, i), string)                ],                [ coordinates(`||`(o, i))[],                  convert(`||`(o, i), string)                ]              ][],              i=1..4            )          ],            align=[above, right]        )      ],      axes=none    );;
 >

## With more corrections...

and getting rid of more code you really don't need.

See the attached

 > restart:   with(geometry):   with(plots):   _EnvHorizontalName = 'x':   _EnvVerticalName = 'y':    R := 5:    circle(cir, [point(OO, [0, 0]), R]):    ang := [3/4*Pi, -(3*Pi)/4, -Pi/6, 4*Pi/9]:    seq    ( point      ( `||`(P, i),        [ R*cos(ang[i]), R*sin(ang[i])]      ),      i = 1 .. 4    ):    trpts:=combinat:-choose([P1, P2, P3, P4], 3):    for j from 1 by 1 to numelems(trpts) do        triangle        ( `||`( Tr, j),          trpts[j]        ):        EulerCircle        ( `||`(Elc, j),          `||`(Tr, j),          'centername'=`||`(o, j)        ):    od:    display    ( [ draw        ( [ seq            ( [ `||`(P, j)(color = black, symbol = solidcircle, symbolsize = 12),                `||`(o, j)(color = black, symbol = solidcircle, symbolsize = 12),                `||`(Tr, j)(color = green),                `||`(Elc, j)              ][],              j=1..4            ),            cir(color = blue)          ]        ),        textplot        ( [ seq            ( [ [ coordinates(`||`(P, i))[],                  convert(`||`(P, i), string)                ],                [ coordinates(`||`(o, i))[],                  convert(`||`(o, i), string)                ]              ][],              i=1..4            )          ],            align=[above, right]        )      ],      axes=none    );;
 >
 >

## As supplied...

solve works perfectly, see the attached.

 > restart;   solve({x = 1 + 5*t, y = 1 + 3*t, 5*x + 3*y + 1 = 0}, {t, x, y});
 (1)
 >