Kitonum

13999 Reputation

24 Badges

11 years, 189 days

MaplePrimes Activity


These are answers submitted by Kitonum

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.

You did not present your example in an editable form, so I am showing the solution with a simple example (terms with derivatives are left on the left side of the equation, the rest are moved to the right):

restart;
Eq:=2*x(t)+1/3*diff(x(t),t)-5=0;
Terms:=[op(lhs(Eq))];
(select,remove)(has,Terms,diff);
add(%[1])=-add(%[2]);


Of course, for use, this code should be written as a procedure, and then you can apply it to each of your differential equations.

restart;
Student:-Precalculus:-CompleteSquare(x^2 + y^2 - 10*x - 75 = 0, [x,y]);
% + 100;

                                    (x-5)^2+y^2-100 = 0
                                     (x-5)^2+y^2 = 100

4 5 6 7 8 9 10 Last Page 6 of 219