acer

29759 Reputation

29 Badges

19 years, 317 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are answers submitted by acer

If you use the command plots:-surfdata then you can easily add other (usual) plotting options.

For example, adding an option for orientation so that the X and Y values appear at the forefront.

restart

with(plots):

X := `<,>`(1740, 2200, 2710, 3200, 3700, 4033):

Y := `<,>`(0, 5, 10, 15, 20, 25, 30, 35, 40):

F(X, 0), F(X, 5), F(X, 10), F(X, 15), F(X, 20), F(X, 25), F(X, 30), F(X, 35), F(X, 40) := Vector(6, {(1) = 1.342, (2) = 1.427, (3) = 1.397, (4) = 1.329, (5) = 1.329, (6) = 1.518}), Vector(6, {(1) = 1.449, (2) = 1.382, (3) = 1.303, (4) = 1.362, (5) = 1.379, (6) = 1.397}), Vector(6, {(1) = 1.341, (2) = 1.348, (3) = 1.339, (4) = 1.456, (5) = 1.388, (6) = 1.555}), Vector(6, {(1) = 1.419, (2) = 1.413, (3) = 1.325, (4) = 1.32, (5) = 1.362, (6) = 1.42}), Vector(6, {(1) = 1.486, (2) = 1.336, (3) = 1.449, (4) = 1.382, (5) = 1.534, (6) = 1.665}), Vector(6, {(1) = 1.395, (2) = 1.37, (3) = 1.38, (4) = 1.365, (5) = 1.345, (6) = 1.507}), Vector(6, {(1) = 1.399, (2) = 1.333, (3) = 1.365, (4) = 1.429, (5) = 1.418, (6) = 1.613}), Vector(6, {(1) = 1.343, (2) = 1.331, (3) = 1.306, (4) = 1.375, (5) = 1.63, (6) = 1.692}), Vector(6, {(1) = 1.422, (2) = 1.421, (3) = 1.323, (4) = 1.31, (5) = 1.508, (6) = 1.57})

A := Array(1 .. numelems(X), 1 .. numelems(Y), 1 .. 3, proc (i, j, k) options operator, arrow; `if`(k = 1, X[i], `if`(k = 2, Y[j], F(X, Y[j])[i])) end proc, datatype = hfloat):

surfdata(A, orientation = [-142, 72, 0]);

 

Download curve_three_d_ac.mw

If you use Carl's PLOT3D(MESH(...)) suggestion then you might wrap that result in a call to plots:-display, to add such other options. Eg,

    plot:-display(PLOT3D(MESH(A)), orientation = [-142, 72, 0])

You are not succeeding in constructing the two sets (of scalars or scalar equations) because your indexing into Matrices EQ and V is faulty.

You wrote, "I have a set of equations gathered in a vector." But that is not true. Your EQ is a 4x1 Matrix, and your V is a 1x4 Matrix.

restart

EQ := Matrix(4, 1, {(1, 1) = 32.1640740637930*Tau[1]-0.172224519601111e-4*Tau[2]-0.270626540730518e-3*Tau[3]+0.1570620334e-9*P[1]+0.3715450960e-14*sin(t), (2, 1) = -0.172224519601111e-4*Tau[1]+32.1667045885952*Tau[2]+0.587369829416537e-4*Tau[3]-0.1589565489e-8*P[1]+0.1004220091e-12*sin(t), (3, 1) = -0.270626540730518e-3*Tau[1]+0.587369829416537e-4*Tau[2]+32.1816411689934*Tau[3]-0.7419658527e-8*P[1]+0.5201228088e-12*sin(t), (4, 1) = 0.1570620334e-9*Tau[1]-0.1589565489e-8*Tau[2]-0.7419658527e-8*Tau[3]+601.876235436204*P[1]})

V := Matrix(1, 4, {(1, 1) = Tau[1], (1, 2) = Tau[2], (1, 3) = Tau[3], (1, 4) = P[1]})

