Solving Systems of Equations through Mathcad Solve Blocks, part 2

Sometimes solve blocks cannot find a solution. Read on to see how to resolve some issues.

Errors and Problems with No Solutions

Sometimes there might be no solution, or Mathcad might not find a solution. In either case, Find displays the error message “No solution was found.”


A solve block with equations set

The problem asks for numbers u and v that add to both 2 and 3, which is impossible.

Find also returns an error message if there is a solution, but the solver cannot find it. One example is


Impossible constraints

The problem here is that the only solutions to the given equation are complex numbers. (Graph the two expressions above, and you’ll see the curves do not intersect.) The real guess value of z := 1 sets the solver off in the wrong direction. In this case, just as with the root function, trying a complex guess may help.


Another complex problem

Find also returns an error if there are any missing guess values.


Guessing a complex number lets Mathcad solve the problem.

Try solving again by adding a guess value for p.


Find also returns an error if any of the functions in the solve block is undefined at a guess value:The function is undefined at the guess value

To find the source of the error, click the region with the error and select Previous or First in the Error Tracing group from the Calculation tab.

The cursor lands on the Gamma function, telling you that this is where the error occurs. The Gamma function is undefined at the value x:= -3.


Changing the value of x solves the problem.

Complex Solutions

Solve blocks sometimes return complex solutions even when the guess values are real.


Try changing the guess values for this solve block from real to complex and to different values to see how the results change.

When solve blocks begin solving a problem, they evaluate the constraints at the guess values as a check to see if the problem is real or complex. If the values of the constraints are complex at the guesses, the solve block can produce complex solutions even if the guess values themselves are real.

In other cases, where the constraints are only complex over a portion of their domain, you might be surprised by a complex result. This can occur if the solver, in the course of calculating its iterations, wanders into a complex region of solutions as it refines the guesses into solutions. Check the constraints in the regions of the guess value if you get real answers when you expect complex ones, or vice versa.

A future article will discuss using built-in constants TOL and CTOL to help resolve solve block issues when the tolerance needs to be adjusted.

Visit the Mathcad Community website for the Mathcad Prime 1.0 and Mathcad 15 worksheets.

Why Not Try Our Latest Version, PTC Mathcad Prime 3.1? Download our Free for life version.