0
|
3424 Views
|
4 Replies
|
3 Total Likes
View groups...
Share
GROUPS:

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

Posted 9 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.
4 Replies
Sort By:
Posted 9 years ago
 x_ means that x is an undetermined variable. You need to look at the Mathematica documentation http://reference.wolfram.com/language/
Posted 9 years ago
 You can also usef[x_] := Which[x < 2, 2 x + 1, x > 2, x^2]although this leaves f undefined
Posted 9 years ago
 Can you elaborate? Your formula looks alot better than the messy piecewise code. I'd like to use it!What do you mean by the _ in f[x_]? and when I write it out do I also write ":= Which"What would be another random example (doesn't have to be a real equation) for say a piecewise function with THREE different functions?
Posted 9 years ago
 Use Piecewise. The documentation center has examples and sample code.