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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

About an example concerning PDE written in the help of MATHCAD 15 : unexplainable error.

-MFra-
21-Topaz II

About an example concerning PDE written in the help of MATHCAD 15 : unexplainable error.

Why [cases (3) and (4)] disabling the Pdesolve operator in the first example,  will fault the second example as well? If, instead, [cases (1) and (2)], the first one is active, then all is ok?

mathcad help examples.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
Werner_E
24-Ruby V
(To:hfeith)

seems you discovered another "nice feature", or is this really wanted ? I don't know.

While I was playing with your file I found out that this is not

only restricted to "pdesolve", but also to "odesolve" and" Find",

maybe to other equation solvers as well (haven't tried yet).

Sure! As already written above, is a solve block opened with "Given" and closed with "Pdesolve" or something else (Find, OdeSolve, Minimize, MinErr,,)

If you want to disable a solve block, you have to disable both, not just the closing command! If you delete parentheses in an expression you would also get an error if you would just delete the closing one.

After the second solve block fails (because od the duplicate "Given") the next solve block will work OK. Thats the reason your "workaround" works OK.

View solution in original post

5 REPLIES 5
Werner_E
24-Ruby V
(To:-MFra-)

Funny that the error message tells you the opposite from whats the cause:

Actually  you don't miss a "Given" - on contrary - if you disable the closing "Pdesolve" line of a solve block, you would also have to disable the corresponding opening "Given". Otherwise you end up with a giant solve block with probably conflicting equations, constraints and conditions and a second "Given" in the middle, which Mathcad chokes on.

This can't happen with the ugly solve blocks in Prime but of course they have other limitations.

BTW - you don't use any symbolical evaluations, so the expressions u:=u, etc. will have no effect at all! There is no way to clear variables (other than for the symbolics) in Mathcad 15 and below.

Hi F.M.,

seems you discovered another "nice feature", or is this really wanted ? I don't know.

While I was playing with your file I found out that this is not

only restricted to "pdesolve", but also to "odesolve" and" Find",

maybe to other equation solvers as well (haven't tried yet).

You can overcome this, if you copy the second solve block and paste it

just below, so that you would have actually three solve blocks :

The disabled one, and the other two that are enabled.  The third block will work then.

Of course,this is not an acceptable workaround.

If you would  also disable the second solve block the third will generate an error message, too,

so that you would have to copy the second solve block below the third.

This would lead to four blocks a. s. o.

This seems to be independent on either you try to solve for different equations,

or if you try to solve for the same equation.

As already said before, I have no idea, if this is wanted or not,

Regards

hfeith

Werner_E
24-Ruby V
(To:hfeith)

seems you discovered another "nice feature", or is this really wanted ? I don't know.

While I was playing with your file I found out that this is not

only restricted to "pdesolve", but also to "odesolve" and" Find",

maybe to other equation solvers as well (haven't tried yet).

Sure! As already written above, is a solve block opened with "Given" and closed with "Pdesolve" or something else (Find, OdeSolve, Minimize, MinErr,,)

If you want to disable a solve block, you have to disable both, not just the closing command! If you delete parentheses in an expression you would also get an error if you would just delete the closing one.

After the second solve block fails (because od the duplicate "Given") the next solve block will work OK. Thats the reason your "workaround" works OK.

I think this not quite correct. The error occurs for the same solving function, but not for different ones, e. g.

Given                                             Given

Minimize  -> disabled                      Minimize  -> disabled

Given                                             Given

Maximize -> works                          Minimize -> doesn't work

Don't ask me why, but this is what I observed.

Werner_E
24-Ruby V
(To:hfeith)

I would have to see the (hopefully streamlined) worksheet for further comments.

"minimize" and "maximize" are maybe not good examples because they also work standalone, without a block (= without "given").

Nevertheless I sure can imagine that you are right and the behavior is as erratic and capricious as the wrong error message 😉

But disabling the opening "Given" AND the closing statement should work OK in all cases.

Top Tags