Wolfram Book 之椭圆、双曲线、抛物线的图像和性质

例 1

可见,椭圆 C 的方程为 x^2/4+y^2=1,|AN|*|BM|=4.

Mathematica 代码:

Solve[{c/a == Sqrt[3]/2, Area@Triangle@{{a, 0}, {0, b}, {0, 0}} == 1, a^2 – b^2 == c^2, a > b > 0}, {a, b, c}, Reals]

x^2/a^2 + y^2/b^2 == 1 /. %

With[{A = {2, 0}, B = {0, 1}, P = {x0, y0}},

With[{M = First@Values@Solve[{Area@Triangle[{P, A, {x, y}}] == 0, x == 0}, {x, y}],

N = First@Values@Solve[{Area@Triangle[{P, B, {x, y}}] == 0, y == 0}, {x, y}]

},

EuclideanDistance[A, N] EuclideanDistance[B, M]

]

]

FullSimplify[%, x0^2/4 + y0^2 == 1]

例 2

算得线段 DE 的长为 4√5.

Mathematica 代码:

With[{A = {-Sqrt[3], 0}, B = {Sqrt[3], 0}, C = {x, y}},

Solve[{Abs[Norm[C – A] – Norm[C – B]] == 2, y == x – 2}, {x, y}]

]

EuclideanDistance @@ Values@%

例 3

点 Q 的坐标为 (5,-5), △OPQ 的最大值为 30.

Mathematica 代码:

Block[{A, B, M},

{A, B} = Values@Solve[{y == 1/2 x, y == 1/8 x^2 – 4}, {x, y}];

M = Mean@{A, B};

Solve[{y – Last@M == -Divide @@ (A – B) (x – First@M), y == -5}, {x, y}]

]

Maximize[{Area@Triangle[{{0, 0}, {x0, y0}, {5, -5}}],

y0 == 1/8 x0^2 – 4,-4 <= x0 <= 8}, {x0, y0}]

发布者:Cara,转载请注明出处:http://www.makercollider.com/course/1804

发表评论

登录后才能评论
QR code