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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Symbolic Derivative Problem

Anousheh
10-Marble

Symbolic Derivative Problem

Hello,

Please see the attached worksheet.

I need the actual derivative of vf(lambda,alpha) function. MathCad says it is too long to be shown.

Is there any way to overcome this issue?

Thank you so much.

Anousheh

ACCEPTED SOLUTION

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

Anousheh Rouzbehani schrieb:

Hello,

Please see the attached worksheet.

I need the actual derivative of vf(lambda,alpha) function. MathCad says it is too long to be shown.

Where? I couldn't find that problem in you worksheet. Obviously I'm missing the point. Always better to post a stripped down worksheets which just shows the error or, as in your case, the undesired behaviour.

As you have defined Alpha at the top I assume you are interested in the derivative wrt lamda. I move the range variable for lamda down a bit.

cohesive2.png

One way to look at an expression which Mathcad 15 says being to long is to convert the worksheet in Prime format and load it in Prime 2, if you have the possibility to do so. Prime would let you scroll - no, unfortunately not, but you are allowed to enlarge the expression region to the right.

View solution in original post

17 REPLIES 17
Werner_E
25-Diamond I
(To:Anousheh)

Anousheh Rouzbehani schrieb:

Hello,

Please see the attached worksheet.

I need the actual derivative of vf(lambda,alpha) function. MathCad says it is too long to be shown.

Where? I couldn't find that problem in you worksheet. Obviously I'm missing the point. Always better to post a stripped down worksheets which just shows the error or, as in your case, the undesired behaviour.

As you have defined Alpha at the top I assume you are interested in the derivative wrt lamda. I move the range variable for lamda down a bit.

cohesive2.png

One way to look at an expression which Mathcad 15 says being to long is to convert the worksheet in Prime format and load it in Prime 2, if you have the possibility to do so. Prime would let you scroll - no, unfortunately not, but you are allowed to enlarge the expression region to the right.

Hello Werner,

Thank you so much for your time and great help.

I do my best to follow your points.

Thanks again and regards,

Anousheh

Werner,

I was working on this at the same time. I was able to get the derivative when alpha = .5 as was assumed in the worksheet, but the evaluation doesn't complete in a long time when other values for alpha are used. The same happens with your suggestion for the modifiers. When alpa is treated as a variable without a value, then the long result occurs.

Anousheh showed plots with other values of alpha, so I assume there will be an interest in a more general result. Any ideas?

Harvey

I was already a bit confused why he had already marked the question as being answered, as I guessed that I could not have solved his problem.

I just tried it with generic alpha and yes, I had to stop calculation even at simplifying vf(). The nested functions didn't make following easyier, but I think the main problem seems to be the Gamma-function in N1(alpha) which is used in N(alpha,lamda) whch is used in vf().

Usually with those too long symbolic expression there is not much one can do, on the other hand - what will we do with them? We can use them in following calculations anyway and looking at expressions that long and complex is usually not really helpful.

So when Mathcad is not able to shorten the result its up to us to decide whether we could simplify the instruction, are happy with only part of the solution or can live with the fact that we can use, but no see the derivative. It all depends on what we intend to do with the result.

One last idea is - we could try to make the derivative a function of alpha, if its really the derivation with respect to lamda which is wished for. On the other hand, what would be the benefit, as we can use the too long expression as well?

I have now stripped down the worksheet to get a better overview, replaced the value which was taken from the solve block (y(10)) by the appropriate constant and if you look at vf(lamda,alpha) at the end I think there is not much which can be done without knowledge of the underlying problem. I don't dare to use simplify on that expression 😉

Hello Werner,

Thank you so much for your time.

Your Beta value is OK. But, remember that alpha is an index with the values of 0.5, 0.45 and 0.40

alpha=0.5 is a special case for a smooth crack. Derivative of vf(lambda,alpha) w. r. t. lambda is needed to produce graphs of vf derivative vs. lambda.

For publication purposes, I need to have the actual derivative function to be included in the paper.

Thanks again,

Anousheh

Werner_E
25-Diamond I
(To:Anousheh)

Your Beta value is OK. But, remember that alpha is an index with the values of 0.5, 0.45 and 0.40

There is nothing wrong with your solve block, I was just getting rid of all which could detract (me).

Didn't look that closely to the rest of your sheet and was just poking around with arbitrary values of alpha.

For publication purposes, I need to have the actual derivative function to be included in the paper.

No problem with specific values of alpha, but with generic alpha - no way with Mathcad, I guess. And even if it would be possible (maybe with Prime) it wouldn't fit in your paper with a readable font size I think.

Thank you Werner,

Good point. I have to think to see what other option I have for the paper.

So, if I am not mistaking, the derivative I can see on the worksheet is for one specific value of alpha, i.e. 0.5

correct?

Then, to produce the curves, I can input other values for alpha, right?

Thank you,

Anousheh

Werner_E
25-Diamond I
(To:Anousheh)

So, if I am not mistaking, the derivative I can see on the worksheet is for one specific value of alpha, i.e. 0.5

correct?

