[24.Oct.2022] Solve equations with Mathcad

In PTC Mathcad Prime, you can solve linear, non-linear, and differential systems of equations.

PTC Mathcad has a few methods that we can use:

- The lsolve function.
- The Solve Block construct.
- Solving symbolically.

lsolve

To solve linear systems of equations, we work with a built-in solving function, **lsolve**, to quickly find the solution.

The Solve Block

To solve both linear and non-linear systems of equations, we use the Solve Block feature, which is an extremely powerful and flexible construct.

The Solve Block can be found in the Math tab, and it contains three different sections:

- Guess Values: in this section, you initialise the variables that you want to solve by using the Definition operator to assign a value. If you are unsure of what to use, use a value of 1.
- Constraints: This is the section where you write your system of equations . Note: for the equals sign you use the Comparison operator, not the Evaluation operator.
- Solver: Here you create a vector for the variables you want to solve. Then use the Definition operator to assign the Find function for the same variables.

Then outside of the Solve Block, evaluate the vector or individual variables to see the solutions.

The Solve Block is a special structure within Mathcad. In addition to solving systems of equations, it can be used to perform optimisations – finding the minimum or maximum for a function and differential equations.

In addition, it is a great feature to use in reporting, as the reader can easily follow the calculation flow and is presented with a full picture of the calculations.

Another example:

The non-linear system of equations is represented on a graph in the below example, where we can see the intersection points.

In the example we have inserted a solve block from the Math tab, and we type in the initial values, along with the constraints, which are limits for what we want to calculate.

Once you understand the solve block structure, you will feel confident in applying solve blocks engineering design problems, when solving for instance a minimum pipe diameter to produce a given flow.

Symbolic Solving

Sometimes when we have an equation or a system of equations, instead of solving them numerically, we want to solve symbolically. We can do this using the Symbolic Evaluation operator and the solve keyword. After selecting the solve keyword, type in a comma followed by the variables that you want to solve symbolically:

By familiarising yourself with these tools, you can apply them to a variety of engineering and mathematical problems. We especially recommend learning how to use Solve Blocks, as this will prove useful in many situations.

Source: PTC Mathcad, https://www.youtube.com/watch?v=q83jgGn38SA

If you’d like to learn more about this and other topics, please sign up for coaching.

If you don’t have access to Mathcad Prime 8, you can get a free 30 day trial here: https://alfasoft.science/en/shop/mathematics/mathcad-prime-8-trial/