acer

32363 Reputation

29 Badges

19 years, 332 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are answers submitted by acer

Another way to forcibly attack the issue,

restart;

kernelopts(version);

`Maple 2024.2, X86 64 LINUX, Oct 29 2024, Build ID 1872373`

A := (-8*x - 16)*exp(x/2) + x^2 + 4*x + 16*exp(x) + 4;

(-8*x-16)*exp((1/2)*x)+x^2+4*x+16*exp(x)+4

simplify(A, {exp(x)=exp(x/2)^2});

(x-4*exp((1/2)*x)+2)^2

Download nm_simp_exA.mw

Naturally, many such temporary replacements may be constructed in an ad hoc manner. How well the system might be taught to do it automagically, I don't know.

restart;


The following canonicalization happens during the
automatic simplification stage, and so cannot be prevented
using unevaluation quotes.

'n>m';

m < n

But, an inert form will do.

G := InertForm:-Display(`%>`(n, m), 'inert'=false);

Typesetting:-mcomplete(Typesetting:-mrow(Typesetting:-mi("n"), Typesetting:-mo("&gt;"), Typesetting:-mi("m")), Typesetting:-_Hold([`%>`(n, m)]))

latex(G, output=string);

"n >m "


You could also easily write a reusable procedure/operator
to construct the above, for other arguments.

And, there are other ways. Eg,

H := `#mrow(mi("n"),mo("&gt;"),mi("m"));`;

`#mrow(mi("n"),mo("&gt;"),mi("m"));`

latex(H, output=string);

"n >m"

Download inert_gt_latex.mw

You posited, "It seems Maple like to make everything  based on "<" internally and that is why it reverses it?". Yes.

You can easily form a similar rule to sustitute in the reciprocals. And you could also use both within the single subs call, to avoid having to distinguish which is present (or even if both are present).

restart

PDEtools:-undeclare(prime)

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

S := (diff(G(xi), xi))^2-r^2*G(xi)^2*(a+b*G(xi)+l*G(xi)^2) = 0

(diff(G(xi), xi))^2-r^2*G(xi)^2*(a+b*G(xi)+l*G(xi)^2) = 0

SS := diff(G(xi), xi) = sqrt(r^2*G(xi)^2*(a+b*G(xi)+l*G(xi)^2))

diff(G(xi), xi) = (r^2*G(xi)^2*(a+b*G(xi)+l*G(xi)^2))^(1/2)

Se := sqrt(r^2*G(xi)^2*(a+b*G(xi)+l*G(xi)^2)) = diff(G(xi), xi)

(r^2*G(xi)^2*(a+b*G(xi)+l*G(xi)^2))^(1/2) = diff(G(xi), xi)

Se2 := map(proc (u) options operator, arrow; 1/u end proc, Se)

1/(r^2*G(xi)^2*(a+b*G(xi)+l*G(xi)^2))^(1/2) = 1/(diff(G(xi), xi))

dub := diff(SS, xi)

diff(diff(G(xi), xi), xi) = (1/2)*(2*r^2*G(xi)*(a+b*G(xi)+l*G(xi)^2)*(diff(G(xi), xi))+r^2*G(xi)^2*(b*(diff(G(xi), xi))+2*l*G(xi)*(diff(G(xi), xi))))/(r^2*G(xi)^2*(a+b*G(xi)+l*G(xi)^2))^(1/2)

Dubl2 := simplify(dub)

diff(diff(G(xi), xi), xi) = (1/2)*r^2*G(xi)*(diff(G(xi), xi))*(4*l*G(xi)^2+3*b*G(xi)+2*a)/(r^2*G(xi)^2*(a+b*G(xi)+l*G(xi)^2))^(1/2)

subs(Se2, Dubl2)

diff(diff(G(xi), xi), xi) = (1/2)*r^2*G(xi)*(4*l*G(xi)^2+3*b*G(xi)+2*a)

You can supply both, so you don't need to figure
out which applies.

subs(Se, Se2, Dubl2)

diff(diff(G(xi), xi), xi) = (1/2)*r^2*G(xi)*(4*l*G(xi)^2+3*b*G(xi)+2*a)

eval(Dubl2, [Se, Se2])

diff(diff(G(xi), xi), xi) = (1/2)*r^2*G(xi)*(4*l*G(xi)^2+3*b*G(xi)+2*a)