q := 0:

X := Matrix(4, 1, {(1, 1) = -0.1156532164e-15*sin(t), (2, 1) = -0.3121894613e-14*sin(t), (3, 1) = -0.1616209235e-13*sin(t), (4, 1) = -0.2074537757e-24*sin(t)})

t := 1:

Xf := fsolve({seq(EQ[r, 1], r = 1 .. 4)}, {seq(V[1, r] = q, r = 1 .. 4)});

{P[1] = -0.1745663328e-24, Tau[1] = -0.9731882592e-16, Tau[2] = -0.2626983734e-14, Tau[3] = -0.1359993176e-13}

{seq(EQ[r, 1], r = 1 .. 4)}

{0.1570620334e-9*Tau[1]-0.1589565489e-8*Tau[2]-0.7419658527e-8*Tau[3]+601.876235436204*P[1], -0.270626540730518e-3*Tau[1]+0.587369829416537e-4*Tau[2]+32.1816411689934*Tau[3]-0.7419658527e-8*P[1]+0.5201228088e-12*sin(1), -0.172224519601111e-4*Tau[1]+32.1667045885952*Tau[2]+0.587369829416537e-4*Tau[3]-0.1589565489e-8*P[1]+0.1004220091e-12*sin(1), 32.1640740637930*Tau[1]-0.172224519601111e-4*Tau[2]-0.270626540730518e-3*Tau[3]+0.1570620334e-9*P[1]+0.3715450960e-14*sin(1)}

{seq(V[1, r] = q, r = 1 .. 4)}

{P[1] = 0, Tau[1] = 0, Tau[2] = 0, Tau[3] = 0}

NULL

Download SoalNewton_ac.mw

restart;

Frac_C:=proc(expr,a,x,alpha)
  local ig,m,tau;
  m:=ceil(alpha);
  ig := (x-tau)^(m-alpha-1)*diff(eval(expr,x=tau),tau$m);
  `assuming`([1/GAMMA(m-alpha)*int(ig,tau=a..x)],[x>a]);
end proc:

Frac_C(x^(3.4),0,x,3/4);
evalf(%);

1.486084413*2^(1/2)*GAMMA(3/4)*x^(53/20)

2.575385653*x^(53/20)

fracdiff((x)^(3.4),x,3/4);

2.575385654*x^(53/20)

Frac_C(cos(x),0,x,1/2);

(cos(x)*FresnelS(x^(1/2)*2^(1/2)/Pi^(1/2))-sin(x)*FresnelC(x^(1/2)*2^(1/2)/Pi^(1/2)))*2^(1/2)

fracdiff(cos(x),x,1/2);

(cos(x)*FresnelS(x^(1/2)*2^(1/2)/Pi^(1/2))-sin(x)*FresnelC(x^(1/2)*2^(1/2)/Pi^(1/2)))*2^(1/2)

Download Frac_C.mw

You could declare gamma as local at the top-level, to avoid conflict with the predefined constant.

You could issue this command at the top of the worksheet.

_local(gamma)

sqrt(1+(cos(alpha(t))^2-1)*cos(gamma(t))^2)

(1+(cos(alpha(t))^2-1)*cos(gamma(t))^2)^(1/2)

simplify((1+(cos(alpha(t))^2-1)*cos(gamma(t))^2)^(1/2))

(cos(alpha(t))^2*cos(gamma(t))^2-cos(gamma(t))^2+1)^(1/2)

NULL

Download arg_removed_ac.mw

One objection that you might have to using normal here is that it will cause expansion of terms like (x+y)^3, etc, which can be unnecessarily expensive or even tricky to undo after the fact. (See first two examples below.) Using numer/denom has a similar issue.

It can be tricky to prevent this by using frontend. Instead, below I temporarily freeze the bases of exponentiated sums.

I do not claim that this will handle all kinds of example that you intend, since we have not been told the full class and the hardest kind of example you want handled.

