Kitonum

8977 Reputation

17 Badges

9 years, 40 days

MaplePrimes Activity


These are replies submitted by Kitonum

@acer  This is the perfection of skill!

@mohkam7 

restart;
MakeColored:=(s,c)->Typesetting:-mo(convert(s,string), mathcolor = c):

MakeColored(`ϵ`, "Green");
MakeColored(x, "Red")[MakeColored(i, "Red")];

                                      

@Markiyan Hirnyk  So what?

@Markiyan Hirnyk  My answer is just an alternative solution to the problem (without Statistics package). It remains to round 4.98 .. to the nearest integer. To be more pedantic, it is necessary to compare the values of the sums for n=4 and n=5 and choose the one that is closer to 0.95:

lambda:=2.6:
sum(lambda^k*exp(-lambda)/k!, k=0..4);
sum(lambda^k*exp(-lambda)/k!, k=0..5);

                          0.8774234888
                          0.9509628480
 

 

@idol050279  You have already received so many different tips and examples that it's time you made something yourself. Give your attempts to resolve and clearly indicate what exactly is causing you difficulties.

@rlopez  I think for the beginner your method is the simplest and most understandable solution to the problem. When I wrote about two ways, I just forgot about this method. So we already have 3 ways.

@Markiyan Hirnyk  You did not answer my question (...to display successive frames of animation). On the animation bar (if you use  plots:-animate  command) there is a special button that allows you to do this.

@Markiyan Hirnyk  How do you expect to display successive frames of animation with a specific step in this case?

@Rouben Rostamian   min(a,b) = (a + b - abs(a - b))/2

@one man  Try in the procedure to replace  r:=sqrt(add(d^~2))  with  r:=sqrt(`+`((d^~2)[ ]))  or  r:=sqrt(add(d[i]^2, i=1..nops(d))) .  Do not forget to restart first.

@Harry Garst  Here are three simple examples that confirm your observation:

Expr1:=a/(a+b+c);
algsubs(a+b+c=d, Expr1);

Expr2:=b/(a+b+c);
algsubs(a+b+c=d, Expr2);

Expr3:=c/(a+b+c);
algsubs(a+b+c=d, Expr3);

 

We see that the result depends on the position:  a  is the first in  a+b+c

The code snippet that you submitted works as expected. Give the complete code with which you have problems.

my_proc:=proc(func::`+`) 
    subs([x[1] = 2, x[2] = 1], func);
end proc:

func:=5 + x[1]*x[2] + 10*x[1];
my_proc(func);

                                      func := x[1] x[2] + 10 x[1] + 5
                                                         27
 

@Rouben Rostamian  A brilliant solution, which is better than mine. Unfortunately, there are examples with which it fails, eg for  cos(x+y+1)+sin(x-1)*sin(y+2)

PS. It is worth noting that Mathematica copes with this:
Simplify[Cos[x + y + 1] + Sin[x - 1]*Sin[y + 2]]
                     Cos[1 - x] Cos[2 + y]

@nm  I adjusted the procedure a little. Now it works with exp function, but still does not work with sqrt:

Separation(exp(x^2-y));

                               [exp(x^2), exp(-y)]

@idol050279  I do not understand what relation CrossSectionTutor command has to the points inside the cylinder. This command simply shows the intersection lines of some surface with a set of planes.
Write more clearly what exactly you want to achieve.

1 2 3 4 5 6 7 Last Page 1 of 70