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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

4-Participant

## Solving a equation with units

Hi, I'm trying to figure out how to solve a equation with Mathcad, since it keeps displaying the message that no solution can be found.

In principle it is a cubic equation that needs to be solved, but I don't know why this happens when I input units instead of simple numbers.

FYI it is a weir design for a spillway.

1 ACCEPTED SOLUTION

Accepted Solutions
24-Ruby V
(To:Descalante815)

I guess you are using Prime 6

PTC introduced a new symbolic engine in this version which is a bit less capable than the old one.

In Prime 6 you still have the option to switch back to the old, legacy symbolic module (calc ribbon, calc options).

This makes your equation work, but due to round off errors the results are non-real values with very tiny imaginary parts. You may use  Sol := Re(Sol) to fix this.

The  symbolic does not know anything about units and treats them as unknown variables. Sometimes it helps if you add a modifier like "assume, m>0" to tell Prime that m is a positive real. It may also help to turn on variables and constants in the same menu where you can switch back to the old symbolics.

Generally its better to use numerical methods like a solve block when you are looking for numerical results. But a solve block would only yield one of the three solutions, depending in the guess value provided.

Prime 6 worksheet attached.

10 REPLIES 10
24-Ruby V
(To:Descalante815)

I guess you are using Prime 6

PTC introduced a new symbolic engine in this version which is a bit less capable than the old one.

In Prime 6 you still have the option to switch back to the old, legacy symbolic module (calc ribbon, calc options).

This makes your equation work, but due to round off errors the results are non-real values with very tiny imaginary parts. You may use  Sol := Re(Sol) to fix this.

The  symbolic does not know anything about units and treats them as unknown variables. Sometimes it helps if you add a modifier like "assume, m>0" to tell Prime that m is a positive real. It may also help to turn on variables and constants in the same menu where you can switch back to the old symbolics.

Generally its better to use numerical methods like a solve block when you are looking for numerical results. But a solve block would only yield one of the three solutions, depending in the guess value provided.

Prime 6 worksheet attached.

4-Participant
(To:Werner_E)

The Sol command worked, and it solved correctly the equation, however when I try to use it on my original worksheet I get the same problem. I'll run a Re-Install to see what is going on.

However I'll continue working on your file. Thanks a lot.

24-Ruby V
(To:Descalante815)

@Descalante815 wrote:

The Sol command worked, and it solved correctly the equation, however when I try to use it on my original worksheet I get the same problem. I'll run a Re-Install to see what is going on.

However I'll continue working on your file. Thanks a lot.

"Sol" isn't a command, its simply a variable name (I was thinking of "solution" when choosing it)

I guess that you forgot to switch over to the old symbolic engine.  Calculation ribbon ...

You will get a warning telling you that the old symbolic will not be available in future versions and you must recalculate the sheet (F5 or fF9) to see the effect!

You may also consider switching on "constants and variables in symbolic calculations" but as you can see in the screen shot this wasn't necessary for me in case of your equation.

If it still doesn't work I suspect a problem with Primes auto-labeling. It may help to retype the equation from scratch.

4-Participant
(To:Werner_E)

Yep... I did not activate the old symbolic engine before. I made it and now it works.

Vielen Dank, ich bin ganz neu in Mathcad, ich benutze es seit Mai, Juni...
Sowieso ich werde ein neues Dokument erstellen um zu prüfen das alles gut funktioniert.

23-Emerald I
(To:Descalante815)

In Express, without symbolics or a solve block:

24-Ruby IV
(To:Fred_Kohlhepp)

23-Emerald I
(To:ValeryOchkov)

That's not the right equation!  The equation is third order!

I'm not even sure why this did what it did.  Is there an x variable with a different label?

23-Emerald I
(To:Fred_Kohlhepp)

Got it!

The assigned equal ":=" should have been a boolean "=".

You assigned (:=) x to be the solution to the quadratic.  Mathcad supplied an assumed (=0) at the end.

24-Ruby V
(To:Fred_Kohlhepp)

Yes, Valery used the sheet provided by Descalante815 which did not show the correct equation

4-Participant
(To:Fred_Kohlhepp)

I don't know but at certain point I had the same problem. I guess it is some bug with the Prime 6 version.

Announcements
Top Tags