# What is Piecewise function: Definition and 103 Discussions

In mathematics, a piecewise-defined function (also called a piecewise function, a hybrid function, or definition by cases) is a function defined by multiple sub-functions, where each sub-function applies to a different interval in the domain. Piecewise definition is actually a way of expressing the function, rather than a characteristic of the function itself.
A distinct, but related notion is that of a property holding piecewise for a function, used when the domain can be divided into intervals on which the property holds. Unlike for the notion above, this is actually a property of the function itself. A piecewise linear function (which happens to be also continuous) is depicted as an example.

View More On Wikipedia.org
1. ### Finding the center of mass of a piecewise function

I understand that I can divide this shape into a few parallelograms and a triangle and calculate the center of mass of each, but am confused as to what I should do after that. My physics teacher also wants us to use integrals, but I'm assuming I can calculate the COM of each parallelogram and...
2. ### Derivative of a piecewise function

##f(x) = \begin{cases} \frac {x^3-x^2}{x-1} & \text{if } x\neq1 \\ 1 & \text{if } x=1 \end{cases}## Find ##f'(1)##. Using derivative definition: ##f'(1)=\lim_{x \rightarrow 1} {\frac {\frac {x^3-x^2}{x-1}-f(1)} {x-1}}## ##f'(1)=\lim_{x \rightarrow 1} {\frac {\frac {x^3-x^2}{x-1}-1} {x-1}}##...
3. ### Graphing a piecewise function (Python)

I am trying to write a python script to plot the function, Where ##V_0 = 5~V## ##t_0 = 10~ms## ##\tau = 5~ms## My script that I have written to try to do this is, Which plots, However, the plot is meant to look like this with the horizontal line. Can someone please give me some guidance to...
4. ### I Piecewise Functions in the Einstein Field Equations

Let's say I want to describe a massive box in spacetime as described by the Einstein Field Equations. If one were to construct a metric in cartesian coordinates from the Minkowski metric, would it be reasonable to use a piecewise Stress-Energy Tensor to find our metric? (For example, having...
5. N

### Investigating Limit of Piecewise Function

Use the graph to investigate (a) lim of f(x) as x→2 from the left side. (b) lim of f(x) as x→2 from the right side. (c) lim of f(x) as x→2. Question 20 For part (a), as I travel along on the x-axis coming from the left, the graph reaches a height of 4. The limit is 4. It does not matter...
6. N

### Investigate Limit of Piecewise Function

My apologies. I posted the correct problem with the wrong set of instructions. It it a typo at my end. Here is the correct set of instructions for 28: Use the graph to investigate limit of f(x) as x→c. If the limit does not exist, explain why. For (a), the limit is 1. For (b), the limit DOES...

22. ### Find A and B so that F(x) is a Differentiable Function

Homework Statement Find the values of a and b that make f a differentiable function. Note: F(x) is a piecewise function f(x): Ax^2 - Bx, X ≤ 1 Alnx + B, X > 1 Homework EquationsThe Attempt at a Solution Made the two equations equal each other. Ax^2 - Bx = Alnx + B Inserting x=1 gives, A - B =...
23. ### A Taylor/Maclaurin series for piecewise defined function

Consider the function: $$F(s) =\begin{cases} A \exp(-as) &\text{ if }0\le s\le s_c \text{ and}\\ B \exp(-bs) &\text{ if } s>s_c \end{cases}$$ The parameter s_c is chosen such that the function is continuous on [0,Inf). I'm trying to come up with a (unique, not piecewise) Maclaurin series...
24. ### The period, angular frequency of a piecewise function

Homework Statement The function ##f## is defined as follows: \begin{equation*} f(t) = \begin{cases} 1, \text{ when } 2k < t < (2k+1),\\ 0, \text{ when } t = k,\\ 2, \text{ when } (2k-1) < t < 2k, & k \in \mathbb{Z}\\ \end{cases} \end{equation*} What is the period ##T## of the function ##f##...
25. ### A Fourier Transform of a piecewise function

Here is the Problem Statement : Find Fourier Transform of the piecewise function Can someone sheds some lights on how to start solving this? Thanks
26. ### Calculate limit of piecewise function

Homework Statement a.) Let ##f,g:ℝ→ℝ## such that ##g(x)=sin x## and ##f(x)= \left\{ \begin{array}{ll} x^2, x∈ℚ \\ 0 , x∈ℝ\setminusℚ \\ \end{array} \right. ##. Calculate ##\lim_{x \rightarrow 0} \frac{f(x)}{g(x)}##. b.) Why l'Hospital rule cannot be applied here?The Attempt at a...
27. ### Absolute function into piecewise function