restart;

F := e->thaw(normal(subsindets(e,'`^`'(`+`,anything),
                               u->`^`(freeze(op(1,u)),op(2,u))))):

 

expr := (x+y)^5/(B*C^3)+C^2;

(x+y)^5/(B*C^3)+C^2

normal(expr);

(B*C^5+x^5+5*x^4*y+10*x^3*y^2+10*x^2*y^3+5*x*y^4+y^5)/(B*C^3)

F(expr);
simplify(%-expr);

((x+y)^5+C^5*B)/(B*C^3)

0

expr2 := (x+y)^5/(B*(C+E)^3)+(C+E)^2;

(x+y)^5/(B*(C+E)^3)+(C+E)^2

normal(expr2);

(B*C^5+5*B*C^4*E+10*B*C^3*E^2+10*B*C^2*E^3+5*B*C*E^4+B*E^5+x^5+5*x^4*y+10*x^3*y^2+10*x^2*y^3+5*x*y^4+y^5)/(B*(C+E)^3)

F(expr2);
simplify(%-expr2);

((x+y)^5+(C+E)^5*B)/(B*(C+E)^3)

0

F(A/B+C);

(B*C+A)/B

Download normal_ex.mw

So, you want to compute antiderivatives, by integrating?

restart;

with(InertForm):

A := ee -> subsindets(int(convert(ee(__t),diff),__t),
                      anyfunc(identical(__t)), u->op(0,u)):

examp := D(y/x);
A(examp);
Display(%D(A(examp)), 'inert'=false);

D(y)/x-y*D(x)/x^2

y/x

0, "%1 is not a command in the %2 package", _Hold, Typesetting

examp := D(x*y);
A(examp);
Display(%D(A(examp)), 'inert'=false);

D(x)*y+x*D(y)

x*y

0, "%1 is not a command in the %2 package", _Hold, Typesetting

examp := D(x^2+y^2);
A(examp);
Display(%D(A(examp)), 'inert'=false);

2*D(x)*x+2*D(y)*y

x^2+y^2

0, "%1 is not a command in the %2 package", _Hold, Typesetting

Download umm.mw

The above applies the input expression to a dummy name, __t. (For some other, as yet unprovided examples it might serve better to initially substitute for application on that dummy.)

For some strange reason pointplot accepts a list of lists, or a list of column Vectors, but not a list of row Vectors.

I changed it below, to use column Vectors.

I used Maple 2021.2 for this.

restart;
with(LinearAlgebra):
with(plots):

EqBIS := proc(P, U, V) local a, eq1, M1, t, PU, PV, bissec1; a := (P - U)/LinearAlgebra:-Norm(P - U, 2) + (P - V)/LinearAlgebra:-Norm(P - V, 2); M1 := P + a*t; eq1 := op(eliminate({x = M1[1], y = M1[2]}, t)); return op(eq1[2]); end proc:

A := <4, 8>;
B := <4, 2>;
C := <1, 4>;
EqBIS(A, B, C);

A := Vector(2, {(1) = 4, (2) = 8})

B := Vector(2, {(1) = 4, (2) = 2})

C := Vector(2, {(1) = 1, (2) = 4})

-5*y-20+15*x

Cen := proc(M, N, R) local eq1, eq2, sol; eq1 := EqBIS(M, N, R) = 0; eq2 := EqBIS(N, M, R) = 0; sol := simplify(solve({eq1, eq2}, {x, y})); return [subs(sol, x), subs(sol, y)]; end proc:
Cen(A,B,C):

CircleParm := t -> [(-t^2 + 1)/(t^2 + 1), 2*t/(t^2 + 1)];

proc (t) options operator, arrow; [(-t^2+1)/(t^2+1), 2*t/(t^2+1)] end proc

P1 := Vector(CircleParm(1/4));

P2 := Vector(CircleParm(5));
P3 := Vector(CircleParm(-1/10));
P4 := Vector(CircleParm(-3/2));

