Kitonum

21695 Reputation

26 Badges

17 years, 186 days

MaplePrimes Activity


These are replies submitted by Kitonum

@Carl Love   Thank you, very elegant improvement. 

@Carl Love  I corrected and expanded my post.

@kegj  Should be  plot1  rather than  plot 1 . Copy my code and simply paste it into your document and run.

@kegj  You have forgotten to call  plots  package. I also removed the square brackets in  filled=[true,color=blue] . In older versions it causes an error, in the new versions can leave brackets.

 

y:=x->sin(x):

a:= -1:

b:=6:

plot1:=plot(sin(x), x=-1..6,color=red,title="graph of sin(x)"):      

plot2:=plot(sin(x),x=1..5,filled=true,color=blue):   

plots[display](plot1,plot2,view=[-1..6,-1..1],title="graph of sin(x)");

@nMaple  All is almost the same;

plot3d(x*y, x = 0 .. 2, y = x^2 .. 2*x, style = surface, filled = true, axes = normal, view = [-0.9 .. 2.4, -0.9 .. 4.4, 0 .. 8.4], orientation = [-67, 70]);

                                   

The proportions of the body in the drawing violated. This body is very narrow and high. Therefore, for a better understanding of its structure, I did not use the  scaling=constrained  option.

 

 

 

@nMaple   Add  style=surface  option and use  user lighting:

plot3d(x^2-y^2+4, x = -1 .. 1, y = 0 .. 2, style=surface, filled = true, axes = normal, view = [-1.4 .. 1.4, 0 .. 2.4, 0 .. 5.4], scaling = constrained, orientation = [50, 70]);

@nMaple  For different bodies color schemes may be different.

@Carl Love   Yes, you're right! I considered all my examples in classic worksheet Maple 2015. Check all in Maple 12. In fact there `+` command is significally faster than add command.

@Carl Love  You wrote  " I think that `+`(U[]) is faster than add(u, u= U)".  But the following examples with direct computation the sum of large number of terms does not confirm this conclusion.

The first 2 examples with the precomputed list:

restart;

X:=[seq(i^3, i=1..5000000)]:

t:=time():

`+`(X[]);

time()-t;

                            156250062500006250000000000

                                               9.453

restart;

X:=[seq(i^3, i=1..5000000)]:

t:=time():

add(x, x=X);

time()-t;

                             156250062500006250000000000

                                                7.797

 

In addition 2 examples without the precomputed list:

restart;

t:=time():

add(i^3, i=1..5000000);

time()-t;

                             156250062500006250000000000

                                                1.953

restart;

t:=time():

`+`(seq(i^3, i=1..5000000));

time()-t;

                             156250062500006250000000000

                                                18.032

 

@Alejandro Jakubi   In the help for  add  and  mul  of Maple 2015 is written:  

"The add(x) calling sequence is equivalent to add(i, i in x). Likewise, mul(x) is equivalent to mul(i, i in x)".

@Markiyan Hirnyk   Remove the extra spaces between  Matrix  and the left parenthesis from original code.

@Markiyan Hirnyk  Thank you for your helpful comment. It's interesting that  diff  command works elementwise for lists. For example, for  int  command this is not true.

@Harry Garst  Give your original pointplot, and the community will help you animate it.

@descartes0000 

expand((x+28651/50279)*(x^2+x*21628/50279+50279/28651));

evalf[20](%);

                            

 

 

@ghoust  Just plot  f(x)  and the region under it. The area of this region is your integral:

plot(f(x), x=0..1, color=green, filled=true);

                        

 

 

 

First 96 97 98 99 100 101 102 Last Page 98 of 133