Derivative of piecewise function(split in 3 regions)

  • Thread starter marellasunny
  • Start date
  • Tags
    Derivative
In summary, the derivative of the given piecewise function is \alpha m_1 for y< -1 and y> 1, and \alpha m_1 - (m_0 - m_1) for -1 < y < 1. The function is not differentiable at y = -1 and y = 1. The proposed derivative by using the general formula is correct. Another way to look at it is to treat it as three separate pieces and find the derivatives of each piece.
  • #1
marellasunny
255
3
I use the general formula: if y=|f(x)| then y'=[itex]\frac{d|f(x)|}{dx}= \frac{f(x)*f'(x)}{|f(x)|}[/itex] to calculate the derivative of the piecewise function given below.

Given: Piecewise function
$$h(y)=\alpha(m_1 y+\frac{1}{2}(m_0 - m_1)(|y+1|-|y-1|))$$

My attempt at calculating the derivative:
$$\frac{\mathrm{d} h}{\mathrm{d} y}=\alpha m_1+\alpha 0.5(m_0-m_1)(\frac{y+1}{|y+1|}-\frac{y-1}{|y-1|})$$, is this right?
 
Last edited:
Mathematics news on Phys.org
  • #2
marellasunny said:
I use the general formula: if y=abs(f(x)) then y'= f(x)/|f(x)|

That general formula isn't correct.
 
  • #3
Stephen Tashi said:
That general formula isn't correct.
Is it correct now?I edited it.
 
  • #4
marellasunny said:
Is it correct now?I edited it.

Yes and I think you have the correct answer to the problem.
 
  • #5
Another way to look at this is to separate it unto three parts (that is, treat it as being "piecewise" as you say in your title. If y< -1, then both y+ 1 and y- 1 are negative so |y+1|- |y- 1|= -(y+1)-(-(y- 1)= -y- 1+ y- 1= -2. That is a constant so its derivative is 0. If [itex]-1\le y< 1[/itex], then y+1 is positve but y- 1 is still negative. |y+ 1|- |y- 1|= y+ 1- (-(y-1))= y+ 1+ y- 1= 2y. The derivative of that is 2. Finally, if [itex]y\ge 0[/itex], both y+ 1 and y- 1 are positive so |y+ 1|- |y- 1|= y+ 1- y+ 1= 2. Again the derivative of that is 0.

So the derivative of the original function is [itex]\alpha m_1[/itex] if y< -1, [itex]\alpha m_1- (m_0- m_1)[/itex] if -1< y< 1, and [itex]\alpha m_1[/itex] if y> 1. Of course, the function is not differentiable at -1 or 1.

Looking at your proposed derivative, if y< -1, so that both y-1 and y+ 1 are negative, the last part is "-1- (-1)" which is 0 while if y> 1, so that y-1 and y+ 1 are positive, it is "1- 1". If -1< y< 1, then it is "1- (-1)= 2" which cancels the "1/2" so, yes, that is the same thing.
 
  • Like
Likes 1 person

1. What is a piecewise function?

A piecewise function is a mathematical function that is defined by different equations for different parts of the input domain. This means that the function has different rules for different intervals of the input variable.

2. How do you find the derivative of a piecewise function?

To find the derivative of a piecewise function, you need to find the derivative of each piece of the function separately. Then, you can combine the derivatives using the rules of differentiation for piecewise functions.

3. What is the process for finding the derivative of a piecewise function with three regions?

The process for finding the derivative of a piecewise function with three regions is to first find the derivatives of each piece of the function separately. Then, you need to determine the interval in which the input variable falls and use the corresponding derivative for that interval. Finally, you can combine the derivatives using the rules of differentiation for piecewise functions.

4. How do you handle continuity when finding the derivative of a piecewise function?

When finding the derivative of a piecewise function, it is important to consider continuity. This means that the function should have a smooth transition between the different pieces. To ensure continuity, you may need to use the limit definition of the derivative and check for continuity at the points where the pieces of the function meet.

5. Are there any special cases to consider when finding the derivative of a piecewise function?

Yes, there are a few special cases to consider when finding the derivative of a piecewise function. These include points of discontinuity, points of intersection between the different pieces, and points where the function is not differentiable. It is important to carefully consider these cases when finding the derivative of a piecewise function.

Similar threads

  • General Math
Replies
5
Views
1K
Replies
3
Views
208
Replies
2
Views
239
Replies
21
Views
1K
Replies
17
Views
2K
Replies
0
Views
9K
Replies
1
Views
9K
Replies
5
Views
1K
  • Calculus and Beyond Homework Help
Replies
6
Views
848
Back
Top