P1 := Vector(2, {(1) = 15/17, (2) = 8/17})

P2 := Vector(2, {(1) = -12/13, (2) = 5/13})

P3 := Vector(2, {(1) = 99/101, (2) = -20/101})

P4 := Vector(2, {(1) = -5/13, (2) = -12/13})

C1 := Vector(Cen(P1, P2, P3));

C1 := Vector(2, {(1) = (1/44642)*(1066*17^(1/2)-255*26^(1/2))*101^(1/2)-(1/442)*26^(1/2)*17^(1/2), (2) = (1/44642)*(156*17^(1/2)-833*26^(1/2))*101^(1/2)+(21/442)*26^(1/2)*17^(1/2)})

Pts := [P1, P2, P3, P4, C1];

Pts := [Vector(2, {(1) = 15/17, (2) = 8/17}), Vector(2, {(1) = -12/13, (2) = 5/13}), Vector(2, {(1) = 99/101, (2) = -20/101}), Vector(2, {(1) = -5/13, (2) = -12/13}), Vector(2, {(1) = (1/44642)*(1066*17^(1/2)-255*26^(1/2))*101^(1/2)-(1/442)*26^(1/2)*17^(1/2), (2) = (1/44642)*(156*17^(1/2)-833*26^(1/2))*101^(1/2)+(21/442)*26^(1/2)*17^(1/2)})]

display(implicitplot([x^2 + y^2 - 1], x = -2 .. 2, y = -4 .. 2, colour = [blue], scaling = constrained), pointplot(Pts, symbolsize = 16));

 

Download jamet_ac.mw

restart;

Relabel := proc(g,s,k) uses GT=GraphTheory;
  GT:-RelabelVertices(g,subs(Equate(s,k),GT:-Vertices(g)));
end proc:

 

with(GraphTheory):

 

G := Graph({{1,2},{1,3},{1,4},{1,5},{3,4},{2,5}}):

 

S := [1,3,5];

[1, 3, 5]

K := [a,1,"[1,2,3,4]"];

[a, 1, "[1,2,3,4]"]

H := Relabel(G,S,K):

 

Vertices(G);

[1, 2, 3, 4, 5]

Vertices(H);

[a, 2, 1, 4, "[1,2,3,4]"]

Download relabel.mw

restart;

convert(U(xi)^2, list, `*`);

[U(xi)^2]

convert(U(xi), list, `*`);

[U(xi)]

convert(U(xi)^2*y(xi)^5, list, `*`);

[U(xi)^2, y(xi)^5]

convert(U(xi)^2*y(xi)^5*p(xi), list, `*`);

[U(xi)^2, y(xi)^5, p(xi)]

convert(U(xi)^2+y(xi)^5, list, `*`);

[U(xi)^2+y(xi)^5]

convert(U(xi)^2+y(xi)^5, list, `+`);

[U(xi)^2, y(xi)^5]

Download convert_list.mw

Here are three ways, that show the numerals in upright Roman.

I don't care so much for solutions in which any numerals appear in italic, eg.
   caption=typeset("Or like this ",10^`8`)

note 1: I have utilized special display mechanisms because the input 10^8 becomes 100000000 due to automatic simplification by the kernel/engine. It cannot be prevented by delaying evalution, ie. unevaluation quotes (single right-ticks).

restart;

with(plots):

logplot(10^(x),x=0..8,size=[300,300],legend=[y(x)=10^(x)],legendstyle=[location=top],
        caption=typeset("Like this ",InertForm:-Display(10%^8,inert=false)));

logplot(10^(x),x=0..8,size=[300,300],legend=[y(x)=10^(x)],legendstyle=[location=top],
        caption=typeset("Or like this ",`#msup(mn(10),mn(8))`));

Download inert_exponent.mw

