Skip to main content
1-Visitor
April 9, 2014
Question

Symbolic solution as system of real equations

  • April 9, 2014
  • 2 replies
  • 3119 views

Hello,

I have a system of two equations with 2 unknown variables to solve symbolically. Numerically I get 9 solutions:7 real and 2 complex. I need equations only for those 7 real solutions. Always only one of them gives me answer in allowed range. I need solution as equations to find correct values of vairables in allowed range for chosen parameters (T,M). I tried to assign results of Find to a variable and matrix but none of it worked. I always get error that the variable is undefined. Can anyone help me, please?

2 replies

25-Diamond I
April 9, 2014

Do you really need a symbolic solution in T and M or would a function of T and M which gives you the x and y values be sufficent.

How would you get a numeric solution (as you wrote)? For which values of T and M? Can we assume T and M as reals? Can we assume anything else abou T and M?

Mathcads symbolics says the result is to big to display. So it finds a "solution", but in contrary to what Mathcad says we cannot use it for later calculations as we are not allowed to assign it a variable. This means that the solution consists of some case distinctions (ifs and otherwise statements) which may not really helpful anyway. If you have Prime you may try to convert the sheet, as Prime will show you the long expression, I think. But I guess it will not be any helpful at all.

BartB1-VisitorAuthor
1-Visitor
April 9, 2014

Werner Exinger wrote:

Do you really need a symbolic solution in T and M or would a function of T and M which gives you the x and y values be sufficent.

How would you get a numeric solution (as you wrote)?

If I can implement this function without mathcad it would be sufficient. I already wrote Matlab function that gives me correct values for given T and M but it only work there.

For which values of T and M? Can we assume T and M as reals? Can we assume anything else abou T and M?

T and M are real and form determined small range not bigger than 10 (for example 10-19)

This means that the solution consists of some case distinctions (ifs and otherwise statements) which may not really helpful anyway. If you have Prime you may try to convert the sheet, as Prime will show you the long expression, I think. But I guess it will not be any helpful at all.

Can somehow get a solution in that form? I have only Mathcad 15.0. I want to implement solutions in an embedded device to calculate x and y with determined T an M, so it might be acutally helpful.

19-Tanzanite
April 9, 2014

Attached is a worksheet that uses the symbolic solver to get all the (numerical) solutions (given values for T and M) and then selects the pairs of real solutions.

I've made up values of T and M that happen to give 7 real and 2 complex solutions, biut obviously, you will need to change these to the values you need.

Alan

BartB1-VisitorAuthor
1-Visitor
April 11, 2014

Thank you Alan and Werner for your effort. I hoped there would be a chance to get exact symbolic solution in MathCad. But having two much more experienced MathCad engeneers than me working on the problem and couldn't find a way to get those results I looked for another way and yesterday I came up with an idea to get an approximated equation.

As I said, I already had a Matlab function that generated numeric results and found a one pair x y that is in the specified range (for each combination of T and M always only one pair was correct). So I generated two matrices of x and y results for each T and M combination - a look up table as Waren suggested. But implementing it to the embedded device wouldn't work, as it would be always a discreate set of results (I'll have to aproximate if T or M would not be in it) and looking through it would be too time consuming (when table would have the resolution of possible T and M values it would be huge). So for each matrix [x T M] and [y T M] I fited a polominal that aproximates the results and in that way I got the symbolic equation for the set of the results that are from the allowed range. The error of this aproximation do not exceed 1% and for most cases its less than 0.3%, almost half is aproximately 0. Ithnk, for now I don't have a better way to get the equations I need with smaller error.