Graphing Functions with Limits on WolframAlpha

  • Context: MHB 
  • Thread starter Thread starter Taryn1
  • Start date Start date
  • Tags Tags
    Confusion
Click For Summary
SUMMARY

The discussion focuses on graphing a piecewise-defined function using WolframAlpha. The specific function discussed is h(x) defined as follows: 4-x^2 for x < -2, 3 + x for -2 ≤ x < 0, and x^2 + 1 for x ≥ 0. The user successfully learns to input this function into WolframAlpha using the command: plot(piecewise(((4-x^2,x<-2),(3+x,-2 <= x < 0),(x^2+1,x>=0)))) {x,-5,5}. This command allows for proper domain limits to be set for the graph.

PREREQUISITES
  • Understanding of piecewise-defined functions
  • Familiarity with WolframAlpha syntax
  • Basic knowledge of mathematical notation, including inequalities
  • Ability to interpret LaTeX code for mathematical expressions
NEXT STEPS
  • Research how to graph piecewise functions in other tools like Desmos
  • Learn about the syntax for defining functions in WolframAlpha
  • Explore LaTeX formatting for mathematical expressions
  • Investigate advanced graphing techniques using WolframAlpha
USEFUL FOR

Students, educators, and mathematicians who need to graph piecewise functions and utilize WolframAlpha for mathematical visualization.

Taryn1
Messages
25
Reaction score
0
Hi again I'm trying to graph a function in WolframlAlpha, but I can't figure out how to set limits on the x-value's domain. Is that an option for that site? I'm trying to do this function set:

_____ 4-x^2, x < -2
h(x) = 3 + x, -2 \le x < 0
_____x^2 + 1, x \ge 0

It's hard enough to figure out how to enter that in here, even more so to figure out to enter it into WolframlAlpha!

And that's like a set of a function, you know, it would usually be written with one large { to the left of the three equations and to the right of the h(x).

Editing again! the \le means 'equal to or less than' and the \ge means 'equal to or greater than'. I can't get the fancy math symbols to work...

Help! (Sweating)
 
Last edited:
Physics news on Phys.org
Welcome to MHB, Taryn!

Ah, I see you are attempting a piecewise-defined function:

$$h(x)=\begin{cases}4-x^2,\quad x<-2 \\ 3+x,\quad -2\le x<0 \\ x^2+1,\quad x\ge 0 \end{cases}.$$

(Right-click this nice mathy stuff, and you can see the $\LaTeX$ code that makes it tick.)

Is that correct? Yeah, that's a bit tricky in WolframAlpha (aka W|A). You might try this convoluted thing:

Code:
plot(piecewise(((4-x^2,x<-2),(3+x,-2 <= x < 0),(x^2+1,x>=0)))) {x,-5,5}

It seemed to work. I got this tip off of this video, and added the $-5\le x\le 5$ domain as an afterthought, which W|A interpreted correctly.
 
Cool. Thanks so much for the help!
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
Replies
6
Views
2K
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K