Group Abstract Group Abstract

Message Boards Message Boards

0
|
4.4K Views
|
4 Replies
|
3 Total Likes
View groups...
Share
Share this post:

How do I use correctly use curly brackets in wolfram for multi-functions?

Posted 11 years ago

Example, if I'm trying to find the limit x approaching 2 of f(x) and I have the following equation: (imagine the two curly brackets are just one big stretched one that holds everything)

f(x)= {2x+1 considering x<2

{x^2 considering x>2

How would I go about entering this in? This would be really helpful.

POSTED BY: Symond Hendricks
4 Replies

x_ means that x is an undetermined variable. You need to look at the Mathematica documentation http://reference.wolfram.com/language/

POSTED BY: S M Blinder

You can also use

f[x_] := Which[x < 2, 2 x + 1, x > 2, x^2]

although this leaves f[2] undefined

POSTED BY: S M Blinder
POSTED BY: Symond Hendricks

Use Piecewise. The documentation center has examples and sample code.

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