Yes, we are speaking of the first (only slightly altered) sheet I posted. Its all for the value assigned at the top of the sheet.

Then, to produce the curves, I can input other values for alpha, right?

At the top, yes. I think the way you did it in the graphs is wrong (I made the same mistake in the second (simplified) worksheet I posted. There is no failure as long as you let x=10, but you get wrong results if you decide to change x. If you do not intend to do so, I wonder why you use y(x) and not simply 1.

Your function vf() depends upon y(x), y is derived from a solve block which is using the fixed value of alpha assigned at the top of the sheet. y(x) is used in ß(), which is used in N1(), which is used in N() which is used in vf(). You didn't make it easy for us, didn't you? 🙂

So no matter what the second parameter of nf() is, y(x) will be the value which could (if x is not 10) be dependable of alpha. To overcome this you would have to turn the solve block in a function.

See attached sheet. In developing it it came to my mind that you cannot use numerically derived "functions" (like your y(x)) in symbolics - at least they do not evaluate.

Hi, Thank you Werner.

A few more question. If you don't mind please:

1- What is the different between "simplify" with and without "max"?

2- What is the little black rectangle at the top right corner of some blocks? Is it for not to display the results?

3- At the bottom of the worksheet, I see green border around the first graph (which I suppose means that it is working), but nothing happens. I have good processor and sufficient ram in my computer, so I don't know why it takes so long to settle down. (Still nothing happening!)

4- What do you mean by saying:

Werner Exinger wrote:

To overcome this you would have to turn the solve block in a function.

How do you like my technique of inserting quotes?!

Thank you for your time and help.

Anousheh

Werner_E
25-Diamond I
(To:Anousheh)

1- What is the different between "simplify" with and without "max"?

with ",max" Mathcad tries a bit harder and sometimes comes up with an expression a little bit neater (also it sometimes needs alot more time with no added benefit). So just give it a try.

2- What is the little black rectangle at the top right corner of some blocks? Is it for not to display the results?

This means the evaluation of this region is disabled (right click - context menu). Those regeions are treated by Mathcad as if non existent. I've done this with your definition of alpha at the top to show, that this is now obsolete and with the second derivation (with alpha=0.45) as I didn't thought it would yield a nice and useable result with those unevaluated y(4/10,0.45) expressions. You may enable it as soon as you have changed that y(x) to a 1.

3- At the bottom of the worksheet, I see green border around the first graph (which I suppose means that it is working), but nothing happens. I have good processor and sufficient ram in my computer, so I don't know why it takes so long to settle down. (Still nothing happening!)

Yes, it means that Mathcad is busy evaluating that region. You may interrupt evaluation process by pressing "Esc". On loading Mathcad does not evaluate the whole sheet but only to the portion which is visible on the screen. So only if you scroll down Mathcad continues to evaluate. I guess that the evaluation of vf() is taking much much more time now as y(alpha,0.45) is reavaluating the whole solve block every time vf() is called. So it will finish after a (long) while. But in every case you should consider to change the calls to y() unless you really need y(x) for other values of x.

4- What do you mean by saying:

Werner Exinger wrote:

To overcome this you would have to turn the solve block in a function.

That was exactly the reason for posting that worksheet. I deleted (set inactive) the definition of alpha and made alpha a parameter of the function y. Look at the end of the solveblock, I have changed your y to an y(alpha) and so you have to call y with two parameters. This seemed necessary if you intended to change the value of x from 10 (where y yields 1 regardless of alpha) to another value (which then would be different for different alphas). Later I realized that using the function y in dependance of alpha in a symbolic evaluation (your wanted derivatives) is not that good an idea.

How do you like my technique of inserting quotes?!

Not sure what you mean?

Find attached a changed worksheet. The difference is that x is fixed to 10 and y to 1 in the definition of Beta. So the whole solve block would be obsolete

Hello Werner,

Thanks again for all your time and help.

I appreciate all these great information. I learned a lot.

"How do you like my technique of inserting quotes?!"

I just mentioned this, because again, I learned it from you.

Thanks a lot,

Anousheh

Werner_E
25-Diamond I
(To:Anousheh)

Thanks again for all your time and help.

I appreciate all these great information. I learned a lot.

"How do you like my technique of inserting quotes?!"

I just mentioned this, because again, I learned it from you.

You're welcome.

I just thought you found a better way for quoting which I hadn't spotted.

Hello again Warner,

Could you please tell me how you insert partial quotes from previous message into your text area?

Thank you

Werner_E
25-Diamond I
(To:Anousheh)

Anousheh Rouzbehani schrieb:

Hello again Warner,

Could you please tell me how you insert partial quotes from previous message into your text area?

Thank you

I insert the full quote two or three times so I can write inbetween and delete the lines not needed.

There has to be a better way of doing but I wasn't able to find it.

Thanks.

Anousheh

Hello Harvey,

Thank you for following up this issue. I could manage to get the desired results with the simplified version.

I shall ask for your help when I face some challenging problems.

This is a Fracture Mechanics problem on which I am working at the moment.

Thanks again,

Anousheh

Announcements

Top Tags