one man

Alexey Ivanov

1140 Reputation

17 Badges

11 years, 297 days

Social Networks and Content at Maplesoft.com

Maple Application Center

MaplePrimes Activity


These are questions asked by one man

When I work with the fsolve and the number of variables is greater than 9, I have to use the op very carefully, because the order of the variables changes. The same thing happens when working with dsolve(numeric), which is especially inconvenient. For example, the RootFinding [Isolate]  works fine.
I ran into this a very long time ago and I have examples with 15 variables. It is completely unclear why such was done.
How to work with it or how to avoid it?
Example of the same solution using  fsolve and RootFinding [Isolate]

restart:
 CD1 := -.5; CD2 := 2; CD3 := 1.; 
 g1 := 5.; g2 := 3.; g3 := 2.; 
 cg1 := 0.; cg2 := 3.7; cg3 := 1;
 cd1 := 7.5; cd2 := 0; cd3 := 0; 
 L1 := .72; L2 := 8.6; L3 := 5.5; L4 := 1.25; L5 := 3.102; L6 := 5.1; L7 := 7.; 
f1 := (CD1-x4)^2+(CD2-x5)^2+(CD3-x6)^2-L1^2; 
f2 := x1-5; 
f3 := x5-1.45; 
f4 := (g1-x1)^2+(g2-x2)^2+(g3-x3)^2-L3^2; 
f5 := (x7-x1)^2+(x8-x2)^2+(x9-x3)^2-L2^2; 
f6 := (cg1-x7)^2+(cg2-x8)^2-(cg3-x9)^2-L4^2; 
f7 := x7+x8-1.2*cg2; 
f8 := (x4-x7)^2+(x5-x8)^2+(x6-x9)^2-L5^2; 
f9 := (cd1-x10)^2+(cd2-x11)^2+(cd3-x12)^2-L6^2; 
f10 := (x1-x10)^2+(x2-x11)^2+(x3-x12)^2-L7^2;
f11 := x11-.1*x12; 
f12 := x1-x2-x3-x4+x5+x6+x7+x8+x9+x10+x11-x12; 
fsolve({f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12}); 
RootFinding[Isolate]([f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12], [x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12])[4];
  {x1 = 5.000000000, x10 = 6.265979021, x11 = 0.4923895285, 
  x12 = 4.923895285, x2 = 7.363909611, x3 = 5.347580157, 
    x4 = -0.4802494112, x5 = 1.450000000, x6 = 0.5357695462,
    x7 = 2.014012007, x8 = 2.425987993, x9 = -1.029002454}
[x1 = 5., x2 = 7.363909611, x3 = 5.347580157, x4 = -0.4802494112, 
  x5 = 1.450000000, x6 = 0.5357695462, x7 = 2.014012007,
  x8 = 2.425987993, x9 = -1.029002454, x10 = 6.265979021,
  x11 = 0.4923895285, x12 = 4.923895285]


 

Nothing special, just out of boredom.
Learned about the existence of multifocal ellipses. I stopped at the option with 5 focuses and made the corresponding equation, when the sum of the distances from each point of the ellipse to these five points is constant. If we try to get rid of the radicals, we get an equation whose graph will contain branches that do not meet the condition of the constancy of the sum of the distances from points on the curve to our 5 fixed points. In my case (as usual) Draghilev's method is used to show that each point on the curve is at a fixed distance from 5 stationary points.
Is there a mathematical way to show the same thing? I think not, maybe some other numerical method. So then: is there an easier way? It is clear that the number of focuses can be larger.
FOCI_5_EXAMPLE.mw


It was interesting not to miss the solutions of such a test equation  x * (1 + 1.0001 * sin (x ^ 2)) = 0 on a fairly large arbitrary segment using NextZero.
It turned out that NextZero skips solutions.
For example, solutions in the range from 7.5 to 10 are skipped.  And two more specific solutions skipped 21.232154952 and 21.232821004.
I took Digits to help, but it didn't affect anything. Most likely the reason is that I am a bad user.  The example seems to be a good one.
 

restart: 
#Digits := 30; 
f := proc (x) options operator, arrow; x*(1+1.0001*sin(x^2)) end proc; 
RootFinding:-NextZero(f, 1.0): 
for j to 154 do RootFinding:-NextZero(f, %) end do



 

Why in geom3d[FindAngle] we cannot get the value of the angle of a triangle greater than Pi / 2?
For example, I build a chord of a circle of unit radius along the sides of the triangle and calculate the center angle that corresponds to the given angle of the triangle. But it's not very convenient.
TR_ANGLE.mw

Recently found out about Steiner ellipsoids. This is an ellipsoid inscribed in a tetrahedron, and an ellipsoid described near a tetrahedron. One ellipsoid touches the faces of the tetrahedron in centroids, the other ellipsoid touches the planes in vertices of the tetrahedron, and these planes are parallel to the faces.
steiner_in_ellipsoid.mw
steiner_out_ellipsoid.mw

There is a desire to find out if 4 vertices determine the tetrahedron or not. And it seems Maple answer this question:

restart: with(geom3d):
point(A, 0, 0, 0), point(B, 1, 0, 0), point(C, 0, 0, 1), point(F, 0, 1, 0):
gtetrahedron(T1, [A, B, C, F]):
i := nops(op(0, detail(T1))); 
if i = 1 then print("Ok gtetrahedron") else print("No gtetrahedron") end if:

 I want to stop further execution of the program if the tetrahedron is not determine, for example, when point
B = [0,0,0], but I don’t know how to do it.

 

1 2 3 4 Page 2 of 4