Derivative of piecewise function(split in 3 regions)

  • Context: Graduate 
  • Thread starter Thread starter marellasunny
  • Start date Start date
  • Tags Tags
    Derivative
Click For Summary

Discussion Overview

The discussion revolves around calculating the derivative of a piecewise function defined in three regions. Participants explore different approaches to derive the function's derivative and clarify the application of mathematical formulas related to absolute values.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant proposes using the formula for the derivative of the absolute value function, suggesting that the derivative of the piecewise function can be calculated using this approach.
  • Another participant challenges the correctness of the initial formula provided for the derivative of the absolute value function.
  • A subsequent reply indicates that the formula was edited but does not clarify whether it is now correct.
  • A different approach is suggested, breaking the function into three parts based on the value of y, leading to specific derivative values for each region: 0 for y < -1, 2 for -1 ≤ y < 1, and 0 for y ≥ 1.
  • The participant who proposed the piecewise approach notes that the original function is not differentiable at the points -1 and 1.
  • There is a comparison made between the proposed derivative and the results from the piecewise analysis, indicating some agreement on the outcomes but not on the methods used.

Areas of Agreement / Disagreement

Participants express disagreement regarding the correctness of the initial derivative formula. While some find the piecewise approach valid and consistent with their calculations, others remain uncertain about the initial claims and the edits made to the formula.

Contextual Notes

Participants highlight the need to consider the behavior of the function at the boundaries of the piecewise regions, particularly regarding differentiability at -1 and 1. There are also unresolved questions about the validity of the initial derivative formula and its application to the piecewise function.

marellasunny
Messages
245
Reaction score
3
I use the general formula: if y=|f(x)| then y'=\frac{d|f(x)|}{dx}= \frac{f(x)*f&#039;(x)}{|f(x)|} 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:
Physics news on Phys.org
marellasunny said:
I use the general formula: if y=abs(f(x)) then y'= f(x)/|f(x)|

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

Yes and I think you have the correct answer to the problem.
 
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 -1\le y&lt; 1, 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 y\ge 0, 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 \alpha m_1 if y< -1, \alpha m_1- (m_0- m_1) if -1< y< 1, and \alpha m_1 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   Reactions: 1 person

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 17 ·
Replies
17
Views
4K
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K