Kitonum

21308 Reputation

26 Badges

16 years, 260 days

MaplePrimes Activity


These are replies submitted by Kitonum

@sand15  Of course your version is simpler. Thank you.

@nm  Yes, your approach is more consistent with the wishes of the OP. In this regard, we can introduce the concept of a sublist of a given list, that is, will the list  N  be a sublist of the list  L ?

@randomuser24  Specifications of a function  f(x):= ...  or   f:=x-> ...  are equivalent in recent versions of Maple.
Examples:

 f(x):=2*x^2-4*x:
plot([f(x), 2*f(x), 4*f(x), -f(x), -2*f(x), -4*f(x)], x=-1..3, color=[red,blue,green,cyan,khaki,brown]);

f:=x->2*x^2-4*x:
plot([f(x), 2*f(x), 4*f(x), -f(x), -2*f(x), -4*f(x)], x=-1..3, color=[red,blue,green,cyan,khaki,brown]);


Don't forget to put multiplication signs where necessary; they are often missed in your text.

@C_R Yes, this is possible in Maple 2018 as well. Thank you very much.

@acer  and @ Axel Vogt  Thank you very much! 

@JAMET  Look carefully at my answer about this (multiplying a matrix by a vector).

@JAMET 

restart;
with(linalg):
xA := 4;
yA := 10;
xB := 0;
yB := 0;
xC := 13;
yC := 0;
Mat := matrix(3, 3, [xA, xB, xC, yA, yB, yC, 1, 1, 1]);
eta:=(x,y,z)->evalm(Mat&*[x,y,z]);
eta(1,2,3);  

 

@mmcdara  
1. Thank you for your insightful analysis of the examples discussed. I am aware of these shortcomings in the program and will try to fix them as soon as I have enough free time.

2. You write that the program is too complicated. But how will you solve a similar problem if the number  n  is large enough. The first step  combinat:-partition(100)  or  combinat:-partition(100, 9)  will take too long, even if Maple has enough memory for this. My program is quite easy to cope with the problem  Partition(100, 1..100, {2,3,6,9});

@yangtheary  I don't understand what kind of help you need. Is there anything you don't understand about the code?

@vv   c<>5

@Maqroll  Consider 2 ways to define the function: h:=x->expr  and  h:=unapply(expr, x) , where  expr  is an expression. If the expression  expr  does not require any evaluation, then these 2 ways are equivalent, for example   h:=x->x^2+1  and  h:=unapply(x^2+1, x) 
If  expr  requires calculation, for example, it is given as an integral as in your example or in some other way, then at the moment of the definition of an arrow-function it is not calculated, but will be calculated only when you call this function with some argument value. In the case of unapply-function, the expression  expr  is evaluated immediately when this function is specified. Compare

f := x->a*x/(4*x^2+b):
h:=x->int(f(t),  t=0..x, continuous);
h(x);
h(1);
 	
h:=unapply(int(f(t),  t=0..x, continuous), x);
h(1);

 

To do this, you can use piecewise command in the inert form. To make the brace blue instead of grey, we use InertForm:-Display command.

An example:

Sys:={x+y-z = 3, x-y-z = 5, -x-y-z = 7}:
%piecewise(``, Sys[1], ``, Sys[2], ``, Sys[3]);
InertForm:-Display(%, inert=false);

                                     

@Prakash J  To find the values of these parameters, as well as the value of the alpha parameter, some additional conditions are needed.

@C_R  You can easily plot a cube with this method:

plots:-implicitplot3d(max(-x,x-1,-y,y-1,-z,z-1), x=-0.5..1.5, y=-0.5..1.5, z=-0.5..1.5, style=surface, axes=normal, grid=[100,100,100]);

                  

 

@C_R  You wrote "...Can you give me hint what  max  does with implict geometries?...".

The intersection of 2 of these tori (including the surfaces themselves) is given by the system of inequalities  {T1<=0, T2<=0}  that is equivalent to 1 inequality  max(T1,T2) <=0 . The equality  max(T1,T2)=0 defines the surface of this solid.

5 6 7 8 9 10 11 Last Page 7 of 132