Kitonum

20534 Reputation

26 Badges

16 years, 89 days

MaplePrimes Activity


These are answers submitted by Kitonum

restart:

with(LinearAlgebra):

A:=<4,-1,-2>: B:=<0,2,3>: C:=<2,0,1>: M:=x*A+y*B+z*C:

solve({Norm(A-M,2)=Norm(B-M,2), Norm(C-M,2)=Norm(B-M,2), x+y+z = 1}): assign(%):

'M'=convert(M,list);

We find the coordinates of M.

The apparent error of Maple! I did the same example using the command Optimization [Minimize] . The result is also wrong!


Checked the calculation of the minimum by the second method. The result again is false:

h:=x->1+2*cos(2*x)+3*cos(4*x)+4*cos(8*x);
minimize(h(x),x=-Pi/12..5*Pi/12,location);
Optimization[Minimize](h(x),x=-Pi/12..5*Pi/12);

h := proc (x) options operator, arrow; 1+2*cos(2*x)+3*cos(4*x)+4*cos(8*x) end proc

1/2-3^(1/2), {[{x = 5*Pi/12}, 1/2-3^(1/2)]}

[-2.02634418581704, [x = .452809600260151]]

 

plot(h(x),x=-Pi/12..5*Pi/12);

 

minimize



Download minimum.mws

Such non-linear systems are usually solved numerically for given values ​​of all parameters! Note that parameter m on the right side of the first equation must be equal to 0, otherwise it would be contrary to the initial conditions.


restart; U := (x+y)/sqrt(2); V := (x-y)/sqrt(2); U1 := unapply(simplify(subs(x = (u+v)/sqrt(2), y = (u-v)/sqrt(2), U)), u, v)

proc (u, v) options operator, arrow; u end proc

 

(D[`$`(1, 2)](U1))(u, v)

0

 

(D[`$`(2, 2)](U1))(u, v)

0

 

``

Similarly, you can do the same with the second function!

Download Change_of_variable.mw

Instead of y:=unapply(f):  should be y:=unapply(f,x):

Use the command expand:

B1 := [1, 2, 0, -1]:       B2 := [0, 1, -1, 0]:                         

A1 := expand(a*B1+b*B2);                                

 

A1 := [a, b + 2 a, -b, -a]

In accordance with the syntax of Maple should be

Int(subs(x=1/t,expression)*(-1/t^2), t)

Apparently, you need to make the change of variable in the integral by the formula t = 1 / x. Then it will be necessary to write

Int(expression(x=1/t)*(-1/t^2), t)

DelBar2.mw 

 Here is the code, where only one joint edge of  adjacent polygons of the same color is deleted!

DelBar.mw

NULL

 

 

Code of the procedure

 

restart:

NULL

Example 1

 

DelBar([[pink, [[0, 0], [1, 1], [2, 1], [3, 0]]], [green, [[0, 0], [0, 1], [1, 3], [1, 1]]], [red, [[1, 3], [3, 2], [1, 2]]], [red, [[2, 2], [3, 2], [3, 0], [2, 1]]], [blue, [[1, 1], [1, 2], [2, 2], [2, 1]]]]);

 

NULL

 

Example 2

 

DelBar([[red, [[0, 0], [0, 4], [1, 4], [1, 0]]], [red, [[1, 3], [1, 4], [4, 4], [4, 0], [1, 0], [1, 1], [3, 1], [3, 3]]], [green, [[1, 1], [1, 3], [3, 3], [3, 1]]]]);

 

NULL

 

``

 

Example 3

 

DelBar([[red, [[0, 0], [0, 2], [2, 2], [2, 1], [3, 1], [3, 2], [4, 2], [4, 0]]], [green, [[0, 2], [0, 6], [3, 6], [3, 4], [2, 4], [2, 5], [1, 5], [1, 3], [2, 3], [2, 2]]], [blue, [[1, 3], [1, 5], [2, 5], [2, 3]]], [red, [[3, 2], [3, 6], [5, 6], [5, 2]]], [green, [[2, 1], [2, 4], [3, 4], [3, 1]]], [yellow, [[4, 0], [4, 2], [5, 2], [5, 0]]]]);

 

``



Download DelBar.mw

Since Your differential equation is of second order, we need another initial condition! Therefore, it is  impossible to plot your function, because there is an arbitrary constant.

See an option of solving your problem in file The_plot.mw

Thanks all for help in solving of the problem! 

First 281 282 283 Page 283 of 283