For fun, frontend'd simplify-with-side-relations

frontend(simplify, [Dubl2, {Se}], [{`*`, `+`, `=`, set}, {}])

diff(diff(G(xi), xi), xi) = (1/2)*r^2*G(xi)*(4*l*G(xi)^2+3*b*G(xi)+2*a)

Download subs_ac.mw

One fault seems to be that the derivativedivides method fails for integrand_2, while it succeeds (and produces that simpler result) for integrand_1.

A second fault is that int returns the result with ln and I=sqrt(-1) (which can obtain from the risch method) for integrand_2 instead of returning the better result from the orering method. The orering method's result is longer, but doesn't contain I or ln, and can be simplified directly to the short result using merely the normal command.

restart;

kernelopts(version);

`Maple 2024.2, X86 64 LINUX, Oct 29 2024, Build ID 1872373`

integrand_1:=x^2*(-arctan(x) + x)*exp(-arctan(x) + x)/(x^2 + 1);

x^2*(-arctan(x)+x)*exp(-arctan(x)+x)/(x^2+1)

int(integrand_1,x,method=DDivides);

(-arctan(x)+x)*exp(-arctan(x)+x)-exp(-arctan(x)+x)

integrand_2:=evala(integrand_1);

-x^2*(arctan(x)-x)*exp(-arctan(x)+x)/(x^2+1)

int(integrand_2,x,method=DDivides);

int(-x^2*(arctan(x)-x)*exp(-arctan(x)+x)/(x^2+1), x, method = DDivides)

normal( int(integrand_2,x,method=orering) );

-(arctan(x)-x+1)*exp(-arctan(x)+x)

anti_2:=int(integrand_2,x); # from Risch method it seems

-(1-x+((1/2)*I)*ln(1-I*x)-((1/2)*I)*ln(1+I*x))*(1-I*x)^(-(1/2)*I)*(1+I*x)^((1/2)*I)*exp(x)

simplify(evalc(diff(anti_2,x)-integrand_2)); # check, for x::real at least

0

simplify(combine(evalc(anti_2)));

(-arctan(x)+x-1)*exp(-arctan(x)+x)


Download int_weakness_02.mw

There are at least two parts to this Question.

1) Your evalf (at default Digits=10 working precision) does not produce 10 accurate
digits of an apprximation of the second exact root obtained by solve. Substituting
the poor root approximation happens to also produce zero in the denominator.
But substituting a more accurate approximation happens not to.

2) Your plotting problem is the same as in one of your earlier Questions from today. (This site has faulty inlined display of the worksheet below, but my actual worksheet contains the adaptive=true and smartview=false options.)
 

restart

S := [solve(x^2/(10^(-8)-x) = 5*10^(-3))]

[-1/400-(3/200000)*27778^(1/2), -1/400+(3/200000)*27778^(1/2)]

evala(eval(x^2/(10^(-8)-x), x = S[1]))

1/200

evala(eval(x^2/(10^(-8)-x), x = S[2]))

1/200


This is not an accurate approximation of S.
It is not accurate to Digits=10 decimal places.

evalf[10](S)

[-0.5000010000e-2, 0.10000e-7]


This is a better approximation.

evalf[20](S)

[-0.50000099999800000800e-2, 0.99999800000800e-8]

eval(x^2/(10^(-8)-x) = 5*10^(-3), x = 9.999980000*10^(-9))

0.4999980000e-2 = 1/200

f := proc (x) options operator, arrow; x^2/(1/100000000-x) end proc = proc (x) options operator, arrow; x^2/(1/100000000-x) end proc 

plot(f, .99999*10^(-8) .. .999999*10^(-8), smartview = false)

plot(f, .99999*10^(-8) .. .999999*10^(-8), smartview = false, adaptive = true)

NULL

Download plotq_ac.mw

