Skip to main content
8-Gravel
February 13, 2026
Question

Using the Symbolic solver

  • February 13, 2026
  • 3 replies
  • 199 views

I often struggle to get Mathcad Prime to return symbolic solutions. I suspect I’m missing something in the way I set up or call the symbolic engine, so if anyone can point me to a good tutorial or explanation of best practices, I’d really appreciate it.

I’ve attached a worksheet with the equations. My goal is to obtain a single expression for γ as a function of h, α, and β.

At the moment I either get red evaluation errors or no result from the solver.

Any guidance on what I should change in my setup would be very helpful.

Thanks,
David

3 replies

19-Tanzanite
February 13, 2026

Cornel_1-1770982514466.png

 

25-Diamond I
February 13, 2026
  1. If you want the symbolics to use the 'definitions' for x1,x2, etc.,  you have to use the definition operator (:=) and not the comparisons equal (=)
  2. alpha, h and gamma are also the names of predefined constants and so Prime's infamous auto-label 'feature' labels them as being "Constant' when you type them in. And the symbolics refuses to solve for a constant.
    Werner_E_0-1770986915435.png
    So you would have to manually label each occurrence of them (or at least gamma) as being a 'Variable'.
    Actually you could omit h and replace it by a constant 1 as it cancels in the equation you are trying to solve. The solution should only depend on the angles alpha and beta.
  3. Prime's symbolics still is not capable enough to find a solution ("no solution found") - even if we use the 'assume' modifier to limit 'h' to positive reals and the angles to the range from 0 to 90°, so sin, cos and tan all are sure positive.
    Werner_E_1-1770987107323.png

To avoid the red errors in the definitions (they stem from the numeric engine) you can use functions instead. 

Of course this does not change the symbolics inability to solve the equation.

Werner_E_2-1770987647328.png

I am not sure if this means that there simply exists no general solution valid for any input value or if Prime's symbolics is too weak to find it.

If you have access to a more capable symbolic engine like Mathematica or Maple you may give your equation a try with them. Or you may use the Mathematica engine on Wolfram Alpha's website.

 

8-Gravel
February 13, 2026

Thanks for the quick reply. I meanwhile noticed that I missed on the sign of y1 and the h can indeed be left out but that doesn't really change anything.
I was able to get a solution when using the solver block and inputs for alpha and beta, which proves that there is definitely a solution. However, when I change the guess value for gamma I get different results.
Checked with the 3D CAD model and for the example below the result should be 66.955°. Unfortunately I don't have access to another symbolics solver.

David_Rombaut_0-1770988755564.png

 

25-Diamond I
February 13, 2026

So only the sign in y1 was wrong?

 

There is an error in your solve block because the assignments you make there are always using the guess value of gamma and not the one you are trying to solve for!!

You may consider to parametrize the solve block so you can use it for any input values of alpha and beta.

Here is one possible way to get the correct answer:

Werner_E_0-1770991760854.png

 

In the meantime i also found a way to make the symbolic solve work. It seems to be choking on the square root.

So if we remove the square root on the right hand side and square the expression on the left hand side, Prime is willing to solve the equation and gives as two solutions for gamma.

I am not sure how to automatically decide for which input values we should use which of the two solutions. One of them seems to be always near zero.

Werner_E_1-1770992078114.png

If I chose always the first one, trap the "division by zero' error if tan(alpha)=0 and also copy with the tiny non-real values we sometimes get, we can create a 3D plot. But I fear that the areas where the function value is shown to be zero mainly stems from using the wrong of the two solutions?

Werner_E_2-1770992242228.png

I get more sensible(??) results using the solve block function, but it takes much more time to finish the calculations

Werner_E_3-1770992786645.png

 

If you are just looking for numeric results, I would strongly recommend to avoid using the symbolics but rather use a numeric method.

Either a solve block with "find", as you did, or the "root" function in one of its two flavours:

Werner_E_4-1770993142676.png

 

Prime 11 sheet attached

 

P.S.: According not having access to another symbolic solver - even if it may not be that comfortable, you always can try to use Wolfram Alpha in its (limited) free mode -> Wolfram|Alpha: Computational Intelligence

8-Gravel
February 13, 2026

Ok, I was able to derive the formula the old school way on a piece of paper. If anyone knows how to get Mathcad to do that for me in the future, please do share. I added the simplified and corrected input for reference.

David_Rombaut_0-1770993577045.png

David_Rombaut_2-1770993737693.png

 

25-Diamond I
February 13, 2026

You did not restrict the values where alpha and beta should be chosen from when you asked here.

Now it looks like you assumed both angles to be within 0 and 90° so that all trig functions are positive reals. That way you can use sqrt(x2)=x rather than sqrt(x2)=|x|, correct?

Unfortunately Prime isn't good in respecting the "assume" modifier and so it seems not to be capable enough to come up with a simpler solution.

You test data 25 deg/60 deg shows the correct result this time if you compare it with the three different ways to calculate it shown in my answer above.