Message Boards Message Boards

GROUPS:

[✓]Find values of a function's variable that satisfy a certain condition?

Posted 7 months ago
514 Views
|
1 Reply
|
1 Total Likes
|

Given a function

F[x,y]=x+y

I want to find all values of y for which

Abs[F[x,y]]<= 5

when

0 <= x <= 1

The answer should be

0 <= y <= 4

Is there built in functionality that can handle a problem of this type? I'm looking for a shortcut to help avoid implementing a full blown algorithm on my own.

We may use

Reduce[Abs[x + y] <= 5 && 0 <= x <= 1, {y}, Reals]

which yields

0 <= x <= 1 && -5 - x <= y <= 5 - x

In fact the answer may not be 0<=y<=4 e.g. x = .5 and y = -2.5 gives Abs[x+y] = 2 <= 5

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract