acer

33183 Reputation

29 Badges

20 years, 202 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@jrive From you last image it appears that there is a space between solve and the opening bracket?

That would make it a multiplication, not a function call.

(It'd be more helpful to attach the actual worksheet, in such a situation that the return appeared like your last image.)

You don't need any conversion. Maple's .mw files are already stored as XML.

Just upload and insert a link to the file using the green up-arrow in the Mapleprimes editor.

So far, you haven't provided a link.

@Ronan If your results were itself an expression sequence then you could keep it that way. You don't have to make it a list or Vector to accomplish this kind of thing.

@C_R It is indeed referenced on the ?solve,details Help page -- one of several by links to ancillary methods/functionality.

@C_R If it's of interest, a related parametric solve call is done quite quickly.

(Done with either assumptions or extra inequality conditions.)

restart;

difference_term := (-lambda__1 - lambda__2 - lambda__3)*theta^2
                   + (X__1*lambda__1 + X__2*lambda__2 - X__3*lambda__3
                   + lambda__1*(X__1 + delta__1) + lambda__2*(X__2 + delta__2)
                   - lambda__3*(X__3 + delta__3))*theta;

(-lambda__1-lambda__2-lambda__3)*theta^2+(X__1*lambda__1+X__2*lambda__2-X__3*lambda__3+lambda__1*(X__1+delta__1)+lambda__2*(X__2+delta__2)-lambda__3*(X__3+delta__3))*theta

conds := lambda__1 >0,lambda__2>0, lambda__3>0, theta<>0;

0 < lambda__1, 0 < lambda__2, 0 < lambda__3, theta <> 0

solve(difference_term < 0, #X__1,
      parameters=[lambda__1,lambda__2,lambda__3,theta,delta__1,delta__2,delta__3])
  assuming conds;

piecewise(0 < theta, [[X__3 = X__3, X__2 = X__2, X__1 < -(2*X__2*`&lambda;__2`-2*X__3*`&lambda;__3`-theta*`&lambda;__1`-theta*`&lambda;__2`-theta*`&lambda;__3`+`&delta;__1`*`&lambda;__1`+`&delta;__2`*`&lambda;__2`-`&delta;__3`*`&lambda;__3`)/(2*`&lambda;__1`)]], theta < 0, [[X__3 = X__3, X__2 = X__2, -(2*X__2*`&lambda;__2`-2*X__3*`&lambda;__3`-theta*`&lambda;__1`-theta*`&lambda;__2`-theta*`&lambda;__3`+`&delta;__1`*`&lambda;__1`+`&delta;__2`*`&lambda;__2`-`&delta;__3`*`&lambda;__3`)/(2*`&lambda;__1`) < X__1]], [])

solve({difference_term < 0, conds}, #X__1,
      parameters=[lambda__1,lambda__2,lambda__3,theta,delta__1,delta__2,delta__3]);

piecewise(0 < `&lambda;__1` and 0 < `&lambda;__2` and 0 < `&lambda;__3` and 0 < theta, [[X__3 = X__3, X__2 = X__2, X__1 < -(2*X__2*`&lambda;__2`-2*X__3*`&lambda;__3`-theta*`&lambda;__1`-theta*`&lambda;__2`-theta*`&lambda;__3`+`&delta;__1`*`&lambda;__1`+`&delta;__2`*`&lambda;__2`-`&delta;__3`*`&lambda;__3`)/(2*`&lambda;__1`)]], 0 < `&lambda;__1` and 0 < `&lambda;__2` and 0 < `&lambda;__3` and theta < 0, [[X__3 = X__3, X__2 = X__2, -(2*X__2*`&lambda;__2`-2*X__3*`&lambda;__3`-theta*`&lambda;__1`-theta*`&lambda;__2`-theta*`&lambda;__3`+`&delta;__1`*`&lambda;__1`+`&delta;__2`*`&lambda;__2`-`&delta;__3`*`&lambda;__3`)/(2*`&lambda;__1`) < X__1]], [])

Download inequality_reply_ac.mw

@nl4l1f3 Even without recourse to interpolation, some contour plots can be had.

Afleiding_Euler_knik_met_uitvoer_20240405_accc.mw

Hopefully that might give you some additional ideas about how you might further display the overall situation.

(I didn't attempt animation across, say, A2 values. I also didn't have it store the data for quicker re-use.)

@dharr In Maple 2015.2 plot3d is sometimes passing 1.000000001 instead of 1.0 at the upper end of the ranges. That seems to have been fixed in Maple 2016.2 and onward.

3d_coloring_reply_1_ac.mw

@nl4l1f3 I'm sorry, but it's unclear to me exactly what new things you're trying to accomplish.

I don't understand how you are trying to collate, organize, apportion, or plot the data from four varying parameters.

You could start by clearly explaining the end-goals. If that is plotting then please explain whether you want static plots or animations, and what parameter values would remain fixed at single values while others (on axis[1] and axis[2] say) might take their full sequence of values.

Moreover, there is such a great number of combinations of laying out the data (column-wise) as some parameters are fixed or varying that doing so seems arbitrary -- even if you were to detail it properly.

Sorry again. To me there seems now to be a large gulf between the number of possible requirements and the few hints at details that I have little idea how to proceed.

@Son Ho Did you trying using the indexed form, D[b] ?

You can also enter that form, already as subscript, in 2D Input, eg., on my Linux,
    D Ctl-Shift-underscore b

@C_R He didn't remove elements of type list. That is, he didn't do this:

r := [[5,7],[],[1,3],[],[5,4]]:

remove(type,r,list);

         []

Rather, he used a structured type, [].  Note that type(...,list) and type(...,[]) are not the same.

One could also leverage type,list  (with that aspect being unnecessary if we already know it's a list of lists),

remove(type,r,And(list, 0 &under nops));

     [[5, 7], [1, 3], [5, 4]]

remove(type, r, 0 &under nops);

     [[5, 7], [1, 3], [5, 4]]

# See also nm's Answer
remove(L->nops(L)=0, r);

     [[5, 7], [1, 3], [5, 4]]

Also possible is the following (straightforward IMO),

  remove(`=`,r,[])

That example does not cause a crash in my stock Maple 2024.0 for Linux, running without any Physics update.

It seems doubtful that your crash here is caused by the very same thing as that previous report you've cited.  That was crashed in the conversion of a high degree rational polynomial to parfrac, and the crash was reproducible entirely outside of any int call.

I'm curious about one thing though. Does it crash if you force only method=contour?

Using Maple 2023,

restart

`assuming`([int((1-omega)^(k+1), omega = 0 .. 1) = C*(int((1-`&sigma;_a`*sin(2*pi*N))^k, N = 0 .. N))], [k >= -2])

1/(k+2) = C*(int((1-`&sigma;_a`*sin(2*pi*N))^k, N = 0 .. N))

`assuming`([int((1-omega)^(k+1), omega = 0 .. 1) = C*(int((1-`&sigma;_a`*sin(2*pi*N))^k, N = 0 .. N))], [k < -2])

infinity = C*(int((1-`&sigma;_a`*sin(2*pi*N))^k, N = 0 .. N))


Download Aung_1_ac.mw

By the way, you used lowercase pi (which means nothing to Maple) instead of Pi.

@C_R The is no indexed procedure here.

There are indexed names here, but nothing's assigned to such here. (It's not a table-based package.)

Some procedure got assigned to a symbol such as foo.

Then the indexed name foo[bar] was used in a function call, eg. foo[bar](x). I personally call that an indexed procedure call, if prompted to call it something other than just a procedure call.

Nothing's stored in a table here. Nothing's assigned to the indexed name.

@C_R

The form,
   foo[name]
is another way that the form,
   foo/name
and,
   foo,name
can generally be used as the Topic name for queries in the Help system.

Nowadays most Help Topics are in the form foo,bar.  But foo/bar and foo[bar] also work as searchable terms, for backwards compatibility.

For example, there is no command int[details], but if you query that in the Help system it'll open the Help page for Topic int,details.

Having said that, the cross-reference Help labels like simplify[size] are just confusing and (IMO) wrong and misplaced. It's not a module-based package like Student, nor a table-based package like inttrans, and those indices are not members of any simplify package.

I shall submit a bug report about those cross-reference labels in the documentation. The least confusing thing to have for those (IMO) would be cross-references that look like,
    simplify,sqrt
    simplify,trig

etc.

Two of the biggest sources of problems in Maple are,
1) allowing two different bits of syntax/structure to mean/represent the same thing
2) having one syntax/structure mean/represent more than a single thing

@C_R In your previous Question (also about indexed procedure calls) my Answer made use of op(1,procname) .

I considered mentioning that you might also add various guards, defensive programming, further manipulation of procname, etc, to that.

When you call  f[a,b,c](...)  then inside f a reference to procname will evaluate to all of the indexed name f[a,b,c].

And you can poke at that just like any other indexed name. Using op you can get its operands. Using op(0,procname) you can get the base name f. And the usual type checks for names can be utilized, as Preben's shown above.

f := proc()
  lprint( procname );
  lprint( op(procname) );
  lprint( op(0,procname) );
  NULL;
end proc:

f[a,b,c]();

f[a,b,c]
a, b, c
f

Download procname_ex.mw

First 60 61 62 63 64 65 66 Last Page 62 of 607