- 注册时间
- 2015-10-15
- 最后登录
- 1970-1-1
- 威望
- 星
- 金币
- 枚
- 贡献
- 分
- 经验
- 点
- 鲜花
- 朵
- 魅力
- 点
- 上传
- 次
- 下载
- 次
- 积分
- 2202
- 在线时间
- 小时
|
发表于 2021-10-8 21:12:56
|
显示全部楼层
前面 creasson 先生程序是很正宗的机器证明程序。一时也学不会这个程序的编写方法,但是可以用直角坐标法来写程序,好处是编写容易,按相同套路一直走下去即可。
- Clear["Global`*"]; (*令O1圆圆心的纵坐标为 p/2,O2圆圆心的纵坐标为 q/2*)
- (*与以往的程序不同,点的复数坐标都采用大写字母表示。这样有其好处,比如图中有 P 这个点,所以如果 P 点的复坐标用小写字母 p \
- 表示,那 O1 的纵坐标就不能用 p/2 表示了。当然点的复坐标都用大写字母表示也有坏处,那就是变量不得使用大写的 \
- C、D、N,这几个大写字母是 mathematica 禁用的,因此这些点的复坐标可写成 CC、DD、NN,但用字符显示时仍可写 C、D、N \
- *)
- XA = 0; YA = 0; XB = 1; YB = 0; XO1 = 1/2; YO1 = p/2; XO2 = 1/2; YO2 =
- q/2;
- A = XA + I YA; B = XB + I YB; O1 = XO1 + I YO1; O2 = XO2 + I YO2;
- CC = Solve[{(x - 1/2)^2 + (y - q/2)^2 == (1/2)^2 + (q/2)^2(*O2圆方程*),
- y == -1/p x(*AC方程*)}, {x, y}];
- XC = Part[Part[Part[CC, 2], 1], 2];
- YC = Part[Part[Part[CC, 2], 2], 2];
- CC = Factor@Simplify[XC + I YC];
- DD = Solve[{(x - 1/2)^2 + (y - p/2)^2 == (1/2)^2 + (p/2)^2(*O1圆方程*),
- y == -1/q x(*AD方程*)}, {x, y}];
- XD = Part[Part[Part[DD, 2], 1], 2];
- YD = Part[Part[Part[DD, 2], 2], 2];
- DD = Factor@Simplify[XD + I YD];
- Print["C = ", CC];
- Print["D = ", DD];
- EE = Solve[{(x - 1/2)^2 + (y - p/2)^2 == (1/2)^2 + (p/2)^2(*O1圆方程*), (
- y - YC)/(x - XC) == (y - YB)/(x - XB)(*CB方程*)}, {x, y}];
- XE = Part[Part[Part[EE, 1], 1], 2];
- YE = Part[Part[Part[EE, 1], 2], 2];
- EE = Factor@Simplify[XE + I YE];
- Print["E = ", EE];
- F = Solve[{(x - 1/2)^2 + (y - q/2)^2 == (1/2)^2 + (q/2)^2(*O2圆方程*), (
- y - YD)/(x - XD) == (y - YB)/(x - XB)(*DB方程*)}, {x, y}];
- XF = Part[Part[Part[F, 1], 1], 2];
- YF = Part[Part[Part[F, 1], 2], 2];
- F = Factor@Simplify[XF + I YF];
- Print["F = ", F];
- M = Solve[{(y - YA)/(x - XA) == (y - YD)/(x - XD)(*AD方程*), (y - YE)/(
- x - XE) == (y - YO1)/(x - XO1)(*EO1方程*)}, {x, y}];
- XM = Part[Part[Part[M, 1], 1], 2];
- YM = Part[Part[Part[M, 1], 2], 2];
- M = Factor@Simplify[XM + I YM];
- Print["M = ", M];
- NN = Solve[{(y - YA)/(x - XA) == (y - YC)/(x - XC)(*AC方程*), (y - YF)/(
- x - XF) == (y - YO2)/(x - XO2)(*FO2方程*)}, {x, y}];
- XN = Part[Part[Part[NN, 1], 1], 2];
- YN = Part[Part[Part[NN, 1], 2], 2];
- NN = Factor@Simplify[XN + I YN];
- Print["N = ", NN];
- Q = Solve[{(y - YA)/(x - XA) == (y - YB)/(x - XB)(*AB方程*), (y - YM)/(
- x - XM) == (y - YN)/(x - XN)(*MN方程*)}, {x, y}];
- XQ = Part[Part[Part[Q, 1], 1], 2];
- YQ = Part[Part[Part[Q, 1], 2], 2];
- Q = Factor@Simplify[XQ + I YQ];
- Print["Q = ", Q];
- R1 = Simplify[Sqrt[(1/2)^2 + (p/2)^2]];
- R2 = Simplify[Sqrt[(1/2)^2 + (q/2)^2]];
- Print["R1 = ", R1];
- Print["R2 = ", R2];
- k = Simplify[R1^2/R2^2];
- k1 = ExpandDenominator@
- Together@ComplexExpand@Simplify[Abs[(DD - B)/(B - CC)]];
- k2 = ExpandDenominator@
- Together@ComplexExpand@Simplify[Abs[(M - Q)/(NN - Q)]];
- Print["DB/BC = ", k1];
- Print["MQ/NQ = ", k2];
- Print["(R1/R2\!\(\*SuperscriptBox[\()\), \(2\)]\) = ", k];
- If[k1 == k2 == k,
- Print["由于 DB/BC = MQ/NQ = (R1/R2\!\(\*SuperscriptBox[\()\), \
- \(2\)]\),所以 DB/BC = MQ/NQ"]]
复制代码
程序运行结果:
- C = (p-q)/(p+I)
- D = (q-p)/(q+I)
- E = ((p-I) (p-q))/((p+I) (q-I))
- F = -(((p-q) (q-I))/((p-I) (q+I)))
- M = ((p-I) (p+I) (p-q) (q-I))/(q^2 p^2-3 ^2+8 q p-3 q^2+1)
- N = -(((p-I) (p-q) (q-I) (q+I))/(q^2 p^2-3 p^2+8 q p-3 q^2+1))
- Q = -(((p^2+1) (p-q)^2 (q^2+1))/((p^2+q^2+2) (q^2 p^2-3 p^2+8 q p-3 q^2+1)))
- R1 = Sqrt[p^2+1]/2
- R2 = Sqrt[q^2+1]/2
- DB/BC = (p^2+1)/(q^2+1)
- MQ/NQ = (p^2+1)/(q^2+1)
- (R1/R2)^2 = (p^2+1)/(q^2+1)
- 由于 DB/BC = MQ/NQ = (R1/R2)^2,所以 DB/BC = MQ/NQ
复制代码 |
|