note 2: An alternative is to enter 10^8 in 2D Input mode, right-click and in the popup menu choose "2D Math"->"Convert To"->"Atomic Variable". That produces a pure name that conveniently happens to pretty-print just like the input, and which can be re-used in the caption. You could even do that directly in your plot call.

restart

with(plots)


Below, I selected the 10^8 bit of the 2D Input, then right-clicked and converted it to "Atomic Variable". Then I executed the statement.

logplot(10^x, x = 0 .. 8, size = [300, 300], legend = [y(x) = 10^x], legendstyle = [location = top], caption = typeset("Or like this ", `#msup(mn("10"),mn("8"))`))

Download inert_atomic_variable.mw

The mechanism by which the GUI accomplishes the numeric formatting constructions is not generally documented. But quite a bit may be discovered through the debugger. (I used anames to figure out what to first start debugging...)

Below I use Maple 2022.1, with interface(typesetting) returning the default value extended, and interface(prettyprint) returning the default value 3.

Let's consider your image, showing "Scientific" with 2 "Decimal places" and 1 "Minimum Exponent Digits". I set that to be the numeric formatting for the input,
    5.123456789;
Something (perhaps originating in some streamcall from the GUI) makes the following Library call, which results in a bit of Typesetting function-call-structure which renders accordingly.

Typesetting:-Typeset:-Kernel(5.123456789,
                             numericformatting = ["0.0{2}E-0{1}",
                             true, true, false, false]);

Parse:-ConvertTo1D, "invalid input %1", 5.123456789

lprint(%);

Typesetting:-mcomplete(Typesetting:-mrow(Typesetting:-mn("5.12",family =
"Times New Roman",size = "12",bold = "false",italic = "false",underline =
"false",subscript = "false",superscript = "false",foreground = "[0,0,255]",
background = "[255,255,255]",opaque = "false",executable = "false",readonly =
"true",composed = "false",converted = "false",imselected = "false",placeholder
= "false",`selection-placeholder` = "false",font_style_name = "2D Output",
mathvariant = "normal"),Typesetting:-mo("&times;",family = "Times New Roman",
size = "12",bold = "false",italic = "false",underline = "false",subscript =
"false",superscript = "false",foreground = "[0,0,255]",background =
"[255,255,255]",opaque = "false",executable = "false",readonly = "true",
composed = "false",converted = "false",imselected = "false",placeholder =
"false",`selection-placeholder` = "false",font_style_name = "2D Output",
mathvariant = "normal",fence = "false",separator = "false",stretchy = "false",
symmetric = "false",largeop = "false",movablelimits = "false",accent = "false",
lspace = "0.2222222em",rspace = "0.2222222em"),Typesetting:-msup(Typesetting:-
mn("10",family = "Times New Roman",size = "12",bold = "false",italic = "false",
underline = "false",subscript = "false",superscript = "false",foreground =
"[0,0,255]",background = "[255,255,255]",opaque = "false",executable = "false",
readonly = "true",composed = "false",converted = "false",imselected = "false",
placeholder = "false",`selection-placeholder` = "false",font_style_name =
"2D Output",mathvariant = "normal"),Typesetting:-mn("0",family =
"Times New Roman",size = "12",bold = "false",italic = "false",underline =
"false",subscript = "false",superscript = "false",foreground = "[0,0,255]",
background = "[255,255,255]",opaque = "false",executable = "false",readonly =
"true",composed = "false",converted = "false",imselected = "false",placeholder
= "false",`selection-placeholder` = "false",font_style_name = "2D Output",
mathvariant = "normal"),superscriptshift = "0")),5.123456789)

Download numformatting_stuff.mw

So it looks as if the GUI may be forming that list as value for the numericformatting option, based on the stuff in the popup menu in your image. Figuring out all the rules it may use in doing so could be a chore.

I do not know what those four true/false arguments mean, and the names of the keyword options only help so much with my guessing:
    showstat(Typesetting:-Typeset:-Kernel);

