Kitonum

21500 Reputation

26 Badges

17 years, 60 days

MaplePrimes Activity


These are answers submitted by Kitonum

indets(P, function(identical(t)));

I understood the problem as follows. There are 10 questions and for each question a student can get a certain number of points from the set  {a, b, c, d} , where a, b, c, d  are integers in ascending order (the number  a  may be negative). Therefore, his final grade is determined by a list  [x1, x2, x3, x4]  in which x1 is the number of answers, in each of which he earned  points, x2  - b points  and so on. Should be  0<=xi<=10  and  x1+x2+x3+x4=10 .  Using the command for the number of compositions, we obtain an upper bound for the maximum number of distinct grades in the general case (the total 286) and for specific numbers  a, b, с, d . This method can be easily generalized to any number of questions and any set of possible points for 1 answer.

 

restart;
combinat:-composition(14,4):
S:=map(t->t-~1,%); # The set of all the conpositions of the number 10
nops(S); ``;
N:=map(p->p[1]*a+p[2]*b+p[3]*c+p[4]*d, S): # The set of grades

# Examples of use

eval(N,[a=0,b=1,c=2,d=3]);
nops(%); ``;
eval(N,[a=-1,b=1,c=2,d=3]);
nops(%); ``;
eval(N,[a=0,b=3,c=4,d=5]);
nops(%);