The small imaginary components of your result can be seen to be an artefect of solving a cubic in terms of radicals, and then computing as a floating-point approximation (in which case the small imaginary artefacts don't vanish due to floating-point concerns -- roundoff error, loss or precision, etc).

You can read about the notion that the purely real roots of some cubics may not be expressible in terms of radicals without the "I" (ie. sqrt(-1)) being present. But a reformulation in terms of trig expressions can get a form in which "I" does not appear, and for which floating-point evaluation produces no such small imarginary artefacts.

restart

S := [solve((x^2-10^(-14))/(10^(-3)-x+10^(-14)/x) = 5*10^(-3), x)]

evalf(S)

[0.854101976e-3-0.4e-11*I, -0.5854101969e-2-0.465063510e-12*I, -0.9e-11+0.3865063510e-11*I]


Increasing the working precision makes the float approaximation
of S have even smaller (artefacts of) imaginary components.

evalf[20](S)

[0.8541019764671763721e-3-0.4e-21*I, -0.58541019664671764921e-2-0.12310889132455352635e-21*I, -0.99999998801e-11+0.48310889132455352635e-21*I]

evalc(S)

[(1/15000000)*4000000003^(1/2)*sin((1/3)*arctan((3/237499999550000)*843750039749999989500000003^(1/2))+(1/6)*Pi)-1/600, -(1/30000000)*4000000003^(1/2)*sin((1/3)*arctan((3/237499999550000)*843750039749999989500000003^(1/2))+(1/6)*Pi)-1/600-(1/30000000)*3^(1/2)*4000000003^(1/2)*cos((1/3)*arctan((3/237499999550000)*843750039749999989500000003^(1/2))+(1/6)*Pi), -(1/30000000)*4000000003^(1/2)*sin((1/3)*arctan((3/237499999550000)*843750039749999989500000003^(1/2))+(1/6)*Pi)-1/600+(1/30000000)*3^(1/2)*4000000003^(1/2)*cos((1/3)*arctan((3/237499999550000)*843750039749999989500000003^(1/2))+(1/6)*Pi)]

evalf(evalc(S))

[0.854101977e-3, -0.5854101968e-2, -0.10e-10]

eq := (x^2-10^(-14))/(10^(-3)-x+10^(-14)/x) = 5*10^(-3)

(x^2-1/100000000000000)/(1/1000-x+(1/100000000000000)/x) = 1/200


A lovely cubic, whose roots correspond to S above.

ee := numer((lhs-rhs)(eq))

-20000000000000000*x^3-100000000000000*x^2+100000000200*x+1


Better than evalf(...(solve(...)...) is to use fsolve on the cubic.

fsolve(ee)

-0.5854101966e-2, -0.9999999880e-11, 0.8541019765e-3

evalf(solve(ee))

0.854101976e-3-0.4e-11*I, -0.5854101969e-2-0.465063510e-12*I, -0.9e-11+0.3865063510e-11*I

NULL

Download concentrations_ac.mw

I marked your Question to be Product=Maple 2022, since that's the version in which your attachment was last saved. It'd be more helpful if you could mark the Product version yourself, for future Questions.

In Maple 2022 your examples are running into issues with the (then new) adaptive=geometric default, and/or the default smartview=true option. Some improvement might be had automatically in the newer Maple 2025.

Each of your examples can be forced to comply (in versions M2022 to M2025) by adjusting those options:

restart

plots:-setoptions(thickness = 3)

kernelopts(version)

`Maple 2022.2, X86 64 LINUX, Oct 23 2022, Build ID 1657361`

plot(-log[10](0.1e-3+x), x = 0 .. 10, adaptive = true, smartview = false)

x := -0.2550000000e-2+0.5000000000e-4*sqrt(2601.+(2.000000000*10^6)*C__i)

-0.2550000000e-2+0.5000000000e-4*(2601.+2000000.000*C__i)^(1/2)

plot(-log[10](0.1e-3+x), C__i = 0 .. 10, adaptive = true, smartview = false)

I want to see the plot being 4 at C__i = 0.

 

Note that subs({C__i = 0}, x) = 0. and evalf(subs({C__i = 0}, -log[10](0.1e-3+x))) = 4.000000000 

NULL

plot(-log[10](0.1e-3+x), C__i = 0 .. 1, smartview = false, adaptive = true)

plot(-log[10](0.1e-3+x), C__i = 0 .. 1, view = [0 .. 1, 1 .. 4], adaptive = true)

plot(-log[10](0.1e-3+x), C__i = 0 .. 1, view = [0 .. .1, 1 .. 4], adaptive = true)

NULL

Download plotatzero_ac.mw

You asked how to set the Output display to "Maple Output". But that's not the right value for the setting.

From the menubar, you can set it as,

    Tools -> Options -> Display -> Output display -> 2-D Math

where the drop-menu item would be "2-D Math" instead of "Maple Notation".

Then close the popup dialogue with the "Apply Globally" button.


ps. I too have seen this setting get undone, in rare cases. I sometimes wonder whether it can go awry because there is also a programmatic interface(prettyprint) access to it.

Does your code function as you expect if instead you have that as,

   Object('A':-foo_type)

In Maple 2024, under Tools->Options from the menubar, you could do the following:

1) Choose the tab "Interface", and inside that toggle the drop-menu for,
      Default format for new worksheets
to Worksheet (ie. not Document).

2) Choose the "Display" tab, and inside that toggle the drop-menu for,
      Input display
