Message Boards Message Boards

0
|
3801 Views
|
1 Reply
|
1 Total Likes
View groups...
Share
Share this post:

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

Posted 6 years ago

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.

POSTED BY: Piotr Pawlowicz

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

POSTED BY: jagannath debata
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