{[0, 0, 0, 10], [0, 0, 1, 9], [0, 0, 2, 8], [0, 0, 3, 7], [0, 0, 4, 6], [0, 0, 5, 5], [0, 0, 6, 4], [0, 0, 7, 3], [0, 0, 8, 2], [0, 0, 9, 1], [0, 0, 10, 0], [0, 1, 0, 9], [0, 1, 1, 8], [0, 1, 2, 7], [0, 1, 3, 6], [0, 1, 4, 5], [0, 1, 5, 4], [0, 1, 6, 3], [0, 1, 7, 2], [0, 1, 8, 1], [0, 1, 9, 0], [0, 2, 0, 8], [0, 2, 1, 7], [0, 2, 2, 6], [0, 2, 3, 5], [0, 2, 4, 4], [0, 2, 5, 3], [0, 2, 6, 2], [0, 2, 7, 1], [0, 2, 8, 0], [0, 3, 0, 7], [0, 3, 1, 6], [0, 3, 2, 5], [0, 3, 3, 4], [0, 3, 4, 3], [0, 3, 5, 2], [0, 3, 6, 1], [0, 3, 7, 0], [0, 4, 0, 6], [0, 4, 1, 5], [0, 4, 2, 4], [0, 4, 3, 3], [0, 4, 4, 2], [0, 4, 5, 1], [0, 4, 6, 0], [0, 5, 0, 5], [0, 5, 1, 4], [0, 5, 2, 3], [0, 5, 3, 2], [0, 5, 4, 1], [0, 5, 5, 0], [0, 6, 0, 4], [0, 6, 1, 3], [0, 6, 2, 2], [0, 6, 3, 1], [0, 6, 4, 0], [0, 7, 0, 3], [0, 7, 1, 2], [0, 7, 2, 1], [0, 7, 3, 0], [0, 8, 0, 2], [0, 8, 1, 1], [0, 8, 2, 0], [0, 9, 0, 1], [0, 9, 1, 0], [0, 10, 0, 0], [1, 0, 0, 9], [1, 0, 1, 8], [1, 0, 2, 7], [1, 0, 3, 6], [1, 0, 4, 5], [1, 0, 5, 4], [1, 0, 6, 3], [1, 0, 7, 2], [1, 0, 8, 1], [1, 0, 9, 0], [1, 1, 0, 8], [1, 1, 1, 7], [1, 1, 2, 6], [1, 1, 3, 5], [1, 1, 4, 4], [1, 1, 5, 3], [1, 1, 6, 2], [1, 1, 7, 1], [1, 1, 8, 0], [1, 2, 0, 7], [1, 2, 1, 6], [1, 2, 2, 5], [1, 2, 3, 4], [1, 2, 4, 3], [1, 2, 5, 2], [1, 2, 6, 1], [1, 2, 7, 0], [1, 3, 0, 6], [1, 3, 1, 5], [1, 3, 2, 4], [1, 3, 3, 3], [1, 3, 4, 2], [1, 3, 5, 1], [1, 3, 6, 0], [1, 4, 0, 5], [1, 4, 1, 4], [1, 4, 2, 3], [1, 4, 3, 2], [1, 4, 4, 1], [1, 4, 5, 0], [1, 5, 0, 4], [1, 5, 1, 3], [1, 5, 2, 2], [1, 5, 3, 1], [1, 5, 4, 0], [1, 6, 0, 3], [1, 6, 1, 2], [1, 6, 2, 1], [1, 6, 3, 0], [1, 7, 0, 2], [1, 7, 1, 1], [1, 7, 2, 0], [1, 8, 0, 1], [1, 8, 1, 0], [1, 9, 0, 0], [2, 0, 0, 8], [2, 0, 1, 7], [2, 0, 2, 6], [2, 0, 3, 5], [2, 0, 4, 4], [2, 0, 5, 3], [2, 0, 6, 2], [2, 0, 7, 1], [2, 0, 8, 0], [2, 1, 0, 7], [2, 1, 1, 6], [2, 1, 2, 5], [2, 1, 3, 4], [2, 1, 4, 3], [2, 1, 5, 2], [2, 1, 6, 1], [2, 1, 7, 0], [2, 2, 0, 6], [2, 2, 1, 5], [2, 2, 2, 4], [2, 2, 3, 3], [2, 2, 4, 2], [2, 2, 5, 1], [2, 2, 6, 0], [2, 3, 0, 5], [2, 3, 1, 4], [2, 3, 2, 3], [2, 3, 3, 2], [2, 3, 4, 1], [2, 3, 5, 0], [2, 4, 0, 4], [2, 4, 1, 3], [2, 4, 2, 2], [2, 4, 3, 1], [2, 4, 4, 0], [2, 5, 0, 3], [2, 5, 1, 2], [2, 5, 2, 1], [2, 5, 3, 0], [2, 6, 0, 2], [2, 6, 1, 1], [2, 6, 2, 0], [2, 7, 0, 1], [2, 7, 1, 0], [2, 8, 0, 0], [3, 0, 0, 7], [3, 0, 1, 6], [3, 0, 2, 5], [3, 0, 3, 4], [3, 0, 4, 3], [3, 0, 5, 2], [3, 0, 6, 1], [3, 0, 7, 0], [3, 1, 0, 6], [3, 1, 1, 5], [3, 1, 2, 4], [3, 1, 3, 3], [3, 1, 4, 2], [3, 1, 5, 1], [3, 1, 6, 0], [3, 2, 0, 5], [3, 2, 1, 4], [3, 2, 2, 3], [3, 2, 3, 2], [3, 2, 4, 1], [3, 2, 5, 0], [3, 3, 0, 4], [3, 3, 1, 3], [3, 3, 2, 2], [3, 3, 3, 1], [3, 3, 4, 0], [3, 4, 0, 3], [3, 4, 1, 2], [3, 4, 2, 1], [3, 4, 3, 0], [3, 5, 0, 2], [3, 5, 1, 1], [3, 5, 2, 0], [3, 6, 0, 1], [3, 6, 1, 0], [3, 7, 0, 0], [4, 0, 0, 6], [4, 0, 1, 5], [4, 0, 2, 4], [4, 0, 3, 3], [4, 0, 4, 2], [4, 0, 5, 1], [4, 0, 6, 0], [4, 1, 0, 5], [4, 1, 1, 4], [4, 1, 2, 3], [4, 1, 3, 2], [4, 1, 4, 1], [4, 1, 5, 0], [4, 2, 0, 4], [4, 2, 1, 3], [4, 2, 2, 2], [4, 2, 3, 1], [4, 2, 4, 0], [4, 3, 0, 3], [4, 3, 1, 2], [4, 3, 2, 1], [4, 3, 3, 0], [4, 4, 0, 2], [4, 4, 1, 1], [4, 4, 2, 0], [4, 5, 0, 1], [4, 5, 1, 0], [4, 6, 0, 0], [5, 0, 0, 5], [5, 0, 1, 4], [5, 0, 2, 3], [5, 0, 3, 2], [5, 0, 4, 1], [5, 0, 5, 0], [5, 1, 0, 4], [5, 1, 1, 3], [5, 1, 2, 2], [5, 1, 3, 1], [5, 1, 4, 0], [5, 2, 0, 3], [5, 2, 1, 2], [5, 2, 2, 1], [5, 2, 3, 0], [5, 3, 0, 2], [5, 3, 1, 1], [5, 3, 2, 0], [5, 4, 0, 1], [5, 4, 1, 0], [5, 5, 0, 0], [6, 0, 0, 4], [6, 0, 1, 3], [6, 0, 2, 2], [6, 0, 3, 1], [6, 0, 4, 0], [6, 1, 0, 3], [6, 1, 1, 2], [6, 1, 2, 1], [6, 1, 3, 0], [6, 2, 0, 2], [6, 2, 1, 1], [6, 2, 2, 0], [6, 3, 0, 1], [6, 3, 1, 0], [6, 4, 0, 0], [7, 0, 0, 3], [7, 0, 1, 2], [7, 0, 2, 1], [7, 0, 3, 0], [7, 1, 0, 2], [7, 1, 1, 1], [7, 1, 2, 0], [7, 2, 0, 1], [7, 2, 1, 0], [7, 3, 0, 0], [8, 0, 0, 2], [8, 0, 1, 1], [8, 0, 2, 0], [8, 1, 0, 1], [8, 1, 1, 0], [8, 2, 0, 0], [9, 0, 0, 1], [9, 0, 1, 0], [9, 1, 0, 0], [10, 0, 0, 0]}

 

286

 

``

 

{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30}

 

31

 

``

 

{-10, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30}

 

40

 

``

 

{0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50}

 

49

(1)
 

 


We see that in the second example the correct answer is 40 and not 41 (as in Carl's answer). The grade  -9  is not possible.

Download grade.mw

restart;
with(Student:-Precalculus):
P:=x^2 + y^2 - 2*x - y - 2 = 10;
P1:=lhs(P);
A:=CompleteSquare(P1, x);
op(1,A)+CompleteSquare(A-op(1,A), y)=rhs(P);

 

Edit. Here is another simpler way to get the desired order. In the list of variables, we indicate them in reverse order. This method works with more variables and with parameters. Unfortunately, he has the same drawback (indicated by acer), but we can do this without any zwischenzugs :

restart;
with(Student:-Precalculus):
P := x^2 + y^2 - 2*x - y - 2 = 10;
P1 := b*y+c*z^2/2+d*z-y^2-a*x-2+x^2 = 10;
CompleteSquare(P, [y,x]);
CompleteSquare(P1, [z,y,x]);

          

 

 

Third derivative of  y  by  x :

implicitdiff(y^2 = x^3+a*x+b, y, x$3);

restart;
dsolve(diff(f(x,y,z),z$2) = A - B*exp(-A*z), f(x,y,z));

                

Here  _F1  and  _F2  are arbitrary functions of  x  and  y .

1. If we understand this problem as literally written "to find the supremum of the sequence of the function", then the task is trivial, because the limit function is 0 if  x<>0  and  1  if  x=0. Unfortunately, Maple incorrectly calculates the limit at the point  x=0 :

limit((x^2+4)/(2*x^2+(n*x+2)^2), n = infinity);

Output is 0
Should be  piecewise(x = 0, 1, 0) .

So the right answer is  1 .


Below, the less trivial problem is solved: to find the maximum of the function  f(x)  in the range  [1,infinity)  as a function of the parameter  n  (at first, looking at OP's code, I understood the problem in this very wording.).

2. Note that the correct command to find the maximum (symbolically) will be  maximize  not  maximum. It is obvious that Maple does not directly cope with this problem. Therefore, we present a manual solution in which all the calculations are done using Maple. The case n = 0 is obvious, because  we get an even function that decreases on the range  [1,infinity] . Therefore, the maximum value of the function in this interval is equal to  f(1). We show that in all other cases (n<0 or n>0) also the maximum value of the function on the range  [1,infinity] is equal to  f(1) . If  n<>0 , then the function always has 2 critical points, and if  n<0 , then both critical points are less than 1, and if  n>0 , then only one critical point is greater than 1. In the second case, the second derivative at this point is positive , so the function has a minimum at this point. Therefore, in all cases, it is enough for us to compare 2 values  f(1)  and  f(infinity) , and this is easily verified that  f(1)>f(infinity). So the final answer  is  f(1) = 5/(n^2+4*n+6) .


 

restart;

f:=x->(x^2+4)/(2*x^2+(n*x+2)^2);

proc (x) options operator, arrow; (x^2+4)/(2*x^2+(n*x+2)^2) end proc

(1)

maximize(f(x), x=1..infinity);
x1, x2:=solve(diff(f(x), x) = 0, x);
plot([x1,x2], n=-7..7, color=[red,blue]);
maximize(x2,location);
evalf(%);

maximize((x^2+4)/(2*x^2+(n*x+2)^2), x = 1 .. infinity)

 

(n^2+(n^4+6*n^2+1)^(1/2)+1)/n, -(-n^2+(n^4+6*n^2+1)^(1/2)-1)/n

 

 

-2+8^(1/2), {[{n = -1}, -2+8^(1/2)]}

 

.828427125, {[{n = -1.}, .828427125]}

(2)

simplify(eval(diff(f(x),x,x),x=x1));

2*(n^4+6*n^2+1)*((n^2+2)*(n^4+6*n^2+1)^(1/2)+n^4+5*n^2+2)*n^4/((n^4+5*n^2+2)*(n^4+6*n^2+1)^(1/2)+n^6+8*n^4+13*n^2+2)^3

(3)

simplify(eval(f(x),x=1)), limit(f(x), x=infinity);
minimize(%[1]-%[2], n=0..infinity, location);
plot([5/(n^2+4*n+6), 1/(n^2+2)], n=-10..10, color=[red,blue]);

5/(n^2+4*n+6), 1/(n^2+2)

 

0, {[{n = infinity}, 0]}

 

 

plot(eval(f(x),n=0), x=-10..10); # The case n=0

 

 


Edit.

Download maximize_new.mw

Expr:=(D@@2)(T)(0) + :-O(1) + 1/2*sin(1/2*Pi*T(x))^2 + 1/12*sin(1/2*Pi*T(x))*Pi*diff(T(x), x)*cos(1/2*Pi*T(x)) + :-O(2/3*(3/2*Pi^2*diff(T(x), x)*cos(1/2*Pi*T(x))^2*diff(T(x), x, x) - Pi^3*diff(T(x), x)^3*cos(1/2*Pi*T(x))*sin(1/2*Pi*T(x)) + sin(1/2*Pi*T(x))*Pi*diff(T(x), x, x, x)*cos(1/2*Pi*T(x)) - 3/2*sin(1/2*Pi*T(x))^2*Pi^2*diff(T(x), x, x)*diff(T(x), x))/Pi^2);
remove(has, Expr, O);

 

restart;
plots:-implicitplot3d(min(1/16*(3*x^2+10*x*z-16*y^2+3*z^2), x, z)=0, x = -5 .. 15, y = -15 .. 15, z = -5 .. 15, grid = [100, 100, 100], style = surface, axes=normal);

                                 

 

Comments on solutions:

Problem 2. Note that the ends of these two chords lie on the same circle if and only if the equality  w*x=y*z  is true. We introduce a Cartesian coordinate  X, Y  system in which the origin coincides with the intersection point of the chords, the orientation is normal.

Problem 3. We denote by h the height of the cone, V  is the volume of the filled part, V1  is the volume of the unfilled part. We take advantage of the fact that the ratio of the volumes of similar bodies is equal to the ratio of cubes of the corresponding linear dimensions.

Problem 3. We denote by  [0, y0]  the coordinates of the center of this circle and find  y0  using the discriminant of the obtained quadratic equation.


 

restart;

# Solution of the problem 2

Circle:=(X-x0)^2+(Y-y0)^2=r^2;
A:=[x,0]: B:=[0,z]: C:=[y*z/x,0]: E:=[0,y]:
[seq(eval(Circle,[X=L[1],Y=L[2]]), L=[A,B,C,E])];
solve(%,[x0,y0,r], explicit);
r^2=expand(eval(r^2,%[1]));
simplify(%,{y*z/x=w});

(X-x0)^2+(Y-y0)^2 = r^2

 

[(x-x0)^2+y0^2 = r^2, x0^2+(z-y0)^2 = r^2, (y*z/x-x0)^2+y0^2 = r^2, x0^2+(y-y0)^2 = r^2]

 

[[x0 = (1/2)*(x^2+y*z)/x, y0 = (1/2)*y+(1/2)*z, r = (1/2)*(x^4+x^2*y^2+x^2*z^2+y^2*z^2)^(1/2)/x], [x0 = (1/2)*(x^2+y*z)/x, y0 = (1/2)*y+(1/2)*z, r = -(1/2)*(x^4+x^2*y^2+x^2*z^2+y^2*z^2)^(1/2)/x]]

 

r^2 = (1/4)*x^2+(1/4)*y^2+(1/4)*z^2+(1/4)*y^2*z^2/x^2

 

r^2 = (1/4)*x^2+(1/4)*y^2+(1/4)*z^2+(1/4)*w^2

(1)

# Solution of the problem 3

solve({(8/h)^3=V1/(V+V1),((h-2)/h)^3=V/(V+V1)}, explicit);
evalf(eval(h, %[1]));

{V = (1/64)*V1*(-32+11*85^(1/2)), V1 = V1, h = 1+85^(1/2)}, {V = (1/64)*V1*(-32-11*85^(1/2)), V1 = V1, h = 1-85^(1/2)}

 

10.21954446

(2)

# Solution of the problem 4

eliminate({x^2+(y-y0)^2=1,y=x^2}, x);
y0:=solve(discrim(%[1,2][],y)=0);
solve({x^2+(y-y0)^2=1,y=x^2}, explicit); # The points of tangency
int(y0-sqrt(1-x^2)-x^2, x=-(1/2)*sqrt(3)..(1/2)*sqrt(3));
evalf(%);
plots:-display(plot([x^2, [cos(t),sin(t)+y0, t=0..2*Pi]], x=-3/2..3/2, color=[red,blue], thickness=2, scaling=constrained, gridlines, size=[700,500]), plots:-inequal({y>x^2,y<y0-sqrt(1-x^2)},x=-1..1, y=0..1, color=yellow, nolines));

[{x = y^(1/2)}, {y^2-2*y*y0+y0^2+y-1}], [{x = -y^(1/2)}, {y^2-2*y*y0+y0^2+y-1}]

 

5/4

 

{x = (1/2)*3^(1/2), y = 3/4}, {x = -(1/2)*3^(1/2), y = 3/4}

 

(3/4)*3^(1/2)-(1/3)*Pi

 

.251840555

 

 

 


 

Download problems_2_3_4.mw

L:= [0,3,0,7]:
k:=0:
for i from 1 to 4 do
if L[i] > 0 then k:=k+1; 
x[k]:= L[i]/2
end if;
end do:
convert(x,list);

                                   [3/2, 7/2]

In Maple 2018.2

sum(sin(Pi*n/2)*sin(n*Pi*(x + 1)/2)*cos(n*Pi*t/2),n=1..infinity, formal);
evalc(convert(%, exp));

                        (-sin((1/2)*Pi*(3*t-x+1))-sin((1/2)*Pi*(t+3*x+1))+sin((1/2)*Pi*(3*t+x-1))+sin((1/2)*Pi*(t-3*x+1))-sin((1/2)*Pi*(t+3*x-1))-2*sin((1/2)*Pi*(t-x-1))+2*sin((1/2)*Pi*(t+x-1))-sin((1/2)*Pi*(3*t-x-1))+2*sin((1/2)*Pi*(t+x+1))-2*sin((1/2)*Pi*(t-x+1))+sin((1/2)*Pi*(3*t+x+1))+sin((1/2)*Pi*(t-3*x-1)))/((2*(exp(I*Pi*(t+x))-1))*(exp(I*Pi*(t-x))-1)*(exp(-I*Pi*(t-x))-1)*(exp(-I*Pi*(t+x))-1))

                                                          0

To calculate the areas integrals are used. If this is not permitted, then use the formula for the area of a circular segment.

with(plots): with(plottools):
Square:=curve([[0,0],[0,4],[4,4],[4,0],[0,0]], color=black):
Circle_green:=plot([4*cos(t),4*sin(t),t=0..Pi/2], color=green, thickness=2):
Circle_blue:=plot([2*cos(t),2*sin(t)+2,t=-Pi/2..Pi/2], color=blue, thickness=2):
Circle_red:=plot([2*cos(t)+2,2*sin(t)+4,t=-Pi..0], color=red, thickness=2):
Region_yellow:=inequal({y<sqrt(4^2-x^2),y>sqrt(2^2-x^2)+2}, x=0..2, y=2..4, color=yellow, nolines):
Region_pink:=inequal({y<sqrt(4^2-x^2),y>-sqrt(2^2-(x-2)^2)+4}, x=2..4, y=2..4, color=pink, nolines):
display(Square,Circle_green,Circle_blue,Circle_red, Region_yellow, Region_pink, gridlines);
Area_yellow:=int(sqrt(4^2-x^2)-(sqrt(2^2-x^2)+2), x=0..2);
evalf(%);
Area_pink:=int(sqrt(4^2-x^2)-(-sqrt(2^2-(x-2)^2)+4), x=2..eval(x,solve({sqrt(4^2-x^2)=-sqrt(2^2-(x-2)^2)+4,x>2})));
evalf(%);
Area_yellow+Area_pink;
evalf(%);

 

2*3^(1/2)+(1/3)*Pi-4

 

.511299167

 

-2*3^(1/2)-(4/3)*Pi+2*arcsin(3/5)+8*arcsin(4/5)

 

1.052472142

 

-Pi-4+2*arcsin(3/5)+8*arcsin(4/5)

 

1.563771308

(1)

 


 

Download Plottings_and_calculations.mw

Eq := a*x+b*y+c = 0; 
expand((Eq-a*x-c)/b);

 

L1:=[1,2,3,4,5]:
L2:=[0,5,2,3,7]:
L3:=[7,5,2,3,2]:
convert~([L1,L2,L3], set);
`intersect`(%[]);

                     [{1, 2, 3, 4, 5}, {0, 2, 3, 5, 7}, {2, 3, 5, 7}]
                                             {2, 3, 5}

If necessary, we can take any subsets of this set.

First 75 76 77 78 79 80 81 Last Page 77 of 290