# What Is the Derivative of the Function $s \left( t \right) = \left( 1 - {e}^{\frac{-t}{RC}} \right) u \left( t \right)$?

What is the derivative of the following function

$$s \left( t \right) = \left( 1 - {e}^{\frac{-t}{RC}} \right) u \left( t \right)$$

with respect to $$t$$, where $$u(t)$$ is a unit step function?

I am getting $$\delta(t)+\frac{1}{RC}e^{-t/RC}u(t)$$ as the answer. Is my answer correct?

• I think you're missing this part : - delta(t)*e^(-T/RC) – Ben Apr 9 '18 at 19:13
• Maybe if you sketched the function first before putting pen to paper or fingers to keyboard, you would'nt get the wrong answer that you got. – Dilip Sarwate Apr 9 '18 at 21:30

What Laurent Duval and Dilip Sarwate are saying is that the function is not differentiable at zero because there is a sharp corner there. The function is continuous there, but the first, and higher derivatives are not.

Therefore you can dispense with the unit function and define the function separately on either side of zero and handle it that way.

For values less than (or equal to) zero the function is zero. For values greater than (or equal to) zero, the function is $1-e^{\frac{-t}{RC}}$. It is diffentiable in both these regions. The derivative for values less than zero is zero. The derivative for values greater than zero is $\frac{1}{R C} {e}^{\frac{-t}{RC}}$. The derivative is undefined at zero.

This is confirmed by taking the limit of the derivative at zero from the left (0) and the limit from the right ($\frac{1}{R C}$) and getting different answers.

Ced

• So for discontinuous functions, we should leave the point of discontinuity/not take into account the point of discontinuity and compute the derivative for parts of the curve that are continious. – Soumee Apr 10 '18 at 8:00
• @Soumee, Yes. Note, the OP's function is continuous, it is the derivative that is discontinuous at zero. A function is not differentiable where it is discontinuous. The approach you are suggesting is known as "piecewise differentiable". The math course where this is beaten like a dead horse is called Real Analysis. – Cedron Dawg Apr 10 '18 at 13:31

By the Product Rule (With abuse of the derivative of Unit Step):

\begin{align*} \frac{d}{dt} \left[ \left( 1 - {e}^{\frac{-t}{R C}} \right) u \left( t \right) \right] & = \frac{d}{dt} \left[ \left( 1 - {e}^{\frac{-t}{R C}} \right) \right] u \left( t \right) + \left( 1 - {e}^{\frac{-t}{R C}} \right) \frac{d}{dt} u \left( t \right) \\ & = \frac{1}{R C} {e}^{\frac{-t}{RC}} u \left( t \right) + \left( 1 - {e}^{\frac{-t}{R C}} \right) \delta \left( t \right) \end{align*}

By the properties of Dirac's Delta $f \left( t \right) \delta \left( t \right) = f \left( 0 \right) \delta \left( t \right)$ we get:

$$\frac{1}{R C} {e}^{\frac{-t}{RC}} u \left( t \right) + \left( 1 - {e}^{\frac{-t}{R C}} \right) \delta \left( t \right) = \frac{1}{R C} {e}^{\frac{-t}{RC}} u \left( t \right) + 0 \delta \left( t \right) = \frac{1}{R C} {e}^{\frac{-t}{RC}} u \left( t \right)$$

Remark
The above is with some abuse of Math (Derivative of Unit Step as Delta Function, Zero multiplied by Delta is zero, etc...) which is used (Again, it is abuse but usually gets to the right place).
If I remember correctly, even this intuitive abuse is used in Desor.

• For the sake of theory, let us not forget that the product rule often requires differentiable functions – Laurent Duval Apr 9 '18 at 20:10
• This is the kind of mindless answer that results from heedless application of poorly understood rules. Indeed, the end result could be still be salvaged by application of yet another rule: that $g(t)\delta(t) = g(0)\delta(t)$ if $g$ is continuous at $0$, and noting that $g(0) = 0$ in this case, but that's a matter for a different comment. – Dilip Sarwate Apr 9 '18 at 21:36
• The product rule is applicable to the product of an ordinary function and a distribution. Furthermore, in a distributional sense the derivative of the unit step is a Dirac delta impulse. So this answer is correct, even though it might not sufficiently explain why it is correct. – Matt L. Apr 11 '18 at 7:09
• @MattL., I totally agree. I didn't want to go into Derivatives of Distributions, etc... I assumed this is a question of Undergraduate Student and hence, at those level of courses, usually this abuse of Math is used. – Royi Apr 11 '18 at 7:37