to Maple Notation (ie. not 2-D Math)

Then close the pop-up Options window by clicking on the button "Apply Globally". That should then make this the default, ie. even if you fully close and relaunch the Maple GUI.

The effect of these, together, is that your inputs will be in red plaintext, ie. Maple Notation mode -- with the red chevron -- in Execution Groups (just like Maple 8 and earlier). It won't be black, marked up 2-D Input math mode in Document Blocks.

This is the prescribed way to get such changes. You don't need any special Style Set or such, to get the red color for plaintext Maple Notation input code.

You could also look at the Help page for topic documentsvsworksheets

Hopefully I haven't guessed wrongly about what you're trying to accomplish.

I can think of a few ways to accomplish this.

The first way involves using a different sort call on each of the inner sums (coefficients of the lambda__ij(t) terms). This happens to work for these examples, although in a more general case it could run into difficulties or need even more special handling. This is what I did in the attachment below; it's not completely general code, though it does contain some generic stuff rather than being all ad hoc op stuff.

I could have made considerably shorter code to get this, at the expense of being more ad hoc (eg. leveraging the fact that the problematic sums are the coefficients of the lambda__ij(t) and thus acted on more easily via collect, or using the simple common structure of those sums, etc, etc). I deliberately avoided such here. I find chipping away at the more general problem far more interesting and worthwhile.

NB. Due how sort acts on the uniquified structure stored in kernel memory, invoking the code can actually change part of the original odes, in-place. (Assigning all results to a new variable may not always be strictly necessary, though I do it here.)

restart;

odes := [-(diff(x__1(t), t, t))+(2*x__1(t)-2*x__2(t))*`&lambda;__12`(t)+(2*(-x__3(t)+x__1(t)))*`&lambda;__31`(t) = 0, -(diff(y__1(t), t, t))+(2*y__1(t)-2*y__2(t))*`&lambda;__12`(t)+(2*(-y__3(t)+y__1(t)))*`&lambda;__31`(t) = 0, -(diff(z__1(t), t, t))+(2*z__1(t)-2*z__2(t))*`&lambda;__12`(t)+(2*(z__1(t)-z__3(t)))*`&lambda;__31`(t) = 0, -(diff(x__2(t), t, t))+(-2*x__1(t)+2*x__2(t))*`&lambda;__12`(t)+(2*(x__2(t)-x__3(t)))*`&lambda;__23`(t) = 0, -(diff(y__2(t), t, t))+(-2*y__1(t)+2*y__2(t))*`&lambda;__12`(t)+(2*(y__2(t)-y__3(t)))*`&lambda;__23`(t) = 0, -(diff(z__2(t), t, t))+(-2*z__1(t)+2*z__2(t))*`&lambda;__12`(t)+(2*(z__2(t)-z__3(t)))*`&lambda;__23`(t) = 0, -(diff(x__3(t), t, t))+(-2*x__2(t)+2*x__3(t))*`&lambda;__23`(t)-(2*(-x__3(t)+x__1(t)))*`&lambda;__31`(t) = 0, -(diff(y__3(t), t, t))+(-2*y__2(t)+2*y__3(t))*`&lambda;__23`(t)-(2*(-y__3(t)+y__1(t)))*`&lambda;__31`(t) = 0, -(diff(z__3(t), t, t))+(-2*z__2(t)+2*z__3(t))*`&lambda;__23`(t)-(2*(z__1(t)-z__3(t)))*`&lambda;__31`(t) = 0]

map(print, odes): # the original

