(I) Three nonzero integers x<y<z are in Arithmetic Sequence (in this order).
Determine all possible triplets (x,y,z) that satisfy this equation;
x
2 + y
2 = z
2 - 2x*y*z
(II) With all the other conditions in (I)remaining unaltered, determine all possible triplets that satisfy this equation:
x3+z3=y3+7*y*z
clearvars,clc
disp('part i:')
for x=-100000:100000
xs=x^2;
for diff=1:10000
y=x+diff;
z=y+diff;
if xs+y^2==z^2-2*x*y*z
if x*y*z~=0
disp([x y z])
end
end
end
end
disp('part ii:')
for x=-10000:10000
xc=x^3;
for diff=1:1000
y=x+diff;
z=y+diff;
if xc+z^3==y^3+7*y*z
if x*y*z~=0
disp([x y z])
end
end
end
end
finds
part i:
-3 -2 -1
part ii:
3 5 7
uniqueness not guaranteed.
|
Posted by Charlie
on 2023-03-28 15:44:30 |