# Plotting Piecewise Functions in CL Desmos

**URL:** <https://cl.desmos.com/t/plotting-piecewise-functions-in-cl-desmos/4908>\
**Category:** Questions\
**Created:** [May 13, 2023, 10:29am UTC](https://cl.desmos.com/t/plotting-piecewise-functions-in-cl-desmos/4908 "2023-05-13T10:29:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Spencer](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@Spencer](https://cl.desmos.com/u/Spencer)\
**Post date:** [May 13, 2023, 10:29am UTC](https://cl.desmos.com/t/plotting-piecewise-functions-in-cl-desmos/4908/1 "2023-05-13T10:29:16Z")

</div>

Hi everyone, I’m new to CL Desmos and I’m having trouble plotting piecewise functions. I’ve tried using the “conditional” command, but I’m not getting the results I’m expecting. Can someone help me figure out the correct syntax and commands to plot piecewise functions in CL Desmos? Any tips or advice would be greatly appreciated. Thank you!

---

<div class="post-metadata">

**Author:** ![SteinSchreiber](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/steinschreiber/32/2267_2.png) [@SteinSchreiber](https://cl.desmos.com/u/SteinSchreiber)\
**Post date:** [May 13, 2023, 1:13pm UTC](https://cl.desmos.com/t/plotting-piecewise-functions-in-cl-desmos/4908/2 "2023-05-13T13:13:53Z")

</div>

In the graph component or just the desmos calculator you can make piece wise function using { }.  
Use inside the brackets the form inequality in terms of x : function in terms of x , inequality in terms of x : function in terms of x , etc. Place a comma between each piece.

 ![Screen Shot 2023-05-13 at 8.09.55 AM](https://canada1.discourse-cdn.com/flex031/uploads/desmos/original/2X/d/d78aca51060f7e5a017820f2f047e484427a9f28.png)

`f\left(x\right)=\left\{x<-6:x+6,-6\le x\le6:\sqrt{36-x^{2}},x>6:-x+6\right\}`

---

<div class="post-metadata">

**Author:** ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)\
**Post date:** [May 22, 2023, 2:33pm UTC](https://cl.desmos.com/t/plotting-piecewise-functions-in-cl-desmos/4908/3 "2023-05-22T14:33:29Z")

</div>

You can also use a list of functions written as you would write a single function with restrictions. You can define each within the list (f(x)), or define separate functions and create a list from those (g(x) in the folder).

> **[Desmos | Graphing Calculator](https://www.desmos.com/calculator/fqdpugnh83)**
>
> Explore math with our beautiful, free online graphing calculator. Graph functions, plot points, visualize algebraic equations, add sliders, animate graphs, and more.