Homework Statement Write F(x)= x2-5|x| as a piecewise function Homework EquationsThe Attempt at a Solution I was writting it out and came to Fx= x2-5(x) and x2-5(-x) but my book says that it comes out to be x2-5 x2-5(-x) I imagine there is a very simple reason why the x in the first one...
28. ### Convolution Calculation (piecewise function)

Homework Statement Compute the convolution ##(f*h)(t)## where $$f(t) = \left\{\begin{matrix}1, \ \ for \ \ |t|<1 \\ 0, \ \ \ \ otherwise \end{matrix}\right.$$ and $$h(t) = \left\{\begin{matrix}2|t|-1, \ \ for \ \ |t|<1/2 \\ 0, \ \ \ \ otherwise \end{matrix}\right.$$ Homework Equations...
29. ### -66 over -99 into a graph?

Okay, so I'm down to the last equation. -12/11 x 10 + 54/11 I get -66/-99. Is this right? If so how do I put it into the graph. -12/11 x 10 = -120/110 + 54/11 = -66/99 (I think I've went wrong somewhere)
30. ### Mathematica FindMaximum function in Mathematica

I recently plotted a piecewise function: Plot[Piecewise[{{1 - Exp[-.002*t], 0 <= t < 120}, {-Exp[-.002*t] + Exp[-.002*(t - 120)], 120 <= t}}], {t, 0, 5000}, PlotRange -> {0, 0.25}] I then defined the function which I am calling q[t_] as follows: q[t_] := Piecewise[{{1 -...

35. ### Multivariate piecewise fxn continuity and partial derivative

1. Problem Define a function: for t>=0, f(x,t) = { x for 0 <= x <= sqrt(t), -x + 2sqrt(t) for sqrt(t) <= x <= 2sqrt(t), 0 elsewhere} for t<0 f(x,t) = - f(x,|t|) Show that f is continuous in R^2. Show that f_t (x, 0) = 0 for all x. Then define g(t) = integral[f(x,t)dx] from -1 to 1. Show...
36. ### Piecewise linear programming

Dear Friends I have a question about linear programming. It would be great to have your comments or suggestions. Consider the followings \\ Y = [y_{1}, y_{2}, \cdots, y_{n}] \\ G = [g_{1}, g_{2}, \cdots, g_{n}] \\ \textbf{X} = \begin{pmatrix} 0 & x_{1,2} & \cdots & x_{1,n}...
37. ### Filling in piecewise function from given graph

Homework Statement Homework Equations The Attempt at a SolutionNot sure what to do here. I was thinking maybe the y – y1 = m(x – x1)? I am having trouble understanding this question. I know what piecewise functions are but filling this in is proving difficult.
38. ### Making a piecewise function continuous everywhere

Homework Statement Given the piecewise function f(x) = \left\{ \begin{array}{lr} \frac{(2-x)^2-p}{x} &: x < q\\ r(x+6) &: q \leq x <2 \\ x^3-p &: x \geq 2 \end{array} \right. Find the values of p,q,r such that f(x) is continuous everywhere and f(2) = p The Attempt at a Solution Since f(2)...
39. ### MHB Continuity of piecewise function of two variables

The question looks like this. Let $f(x, y)$ = 0 if $y\leq 0$ or $y\geq x^4$, and $f(x, y)$ = 1 if $0 < y < x^4$. (a) Show that $f$ is discontinuous at (0, 0) (b) Show that $f$ is discontinuous on two entire curves. In regarding (a), I know $f(x, y)$ is discontinuous on certain...
40. ### Continuity of piecewise function of two variables

The question looks like this. Let ##f(x, y)## = 0 if y\leq 0 or y\geq x^4, and f(x, y) = 1 if 0 < y < x^4 . (a) show that f(x, y) \rightarrow 0 as (x, y) \rightarrow (0, 0) along any path through (0, 0) of the form y = mx^a with a < 4. (b) Despite part (a), show that f is discontinuous at (0...

48. ### Composite function of a piecewise function

Homework Statement Given that I have a doubling function : f(x)=2x (for 0≤x<0.5) and 2x-1 (for 0.5≤ x<1) Homework Equations What is f(f(x))? The Attempt at a Solution f(f(x))=4x for the first one and 4x-3 for the second part but not sure what to do about the domain...
49. ### MHB Help finding the local min in a piecewise function

f(x) = { { 16 - x^2, if -4 <= x <= 0 { 2x - 3, if 0 <= x <= 4 I did the first derivative test and got zero but i don't think that's right. Any help?
50. ### Continuity and differentiability of a piecewise function

Homework Statement Discuss the continuity and differentiability of f(x) = \begin{cases} x^2 & \text{if } x\in \mathbb{Q} \\ x^4 & \text{if } x\in \mathbb{R}\setminus \mathbb{Q} \end{cases} Homework Equations The Attempt at a Solution From the graph of ##f##, I can see...