# Questions tagged [piecewise]

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

325 questions
Filter by
Sorted by
Tagged with
28 views

### ParametricPlot on Piecewise function not working with consecutive t values [closed]

I am trying to graph a piecewise function composed of a series of parametric cubic functions. I initially created a ParametricPlot for the first four pieces of the equation and it was working fine, as ...
64 views

### Fit a three-pulse sequence

I am wondering how to properly fit the three-pulse sequence shown below. I have tried a method which is fitting the three pulses with three polynominal functions seperately and then finding the x-...
103 views

### Integration of a piecewise function with parameters

Here is a simple piece-wise and continuous function: f[t_,a_,b_]:=Piecewise[{{a t,t<1},{a,t<1+b},{a(2+b-t),t<2+b}}] When I integrate ...
96 views

### Solving Piecewise Differential Equation using NDSolve (coupling at BC)

I am having some issues in dealing with a system of differential equations. I would like to solve a 1D diffusive heat equation across several regions with different material properties. I now have a ...
60 views

### Plotting a Piecewise function that returns implicit equations using ContourPlot

I am using ContourPlot to plot implicit equations. Plotting separate implicit equations seems to work fine, however I can't get ContourPlot to plot a piecewise function that returns implicit equations....
54 views

### Obtaining the diagonal of Jacobians inside a piecewise function

I have a piecewise function that has in each case an N number of functions that take N arguments. I want to retrieve the diagonals of the Jacobian, or simply the element-wise first derivative of the N ...
43 views

53 views

### Piecewise function and deriving - solving

I'm working in a (Economics) problem where I want to add two concave (profit) functions in order to maximize them together through one variable (quantity). My problem is that one of the two functions ...
287 views

### Why does plot not show where Piecewise function is not zero?

From my user point view this looks like bug. But I am not an expert. f[x_?NumericQ]:=Piecewise[{{1,x==1},{0,True}}]; Plot[f[x],{x,0,1}] Does not show ...
51 views

### Displaying part of piecewise function

If I define a piecewise function f[t_] := Piecewise[{{t^2, t < 0}, {Sin[t], t > 0}}] Which[f[t], t > 0] how do I display only one part of the function? ...
55 views

### Is it possible to unmerge Piecewise expressions?

I have an expression involving Piecewise that I want to break into specific cases. If I let Mathematica's simplification rules loose then it doesn't seem to pick up an obvious cancellation which can ...
42 views

51 views

57 views

### Piecewise function inside Integrate - Wrong result

I tried to evaluate the following integral: ...
103 views

### Fast and Listable Piecewise function

I am writing a simulation where I have an array with ten columns and on the order of millions of rows, for which I need to iterate on the order of ten thousand times, making computation time a major ...
71 views

### How can I make a NumberLineLogPlot'?

I have a piecewise function that is defined in logarithmic intervals, i.e., the different pieces are defined on ...