It could help if you clean up the confusion with your variables/parameters/constants Q, m and k and then repost your sheet. Obviously the meaning of these three is not the same throughout your sheet. At the top you set specific values for Q and calculate k and m. If these three assignment should be meant to just show a relationship you should have used the boolean equal sign. The way you did it, k is assigned sqrt(2)/2 and m gets the value sqrt(2). This has no effect as long as k is calculated locally in your program and as long as m is a function parameter.
But when you differentiate uk(lamda,m) m is replaced by sqrt(2) (and not sqrt(2)-1 as you thought).
Its not clear to me what your function uk should be dependent of (other than lamda). It is too confusion as you define a function uk several times but while you don't change the name of the function the parameters have a different meaning every time. Using am extern variable Q in you second definition of uk(lamda,m) is possible, but not preferrable. And then I thought k should be 1/m?
You're right. I removed m=1/k and the symbolic differentiation returned the right expression. The program reads m=sqrt2 which comes from m=1/k. Therefore this has solved the problem. Thanks.
Would you please, when you have spare time, give me some explanation regarding questions 1,2 and 4?
I've reduced the file down to the last definitions of the functions (attached).
First , the easy one.
To the problem of not displaying the horizontal sections, you will need to apply some programming to calculate the value, then compare it against the condition you want to stop & return NaN (not a number) when the condition is met.
Graphing functions thrn ignore all the NaN points & the section is removed.
You will need to be careful that this does not cause new problems with your full mathcad sheet.
The differences between function uk(... & duk(...
1. the definition for m uses the boolean equals so it is not defined numerically.
2.
the definition for duk(lambda,m) sets m as a parameter so all of the uses of m in the function use the value given in the graph function call (1.5, 1.75 & 2) so the result is always defined by these values.
the definition for uk(lambda,m) is similar & m is defined to the same values as duk, but ... it also uses k which does have a relationship back to Q & so this function will vary with Q.