## 14443 Reputation

11 years, 267 days

## Re...

Maple incorrectly decided your example 3. This equation has only one root, and this root is positive.

## Possible variant...

Newton := proc( f, x0, n, tol)

local x, g, k;

g := D(f);

x[0] := evalf(x0);

for k from 1 to n do

while evalf(abs(g(x[k-1])))<=10^(-8) do

x[k-1]:=x[k-1]+0.00001; od;

x[k] := evalf( x[k-1] - f(x[k-1])/g(x[k-1]) );

if abs(x[k]-x[k-1]) < tol then

return x[k]; fi;

od;

x[k-1];

end proc;

Examples:

Newton(x->1-x^2, 0, 20, 10^(-6));

1.000000002

Newton(x->x^2-2, 0, 20, 10^(-6));

1.414214589

## Solution scheme...

You can build any number of triangles for which the coordinates of the vertices and the coordinates of the center of circle circumscribed  are integers as follows:

1) Take  any three points with integer coordinates that do not lie on a straight line. Let be points A, B, C.

2) Find the coordinates of the center of circle circumscribed about triangle ABC as the point of intersection of three planes. The coordinates of this point will be rational numbers.

3) Find the least common multiple of the denominators of the fractions.

4) Multiply the coordinates of all the points on this number.

## Search for solutions...

As it should be |sin(x)|<=1, then we are looking for solutions only in the range x = -8 .. 8 .

The code:

RootFinding[Analytic](sin(x)=x/8, re=-8..8, im=-1..1);

## Condition...

(y1*z2-z1*y2)^2+(z1*x2-x1*z2)^2+(x1*y2-y1*x2)^2<>0

## Possible variant...

Topological structure is the same as in the figure. The form can be changed.

tubeplot({[(cos(5*t/2)+13/5)*cos(t), (cos(5*t/2)+13/5)*sin(t), 3*sin(5*t/2)/5],[(2/5*cos(7*t/3)+12/5)*cos(t), (2/5*cos(7*t/3)+12/5)*sin(t), 2*sin(7*t/3)/7]}, t=0..6*Pi, radius=1/5, style=surface,numpoints=2500, scaling=constrained, lightmodel=light4, orientation=[50, 20]);

## Re...

Include your assumptions into the system.

Example:

solve(x^2=1, x>0});

{x=1}

## Correction...

Two drawbacks:

1) The perimeter of a triangle is equal to 2p, not p.

2) If S>0, then all the vertices of the triangle are the different points.

Fixed lines:

if type(2*p, integer) and type(S, posint)

then L:=[op(L), [[0, 0, 0], [x1, y1, z1], [x2, y2, z2]]]: fi:

From a geometrical point of view is actually found  only one triangle with sides 3, 4, 5. To find other such triangles  not looking for them in space but on the plane, because search range can be substantially increased.

## The triangle does not exist...

It can be shown that there is no a triangle in space, for which coordinates of all the vertices are integers, with the angles 2*Pi/3 and Pi /4. So write the code for searching such triangles does not make sense!

1) If you want to [0,0,0] always been in the first position, then replace the braces on the brackets.

2) It's an obvious Maple bug.

## Main mistake...

Your main mistake: you look for only in the first octant in which there are no such triangles, as if two vectors out of the origin and lie entirely in the first octant, the angle between them does not exceed 90 degrees.

Write code as follows:

N:=5:

L:=[]:

for x1 from -N to N do

for y1 from x1 to N do

for z1 from y1 to N do

for x2 from -N to N do

for y2 from -N to N do

for z2 from -N to N do

a:=x1^2+y1^2+z1^2:

b:=x2^2+y2^2+z2^2:

c:=a+b-2*sqrt(a*b)*cos(2*Pi/3):

if type(a, positive) and type(b, positive) and c=(x2-x1)^2 + (y2-y1)^2 + (z2-z1)^2 then L:=[op(L), {[0, 0, 0], [x1, y1, z1], [x2, y2, z2]}]: fi:

od: od: od: od: od: od:

nops(L);

L;

## Possible way...

Code in Maple 13:

line1:=20-0.05*x:

line2:=2+0.0002*x^2:

A:=plot([line1,line2], x=0..450, color=[red, blue], thickness=3):

B:=plots[implicitplot]((y-line1)*(y-line2),x=0..450, y=-5..50, coloring=[yellow, white], filledregions=true, numpoints=50000):

plots[display](A, B);

## Example...

v:=Vector([5, -1, 6, 3]):
op(1, v);

4

## Examples...

Trivial examples:  Pythagorean triangles [[0, 0, 0], [2ab, 0, 0], [0, 0, a^2-b^2]] , where a and b - any unequal positive integers.

Nontrivial examples can be found using a simple code:

N:=10:

L:=[]:

for x1 to N do

for y1 from x1 to N do

for z1 from y1 to N do

for x2 to N do

for y2 to N do

for z2 to N do

a:=sqrt((x2-x1)^2+(y2-y1)^2+(z2-z1)^2):

if type(a, positive) and type(sqrt(x1^2+y1^2+z1^2)+ sqrt(x2^2+y2^2+z2^2)+a, integer) then L:=[op(L), {[0, 0, 0], [x1, y1, z1], [x2, y2, z2]}]: fi:

od: od: od: od: od: od:

nops(L);

L;

 First 212 213 214 215 216 217 218 Last Page 214 of 226
﻿