-(diff(diff(x__1(t), t), t))+(2*x__1(t)-2*x__2(t))*lambda__12(t)+2*(-x__3(t)+x__1(t))*lambda__31(t) = 0

-(diff(diff(y__1(t), t), t))+(2*y__1(t)-2*y__2(t))*lambda__12(t)+2*(-y__3(t)+y__1(t))*lambda__31(t) = 0

-(diff(diff(z__1(t), t), t))+(2*z__1(t)-2*z__2(t))*lambda__12(t)+2*(z__1(t)-z__3(t))*lambda__31(t) = 0

-(diff(diff(x__2(t), t), t))+(-2*x__1(t)+2*x__2(t))*lambda__12(t)+2*(x__2(t)-x__3(t))*lambda__23(t) = 0

-(diff(diff(y__2(t), t), t))+(-2*y__1(t)+2*y__2(t))*lambda__12(t)+2*(y__2(t)-y__3(t))*lambda__23(t) = 0

-(diff(diff(z__2(t), t), t))+(-2*z__1(t)+2*z__2(t))*lambda__12(t)+2*(z__2(t)-z__3(t))*lambda__23(t) = 0

-(diff(diff(x__3(t), t), t))+(-2*x__2(t)+2*x__3(t))*lambda__23(t)-2*(-x__3(t)+x__1(t))*lambda__31(t) = 0

-(diff(diff(y__3(t), t), t))+(-2*y__2(t)+2*y__3(t))*lambda__23(t)-2*(-y__3(t)+y__1(t))*lambda__31(t) = 0

-(diff(diff(z__3(t), t), t))+(-2*z__2(t)+2*z__3(t))*lambda__23(t)-2*(z__1(t)-z__3(t))*lambda__31(t) = 0

the code

new := F(odes):
map(print, new):

-(diff(diff(x__1(t), t), t))+(2*x__1(t)-2*x__2(t))*lambda__12(t)+2*(x__1(t)-x__3(t))*lambda__31(t) = 0

-(diff(diff(y__1(t), t), t))+(2*y__1(t)-2*y__2(t))*lambda__12(t)+2*(y__1(t)-y__3(t))*lambda__31(t) = 0

-(diff(diff(z__1(t), t), t))+(2*z__1(t)-2*z__2(t))*lambda__12(t)+2*(z__1(t)-z__3(t))*lambda__31(t) = 0

-(diff(diff(x__2(t), t), t))+(2*x__2(t)-2*x__1(t))*lambda__12(t)+2*(x__2(t)-x__3(t))*lambda__23(t) = 0

-(diff(diff(y__2(t), t), t))+(2*y__2(t)-2*y__1(t))*lambda__12(t)+2*(y__2(t)-y__3(t))*lambda__23(t) = 0

-(diff(diff(z__2(t), t), t))+(2*z__2(t)-2*z__1(t))*lambda__12(t)+2*(z__2(t)-z__3(t))*lambda__23(t) = 0

-(diff(diff(x__3(t), t), t))+(2*x__3(t)-2*x__2(t))*lambda__23(t)-2*(x__1(t)-x__3(t))*lambda__31(t) = 0

-(diff(diff(y__3(t), t), t))+(2*y__3(t)-2*y__2(t))*lambda__23(t)-2*(y__1(t)-y__3(t))*lambda__31(t) = 0

-(diff(diff(z__3(t), t), t))+(2*z__3(t)-2*z__2(t))*lambda__23(t)-2*(z__1(t)-z__3(t))*lambda__31(t) = 0

new2 := F(simplify(-~new)):
map(print, new2):

diff(diff(x__1(t), t), t)+(2*x__2(t)-2*x__1(t))*lambda__12(t)+(2*x__3(t)-2*x__1(t))*lambda__31(t) = 0

diff(diff(y__1(t), t), t)+(2*y__2(t)-2*y__1(t))*lambda__12(t)+(2*y__3(t)-2*y__1(t))*lambda__31(t) = 0

diff(diff(z__1(t), t), t)+(2*z__2(t)-2*z__1(t))*lambda__12(t)+(2*z__3(t)-2*z__1(t))*lambda__31(t) = 0

diff(diff(x__2(t), t), t)+(2*x__1(t)-2*x__2(t))*lambda__12(t)+(2*x__3(t)-2*x__2(t))*lambda__23(t) = 0

