Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to specify domain of a function in wolfram alpha

Tags:

wolframalpha

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

like image 238
hooch Avatar asked Feb 23 '11 05:02

hooch


People also ask

How do you choose the domain of a function?

Let y = f(x) be a function with an independent variable x and a dependent variable y. If a function f provides a way to successfully produce a single value y using for that purpose a value for x then that chosen x-value is said to belong to the domain of f.

How do you set a domain in Mathematica?

Mathematica provides a general mechanism for specifying constraints on patterns. All you need do is to put /; condition at the end of a pattern to signify that it applies only when the specified condition is True. You can read the operator /; as "slash-semi", "whenever" or "provided that".

How do you define a function in Wolfram Alpha?

In mathematics, a function is defined as a relation, numerical or symbolic, between a set of inputs (known as the function's domain) and a set of potential outputs (the function's codomain).


1 Answers

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

like image 99
Bob Avatar answered Oct 23 '22 14:10

Bob