Kitonum

21860 Reputation

26 Badges

17 years, 238 days

MaplePrimes Activity


These are replies submitted by Kitonum

@acer  with rotation. I just do not understand this line

A:=plots:-display(plottools:-rotate(plottools:-transform((x,y,z)->[y,z,x])(A),0,0,Pi/2));

 

We can simply write

A:=plottools:-rotate(A,0,-Pi/2,0);

 

The result is the same.

@mostibra  For example:

plot(eval(U(x,t),t=2), x=0..10, color=red, thickness=2);

         

 

 

@Markiyan Hirnyk  Instead of commenting on the merits, you are asking very strange questions. If you look closely at the analyzed examples, you can see that in most cases the results of my procedure and Rouben's formula coincide. Why do not you ask such questions before?

@Markiyan Hirnyk   According to your picture positive value of  H2  is measured from the vertical axis to the left. Therefore, for values  H2=2, H1=0.5, R=1   the body  does not exist. I put a condition  H1^2+H2^2<=R^2  to exclude trivial cases (the whole ball or the ball without one or two segments). Of course, the procedure can be adapted for all cases, but it is not interesting.

@jbail  First, execute restart command in your worksheet . Then just copy the code in your worksheet and then press ENTER key.

@jbail  I removed the extra commas from  the code. Try again.

@sunit 

combine(sqrt(a)*sqrt(b))  assuming positive;

                        sqrt(a*b)

 

Compare

sqrt(-1)*sqrt(-1)=I^2=-1<>sqrt((-1)*(-1))=sqrt(1)=1

@Markiyan Hirnyk  I wrote "to achieve complete clarity..."  For example, your approach does not answer the question how many real solutions has the equation for different values of  .

@tomleslie   Your code (and my one also) can be improved, if we exclude the line  if .. fi  (this is true automatically):

restart;

ts:=time():  ne:= 500:  k:=0:

for a from 1 to ne do

    for b from a to ne do

        for c from b to min(a+b-1, ne) do

            k:=k+1;

        od:

    od:

od:

k;

time()-ts;

                               10510625

                                   3.235

 

 

@tomleslie   Your comparison is incorrect because in fact the number  j  in  Student[Calculus1][ApproximateInt]  command  in 3 times greater as Maple itself divides each of the subsegments into 3 parts (see help with real Simpson's 3/8 Rule formula). When the correct comparison results are identical:

seq(Student[Calculus1][ApproximateInt](f(x), 1..5, method=simpson[3/8], partition=j), j=1..12);

seq(simp38(f,1,5,j), j=[seq(3*n, n=1..12)]);

seq(OPproc(f,1,5,j), j=[seq(3*n, n=1..12)]);

     

 

@ben maths  You are probably using an older version of Maple. The next variant is to work for you:

Simp38:=proc(f,x0,xn,n)

local  h:=(xn-x0)/n,  x:=i->x0+i*h;

3*h/8*(f(x0)+f(xn)+3*add(f(x(1+3*i)), i=0..(n-2)/3)+3*add(f(x(2+3*i)), i=0..(n-3)/3)+2*add(f(x(3+3*i)), i=0..(n-4)/3));

end proc:

@Markiyan Hirnyk  Replace  x+y+z = 2  by  x+y+z = 1  as this is in  OP  task.

 

Addition: Certainly, at some  values of parameters the minimum may not be achieved (unbounded problem)

@mangaba  I have no problem in Maple 2015 (32 bit) on Windows 8.1

@Shervin  zip  command implements elementwise union of two lists into a single list according to the specified rule.  *~ binary operation  (in  tomleslie's answer) makes the same, but it works in the later versions Maple only.

Alejandro Jakubi  and  Preben Alsholm . Thank you very much for your interest and the analysis carried out.

First 95 96 97 98 99 100 101 Last Page 97 of 134