使用Mathematica中的隐式函数

Oma*_*ama 7 wolfram-mathematica

我可以在Mathematica中绘制和处理隐式函数吗?

例如 :-

x^3 + y^3 = 6xy

我可以绘制这样的函数吗?

Mar*_*ure 19

ContourPlot[x^3 + y^3 == 6*x*y, {x, -2.7, 5.7}, {y, -7.5, 5}]
Run Code Online (Sandbox Code Playgroud)

两条评论:

  1. 注意双等号和乘法符号.
  2. 您可以通过WolframAlpha接口找到这个确切的输入.这个界面更宽容,几乎完全接受你的输入 - 虽然,我确实需要指定我想要某种类型的情节.

在此输入图像描述


Arn*_*ing 16

是的,使用ContourPlot.

甚至可以x^3 + y^3 = 6xy通过用Line多个Text基元替换基元来沿着自己的曲线绘制文本:

ContourPlot[x^3 + y^3 == 6 x y, {x, -4, 4}, {y, -4, 4}, 
 Background -> Black, PlotPoints -> 7, MaxRecursion -> 1, ImageSize -> 500] /. 
{
 Line[s_] :> 
 Map[
  Text[Style["x^3+y^3 = 6xy", 16, Hue[RandomReal[]]], #, {0, 0}, {1, 1}] &, 
  s]
}
Run Code Online (Sandbox Code Playgroud)

Mathematica图形

或者您可以沿着曲线设置等式的动画,如下所示:

res = Table[ Normal[
 ContourPlot[x^3 + y^3 == 6 x y, {x, -4, 4}, {y, -4, 4}, 
  Background -> Black, 
  ImageSize -> 600]] /. 
 {Line[s_] :> {Line[s], 
   Text[Style["x^3+y^3 = 6xy", 16, Red], s[[k]], {0, 0}, 
    s[[k + 1]] - s[[k]]]}},
  {k, 1, 448, 3}];

ListAnimate[res]
Run Code Online (Sandbox Code Playgroud)

Mathematica图形

  • 怎么可能不投票给这个答案:怎么可能抵制沿轨道运行的"方程式列车"呢? (4认同)