how to specify domain of a function in wolfram alpha

六眼飞鱼酱① 提交于 2021-02-08 12:47:05

问题


Is there a way to specify the domain for a function in wolfram alpha? I have a function which I want to plot. I want to restrict the function f(x,y) = xy(3-x-y) to x>=0, y>=3 and y <=3-x


回答1:


You can specify boundaries of the function parameters in Wolfram Alpha. They are more of a hint to the plotting library how much to scale the plot than exact boundaries, so in your case y is not calculated only with a value of 3. Although the boundaries in your case do not make much sense, as noted by @Sjoerd, this answer could be useful for setting sensible boundaries.

To plot your function, write the following in Wolfram Alpha: f(x,y) = xy(3-x-y) for x>=0, y=3..3-x

It works better with boundaries set around zero and univariate functions: plot y^2 cos(x), x=-6..6, y=-2..2 plot f(x) = -8/x + sqrt(7/x^2+1/x+1) for x=1..50

Reference: Wolfram Alpha Blog




回答2:


Your restrictions make no sense. For x>=0 it follows that y<=3-x equals y<=3, but you also have y>=3, so this means that you want a plot for y=3. So, what you want to plot is apparently f(x)= -3x^2.

Other than that, I don't think WA currently allows a RegionFunction as in Mathematica



来源:https://stackoverflow.com/questions/5087461/how-to-specify-domain-of-a-function-in-wolfram-alpha

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!