So, I believe that this is how it works. But I don't think that it's intended for general user consumption.

And figuring it out completely might be time-consuming. I doubt many people would enjoy figuring these out:
  showstat(Typesetting:-Typeset:-Tdisplay);
  showstat((Typesetting::Typeset)::Tn);

 

The behaviour for this example changed between Maple 2018.2 and Maple 2019.0.

In Maple 2018.2 and earlier, the evaluation of the expression under evalhf mode would produce an error when overflow occurred for larger values of t. Here is the default behavior in Maple 2018.2,

restart;
kernelopts(version);f := t -> 140^t*exp(-140)/t!:

   Maple 2018.2, X86 64 LINUX, Nov 16 2018, Build ID 1362973

evalhf(f(200.0));
Error, powering may produce overflow

But in Maple 2020 (and 2022.1) the default is for that overflow to not throw an error under evalhf.

restart;
kernelopts(version);f := t -> 140^t*exp(-140)/t!:

   Maple 2020.2, X86 64 LINUX, Nov 11 2020, Build ID 1502365

evalhf(f(200.0));

     Float(undefined)

In consequence, in Maple 2018 and earlier the plotting routines will detect the overflow and fall back to so-called software-float evalf-mode, and successfully generate the curve at the higher values of t. But in Maple 2019 and later that overflow doesn't generate an error by default, and so the evalhf results are accepted (including undefined results), and so only a partial curve is attained.

I am going to submit a bug report. I don't know whether this change in behaviour was deliberate. To me it seems like an undesirable change; it'd be better if the plotting worked ok by default, and expert knowledge should not be necessary in order to make it work.

There are various workarounds, for Maple 2020:
   - set Digits > 15 (and leave UseHardwareFloats at its default of deduced), so that evalf-mode gets used.
   - set UseHardwareFloats to false, so that evalf-mode gets used.
   - set the numeric event handler to throw an error on overflow, so that the evalhf attempt throws a detected error and then evalf-mode gets used as fallback.

restart; kernelopts(version);

`Maple 2020.2, X86 64 LINUX, Nov 11 2020, Build ID 1502365`

Digits := 16:
plot(140^t*exp(-140)/t!, t = 0 .. 300, size=[300,150]);

restart; kernelopts(version);

`Maple 2020.2, X86 64 LINUX, Nov 11 2020, Build ID 1502365`

UseHardwareFloats := false:
plot(140^t*exp(-140)/t!, t = 0 .. 300, size=[300,150]);

restart; kernelopts(version);

`Maple 2020.2, X86 64 LINUX, Nov 11 2020, Build ID 1502365`

NumericEventHandler(overflow = exception):
plot(140^t*exp(-140)/t!, t = 0 .. 300, size=[300,150]);

Download plot_overflow.mw

Here's one relatively simple way.

restart;

e := a/b:

f := unapply('unapply'(e, b), a);

proc (a) options operator, arrow; unapply(a/b, b) end proc

f(A);

proc (b) options operator, arrow; A/b end proc

f(A)(B);

A/B

Download unapply_nest.mw

It could be done with a more efficient result, I suspect, but not so similar to your original. And, anyway, this kind of goal has some inherent inefficiency.

[edit] For example, this is a bit more efficient:

e := a/b:

f := unapply('subs'(__a=a,unapply(subs(a=__a,e), b)), a);

proc (a) options operator, arrow; subs(__a = a, proc (b) options operator, arrow; __a/b end proc) end proc

f(A);

proc (b) options operator, arrow; A/b end proc

f(A)(B);

A/B

Download unapply_nest2.mw

A terser variant on that slightly more efficient alternative is:
    f := unapply('subs'(a=aa, unapply(e, b)), aa);
although you may have wanted(?) the formal parameter of f to be named a. I wasn't sure.

That's a nice find. I'll submit a bug report.

Naturally, a central benefit of the 1-argument calling sequence of implicitplot is that one doesn't have to supply the ranges.

