cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Symbolic Differentiation of Stepped Function - Signum and Dirac Delta Functions - Use of Results

jmebara
12-Amethyst

Symbolic Differentiation of Stepped Function - Signum and Dirac Delta Functions - Use of Results

Hi all,

 

I am trying to use Mathcad to symbolically carry out the 1st, 2nd and 3rd differentiation of a function with a stepped component. The first differential of the function yields plausible results. The first differential has the signum function. When I integrate the first differential result into my actual calculation sheet using the built in "sign" function instead of the signum function, I do get plausible results and the units are consistent.

Here is the function and the first differential:

jmebara_0-1676129528539.png

However, things start getting a bit complicated with the 2nd and 3rd order differentials. Here is the 2nd order differential:

jmebara_2-1676129690825.png

 

As you can see, the symbolical evaluation of the second differential leads to the signum function raised to the power 2 and now I get a new DELTA function. From the help, I understand this to be the Dirac Delta function. However, I am not sure how to integrate this DELTA function into my worksheet. I understand that I have to change the DELTA to small delta (Kronecker Delta) but then I need 2 arguments and I am not sure how to use the delta function. Also, the 2nd order differential seems to be giving me results which lead to inconsistent units. As I understand it, the signum function is supposed to give me the sign (+ or -) and the dirac delta function simply states if I get a 1 or a 0 at my evaluation point. So even if I figure out the 2 arguments I need for the delta function, the 2nd differential as a whole has inconsistent units.

For the first term in the bracket of the 2nd differential, Fp is force in N and lambda_l is a parameter with unit 1/m. My questions then are as follows:

 

1) How do I best compute symbolically the 1st, 2nd and 3rd order differentials ofthe shown function in order to get results which I can use in my actual worksheet?

2)How do I integrate the signum and DELTA functions into my worksheet? Is my understanding that I use small delta instead correct? Why do I get a differential result with inconsistent units?

3) Is Mathcad even handling the symbolic differential of the signum and DELTA functions correctly?

4) The 3rd differential is even more messy. 

jmebara_4-1676130585036.png

How do I get differentiation results that I can work with in my worksheet and which consistent units?

 

I will be very grateful for any quick help.

 

Thanks

 

 

 

 

 

 

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:jmebara)


How do I get differentiation results that I can work with in my worksheet and which consistent units?

That depends on what your work actually does consist of. Do you really need symbolic results?

BTW, Delta isn't a function but rather a distribution. And its not related to the Kronecker delta function which expects two integer arguments and yields 1 if the both are the same, otherwise 0.

Your first derivate has a step, an "infinite slope" and so the second derivative is undefined at this point (infinite value) and this is correctly expressed with the symbolic Delta distribution. Not sure what you expected.

Using the absolute value operator often is more cumbersome than using the Heaviside step function, so you may give that a try.

Werner_E_2-1676141829052.png

You may also consider splitting the function into parts so no absolute value would be needed to define each part and then deal with each part separately.

Here are some additional remarks/thoughts using a simple function as example:

Werner_E_1-1676141456181.png

 

View solution in original post

5 REPLIES 5

1. Can you send us the sheet?

2. Try pls plots

ValeryOchkov_0-1676141270962.png

 

Thanks very much for the quick reply. I appreciate it. I will try the proposal and get back to you

Werner_E
25-Diamond I
(To:jmebara)


How do I get differentiation results that I can work with in my worksheet and which consistent units?

That depends on what your work actually does consist of. Do you really need symbolic results?

BTW, Delta isn't a function but rather a distribution. And its not related to the Kronecker delta function which expects two integer arguments and yields 1 if the both are the same, otherwise 0.

Your first derivate has a step, an "infinite slope" and so the second derivative is undefined at this point (infinite value) and this is correctly expressed with the symbolic Delta distribution. Not sure what you expected.

Using the absolute value operator often is more cumbersome than using the Heaviside step function, so you may give that a try.

Werner_E_2-1676141829052.png

You may also consider splitting the function into parts so no absolute value would be needed to define each part and then deal with each part separately.

Here are some additional remarks/thoughts using a simple function as example:

Werner_E_1-1676141456181.png

 

LucMeekes
23-Emerald III
(To:jmebara)

The delta function is not the Kronecker delta.

The delta function is the derivative of the step function. That step function is:

LucMeekes_0-1676141757602.png

Which, for t < 0 is 0, and for t>0 is 1. For t=0, the value can be either 0, 1 or 1/2, depending on who/what you're working with. It's debatable.

So delta is  the derivative of it. You can imagine it as a pulse with infinite height, and infinitely small width.

Where the numeric processor of Prime does know the step function, it doesn't handle the delta function.

 

If you try to plot it:

LucMeekes_1-1676141947414.png

There are ways to approximate it, though.

 

Success!
Luc

jmebara
12-Amethyst
(To:LucMeekes)

Thanks very much for the clarification on the delta function. That was very helpful. 

Announcements

Top Tags