diff(diff(y__2(t), t), t)+(2*y__1(t)-2*y__2(t))*lambda__12(t)+(2*y__3(t)-2*y__2(t))*lambda__23(t) = 0

diff(diff(z__2(t), t), t)+(2*z__1(t)-2*z__2(t))*lambda__12(t)+(2*z__3(t)-2*z__2(t))*lambda__23(t) = 0

diff(diff(x__3(t), t), t)+(2*x__2(t)-2*x__3(t))*lambda__23(t)+(2*x__1(t)-2*x__3(t))*lambda__31(t) = 0

diff(diff(y__3(t), t), t)+(2*y__2(t)-2*y__3(t))*lambda__23(t)+(2*y__1(t)-2*y__3(t))*lambda__31(t) = 0

diff(diff(z__3(t), t), t)+(2*z__2(t)-2*z__3(t))*lambda__23(t)+(2*z__1(t)-2*z__3(t))*lambda__31(t) = 0

Download Format_odes_acc.mw

A second way involves using a single kind of sort call (which is more resistant to some weaknesses of the first way) and produces a uniform ordering with the inner sums (coefficients of lambda__ij(t) terms). The uniformity advantage is balanced by some extra leading minus signs in from of said coefficients. I haven't bothered to attach that right now.

It's a little tricky to code some of this because type(...,polynom) can catch too much in its net. And there are some wonderfully Maple-ish quirks of automatic simplification of coefficients when using collect, and fancy handling. Also fun because sign doesn't accept an order=plex(...) option akin to how sort does.

ps. I changes your original to assign a list to name odes, rather than a bare expression sequence (which I find to be error-prone for some people).

You were using the subscripted name T[S] as well as assigning a value to name T. That's a collision, and assigning to the latter clobbers your assignment to the former. You could use the name T__S instead of T[S], since it also renders subscripted in 2D Input, but is distinct from T.

If you want to use a subscripted name as the parameter of your operator then use x__2 instead of x[2]. (In 2D Input mode, that is x followed by two underscores, followed by the 2.)

Also, you were incorrectly using square brackets as if they delimited subexpressions. They don't. In Maple square brackets construct a list. Use round brackets to delimit to subexpressions (ie. term grouping, etc).

You don't have to construct T as an operator. You could also use just an expression. (See the two variants, below.)

restart

T__S := 290

eta := 17; lambda := 24

h := .2; `&ohm;` := 2*Pi*10; R := 2

T := proc (x__2) options operator, arrow; eta*`&ohm;`^2*R^2*(x__2/h-(1/2)*x__2^2/h^2)/lambda+T__S end proc

plot(T, .1 .. .2)

restart

T__S := 290

eta := 17; lambda := 24

h := .2; `&ohm;` := 2*Pi*10; R := 2

T := eta*`&ohm;`^2*R^2*(x__2/h-(1/2)*(x__2/h)^2)/lambda+T__S

plot(T, x__2 = .1 .. .2)

Download TSL_bung_9_ac.mw

I was able to find it here, as a Post.

You can find your own postings from your profile page. (See also the Questions,Posts,Answers,Replies tabbed links).

You seem to be asking for sets, rather than lists.

I can't tell whether you mean M, or Sol. So I've done both in the attachment. You can change either back.

Systmes_Idea_ac.mw

If you're asking for something else then please explain in detail, thanks.

Systèmes : Test idée

restart

L := [seq(S[i], i = 1 .. 12)]

[S[1], S[2], S[3], S[4], S[5], S[6], S[7], S[8], S[9], S[10], S[11], S[12]]

sys_1 := [x+y = 2, x-y = 0]

sys_2 := [x+2*y = 3, x-3*y = -1]

sys_3 := [x+4*y = -3, x-3*y = -1]

sys_4 := [x+2*y = 3, x-3*y = 3]

sys_5 := [x-2*y = 3, x-3*y = -1]

sys_6 := [x+2*y = 7, x-3*y = -1]

sys_7 := [x+2*y = 8, x-3*y = -1]

sys_8 := [x+2*y = 9, x-3*y = -1]

sys_9 := [x+2*y = 10, x-3*y = -1]

sys_10 := [x+2*y = -3, x-3*y = -1]