On line 21 of `plots/implicitplot` (Maple 2022.1) I see,

   21   names := indets(fcn,':-name');

which might be better as,

   21   names := indets(fcn,And(':-name',Not(constant)));

(Another fix for that first issue might be for depends(x-y-Pi,Pi) to return false instead of true. I don't know whether that's best.)

Then, on line 30 it calls Reasonable:-Domain:-Implicit. At various places under that it will balk at Pi which is not of type numeric. I don't know how robust/safe it'd be to change various type-checks under that to realcons. Perhaps one can get by by passing evalf(fcn_set) instead of fcn_set to the mapped argument of Reasonable:-Domain:-Implicit, although I don't know offhand whether that's really OK.

The following does a hot-edit of `plots/implicitplot`, changing lines 21 and 30 (as see under showstat). It's more a byproduct of curiosity than a recommendation...

restart;

kernelopts(version);

`Maple 2022.1, X86 64 LINUX, May 26 2022, Build ID 1619613`

if convert(kernelopts(version),string)[7..12] = "2022.1" then
  #showstat(`plots/implicitplot`,21);
  #showstat(`plots/implicitplot`,30);
  __k:=kernelopts(opaquemodules=false):
  unprotect(`plots/implicitplot`):
  `plots/implicitplot`:=FromInert(
subsop([5,5,1,2,7,2,2,1,2,2]=_Inert_FUNCTION(_Inert_ASSIGNEDNAME("evalf", "PROC", _Inert_ATTRIBUTE(_Inert_NAME("protected", _Inert_ATTRIBUTE(_Inert_NAME("protected"))))), _Inert_EXPSEQ(_Inert_LOCAL(64))),
subsop([5,5,1,2,6,1,2,1]=_Inert_ASSIGN(_Inert_LOCAL(66), _Inert_FUNCTION(_Inert_ASSIGNEDNAME("indets", "PROC", _Inert_ATTRIBUTE(_Inert_NAME("protected", _Inert_ATTRIBUTE(_Inert_NAME("protected"))))), _Inert_EXPSEQ(_Inert_LOCAL(42), _Inert_FUNCTION(_Inert_NAME("And", _Inert_ATTRIBUTE(_Inert_NAME("protected", _Inert_ATTRIBUTE(_Inert_NAME("protected"))))), _Inert_EXPSEQ(_Inert_UNEVAL(_Inert_MEMBER(_Inert_EXPSEQ(), _Inert_NAME("name", _Inert_ATTRIBUTE(_Inert_NAME("protected", _Inert_ATTRIBUTE(_Inert_NAME("protected"))))))), _Inert_FUNCTION(_Inert_NAME("Not", _Inert_ATTRIBUTE(_Inert_NAME("protected", _Inert_ATTRIBUTE(_Inert_NAME("protected"))))), _Inert_EXPSEQ(_Inert_NAME("constant", _Inert_ATTRIBUTE(_Inert_NAME("protected", _Inert_ATTRIBUTE(_Inert_NAME("protected")))))))))))), ToInert(eval(`plots/implicitplot`))))):
  protect(`plots/implicitplot`):
  kernelopts(':-opaquemodules'=__k):
  #showstat(`plots/implicitplot`,21);
  #showstat(`plots/implicitplot`,30);
end if:

 

f := x - y - Pi;

x-y-Pi

plots:-implicitplot(f);

Download impl_plot_constPi.mw

The D command can "differentiate" an operator such as your g, with respect to its first parameter (ie. x).

That is one of the primary purposes of the D command. And so your example can be handled easily and efficiently.

g := (x, T) -> T*x + x^2;

proc (x, T) options operator, arrow; T*x+x^2 end proc

dgdx := D[1](g);

proc (x, T) options operator, arrow; T+2*x end proc

dgdx(1,2);

4

Download D_ex.mw

First 37 38 39 40 41 42 43 Last Page 39 of 309