Kitonum

21845 Reputation

26 Badges

17 years, 234 days

MaplePrimes Activity


These are replies submitted by Kitonum

@logan35  You don't seem to understand the meaning of my answer. The procedure named  Mean  is the shortest way to find the average of any sequence of numbers. This is the program that answers the question posed in the title of your question. Your program with 2 nested loops finds the average for a particular sequence of numbers. It will work correctly if you replace the line  numb:=numb+i  with the line  numb:=numb+1 .  But with the procedure  Mean , the same is  solved much easier and shorter:

Mean:=proc() `+`(args)/nargs; end proc:
S:=seq(seq(20*i, i=1..3), j=1..5);
Mean(S);

         S := 20, 40, 60, 20, 40, 60, 20, 40, 60, 20, 40, 60, 20, 40, 60
                                                     40

 

@Mariusz Iwaniuk  I think you understand perfectly well that from the standpoint of rigorous mathematics, no finite number of terms (even 1,000,000 ones) is a proof.

@lcz  I don't know this proof.

@Mariusz Iwaniuk  Your solution uses the first few terms of the sequence  [k, f(k)] . But it does not prove that this will be true for any  k . The same result can be obtained using the first   values, since the polynomial of degree  <=n  is uniquely found of values at  n+1 points:

restart;
f := k -> sum((-1)^i*(k - i + 1)^(2*k + 4)/(i!*(2*k - i + 2)!), i = 0 .. k);
L := [seq([k,f(k)], k = 0 .. 3)];
factor(CurveFitting:-PolynomialInterpolation(L, k));

@bstuan  I am using Maple 2018.2. You didn't specify which version of Maple you are using. This can be seen from the picture you provided, your Maple is missing one solution. This is reason for the error message, because you can't link to the second solution. So to find the missing solution try the other code below where I added another system where  cos(Pi/4)  is replaced with cos(3*Pi/4) :

restart:
local D:
np:=<A,B,C>: nq:=<1,-1,0>: P:=A*x+B*y+C*z+D=0: M:=[1,0,0]: N:=[0,0,-1]:
Eq1:=eval(P,[x,y,z]=~M);
Eq2:=eval(P,[x,y,z]=~N);
Eq31:=(np.nq)/sqrt(np.np)/sqrt(nq.nq)=cos(Pi/4) assuming real;
Eq32:=(np.nq)/sqrt(np.np)/sqrt(nq.nq)=cos(3*Pi/4) assuming real;
Sol1:=solve({Eq1,Eq2,Eq31});
Sol2:=solve({Eq1,Eq2,Eq32});
simplify(eval(P,Sol1)/B); # The first solution
simplify(eval(P,Sol2)/B); # The second solution


 

Here is another way to draw a similar curve using parametric equations. This method makes it easy to animate this curve:

plots:-animate(plot,[[sin(t)^3, 13*cos(t)/15-cos(2*t)/3-2*cos(3*t)/15-cos(4*t)/15, t = -Pi .. a], color=red, thickness=3, scaling=constrained], a=-Pi..Pi, frames=90, axes=none, paraminfo=false);

                     

 

@JAMET  But you have already received instructions from  vv  on what to do so that there is no confusion between  parabola and ellipse.

@bstuan Submit your code here (as text not an image) or upload your worksheet here. You may have forgotten to download the LinearAlgebra package when using the  CrossProduct  command. Should be the  LinearAlgebra:- CrossProduct  command. 

@vv  For these examples, the  expand command does the work. But everyone would like the simplify command to do the same.

expand(tan(x+k*Pi))    assuming   k::integer;
expand(sin(x+2*k*Pi)) assuming   k::integer;

 

@Emrah Akyar It doesn't matter what names you use. If you make this assignment  H:=G , then why can't you immediately name the original graph as  , and call the new modified graph through  G . Your code will become shorter and simpler.

@nm  For large values  n>20  it is better to use the commands of the  Iterator  package: Iterator:-Permute  or  Iterator:-CartesianProduct .

@GEEMIC Yes. Just replace non-strict inequalities with strict ones and change the  axes  option:

restart;
A:=plot(1/x, x=0..3, 0..3, thickness=2):
B:=plots:-inequal({x>0,x<1}, x=0..3,y=0..3, optionsfeasible = [color = "LightBlue"]):
plots:-display(A,B, axes=frame);

 

@vv  Thank you. If we add up the areas of all triangles, we get for each of the two solutions  x+y+z+1003 = 1922 , 1922+100 = 2022

Everyone can see my solution at the link 
http://math.hashcode.ru/questions/237436/%D0%B3%D0%B5%D0%BE%D0%BC%D0%B5%D1%82%D1%80%D0%B8%D1%8F-%D1%91%D0%BB%D0%BA%D0%B0-%D0%B2-%D1%82%D1%80%D0%B5%D1%83%D0%B3%D0%BE%D0%BB%D1%8C%D0%BD%D0%B8%D0%BA%D0%B0%D1%85

@mehdibaghaee I don't know how you got it, you probably used palettes to enter these expressions. I advise you to use 1Dmath input instead of palettes and 2Dmath input, then such problems will disappear.

@Dkunb  I do not have Maple 2021 (only Maple 2018 and older), so I cannot check how the code works in your version of Maple.

First 11 12 13 14 15 16 17 Last Page 13 of 134