sys_11 := [x+2*y = -4, x-3*y = -1]

sys_12 := [x+2*y = -5, x-3*y = -1]

M := [seq({(eval(cat(sys_, i)))[]}, i = 1 .. 12)]

[{x-y = 0, x+y = 2}, {x-3*y = -1, x+2*y = 3}, {x-3*y = -1, x+4*y = -3}, {x-3*y = 3, x+2*y = 3}, {x-3*y = -1, x-2*y = 3}, {x-3*y = -1, x+2*y = 7}, {x-3*y = -1, x+2*y = 8}, {x-3*y = -1, x+2*y = 9}, {x-3*y = -1, x+2*y = 10}, {x-3*y = -1, x+2*y = -3}, {x-3*y = -1, x+2*y = -4}, {x-3*y = -1, x+2*y = -5}]

NULL

Sol := map(proc (sys) options operator, arrow; solve(sys, {x, y}) end proc, M)

[{x = 1, y = 1}, {x = 7/5, y = 4/5}, {x = -13/7, y = -2/7}, {x = 3, y = 0}, {x = 11, y = 4}, {x = 19/5, y = 8/5}, {x = 22/5, y = 9/5}, {x = 5, y = 2}, {x = 28/5, y = 11/5}, {x = -11/5, y = -2/5}, {x = -14/5, y = -3/5}, {x = -17/5, y = -4/5}]

DocumentTools:-InsertContent(DocumentTools:-Layout:-Worksheet(subs("centred" = "left", DocumentTools:-Tabulate(Matrix(4, 3, proc (i, j) options operator, arrow; `&equiv;`(L[3*i-3+j], M[3*i-3+j]) end proc), width = 120, alignment = center, color = blue, fillcolor = "AliceBlue", output = XML))))

 

`&equiv;`(S[1], {x-y = 0, x+y = 2})

`&equiv;`(S[2], {x-3*y = -1, x+2*y = 3})

`&equiv;`(S[3], {x-3*y = -1, x+4*y = -3})

`&equiv;`(S[4], {x-3*y = 3, x+2*y = 3})

`&equiv;`(S[5], {x-3*y = -1, x-2*y = 3})

`&equiv;`(S[6], {x-3*y = -1, x+2*y = 7})

`&equiv;`(S[7], {x-3*y = -1, x+2*y = 8})

`&equiv;`(S[8], {x-3*y = -1, x+2*y = 9})

`&equiv;`(S[9], {x-3*y = -1, x+2*y = 10})

`&equiv;`(S[10], {x-3*y = -1, x+2*y = -3})

`&equiv;`(S[11], {x-3*y = -1, x+2*y = -4})

`&equiv;`(S[12], {x-3*y = -1, x+2*y = -5})

 

Solutions 

DocumentTools:-InsertContent(DocumentTools:-Layout:-Worksheet(subs("centred" = "left", DocumentTools:-Tabulate(Matrix(4, 3, proc (i, j) options operator, arrow; `&equiv;`(L[3*i-3+j], Sol[3*i-3+j]) end proc), width = 120, alignment = center, color = blue, fillcolor = "LightYellow", output = XML))))
 

`&equiv;`(S[1], {x = 1, y = 1})

`&equiv;`(S[2], {x = 7/5, y = 4/5})

`&equiv;`(S[3], {x = -13/7, y = -2/7})

`&equiv;`(S[4], {x = 3, y = 0})

`&equiv;`(S[5], {x = 11, y = 4})

`&equiv;`(S[6], {x = 19/5, y = 8/5})

`&equiv;`(S[7], {x = 22/5, y = 9/5})

`&equiv;`(S[8], {x = 5, y = 2})

`&equiv;`(S[9], {x = 28/5, y = 11/5})

`&equiv;`(S[10], {x = -11/5, y = -2/5})

`&equiv;`(S[11], {x = -14/5, y = -3/5})

`&equiv;`(S[12], {x = -17/5, y = -4/5})

 

You write "RGB", but you only have a single Matrix. Usually RGB means three layers, for Red, Green, and Blue.

So I'll use your single Matrix for a HUE layer.

I'll do it in two ways:
1) replacing the COLOR Array, after a plot3d construction
2) using the image option of the plot3d command

Plot1_ac.mw

3 4 5 6 7 8 9 Last Page 5 of 336