Derivative of piecewise function(split in 3 regions)

  • Thread starter Thread starter marellasunny
  • Start date Start date
  • Tags Tags
    Derivative
AI Thread Summary
The discussion focuses on calculating the derivative of a piecewise function using a specific formula for absolute values. The original formula proposed for the derivative was deemed incorrect, prompting a reevaluation. The function is analyzed in three regions: for y < -1, the derivative is zero; for -1 ≤ y < 1, the derivative equals 2; and for y ≥ 1, the derivative returns to zero. The final conclusion is that the function is not differentiable at the points -1 and 1. The calculations confirm the correctness of the derivative across the specified intervals.
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:
Mathematics 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 1 person
Thread 'Video on imaginary numbers and some queries'
Hi, I was watching the following video. I found some points confusing. Could you please help me to understand the gaps? Thanks, in advance! Question 1: Around 4:22, the video says the following. So for those mathematicians, negative numbers didn't exist. You could subtract, that is find the difference between two positive quantities, but you couldn't have a negative answer or negative coefficients. Mathematicians were so averse to negative numbers that there was no single quadratic...
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Thread 'Unit Circle Double Angle Derivations'
Here I made a terrible mistake of assuming this to be an equilateral triangle and set 2sinx=1 => x=pi/6. Although this did derive the double angle formulas it also led into a terrible mess trying to find all the combinations of sides. I must have been tired and just assumed 6x=180 and 2sinx=1. By that time, I was so mindset that I nearly scolded a person for even saying 90-x. I wonder if this is a case of biased observation that seeks to dis credit me like Jesus of Nazareth since in reality...
Back
Top