# Questions tagged [piecewise]

Questions about the Piecewise function, which is represented by different expressions for different ranges of values of its independent variable.

306 questions
Filter by
Sorted by
Tagged with
1answer
47 views

### Maximization of a a PiecewiseExpand funcion

I have the following 3 piecewise functions and their upper envelope. ...
1answer
45 views

### Find the intervals where a piecewise is maximum

I have the following 3 piecewise functions and I would like to have the threshold of the upper envelope. ...
1answer
98 views

### Converting Piecewise function to C code

I'm trying to convert a function to C Code f = D[Piecewise[{{x^2, -10 < x < 0}, {x, x > 0}}], x] I decided to scan through conditions and corresponding ...
1answer
31 views

### Extending a piecewise function defined over a limited domain to be periodic over a larger domain

I need to plot the piecewise function $\qquad f(x) = x^2\quad -2 <= x <= 0, \\ \qquad f(x) = 0\qquad 0 <= x <= 1 \\ \qquad f(x) = 1-x\quad 1 <= x <= 3 \\$ as a periodic ...
0answers
33 views

### Function inverse to PiecewiseExpand [on hold]

I'm working with very complex piecewise functions which I'd like to decompose into combination of simpler ones. I'm aware of PiecewiseExpand function which does the opposite to what I need. Is there a ...
0answers
34 views

### How to convert output from Reduce into a piecewise function?

Reduce often provides a much fuller solution than Solve. But it's always in the form of a true statement rather than functions ...
2answers
55 views

### How to define a discrete distribution with non-integer sample space elements (outcomes)?

How to define a discrete distribution with non-integer states (sample space elements)? I know how to define a discrete distribution with integer states: ...
1answer
46 views

1answer
100 views

### How to represent in a 3D graph the set of solutions to this system of inequalities?

I am studying this piecewise function: ...
1answer
50 views

### Mapping over a piecewise function

This is a followup to a question I posted earlier today. Suppose you have a piecewise function such as "snap=max[x,0]= x if x>0, 0 otherwise". Then you would think that it must be straightworward to ...
3answers
107 views

### Identifying maximal element in a list with case distinctions

I need to create code that identifies the positions of all maximum elements of a list. I already know that if myList contains only numbers, I can do ...