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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Solving for a variable in MathCAD

Deepakjohsh
12-Amethyst

Solving for a variable in MathCAD

Hi, 

 

I am looking to solve for F2 in the below image, Can anyone help on how to get this working in MathCad please? 

Deepakjohsh_0-1708354235075.png

 

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:Deepakjohsh)


@Deepakjohsh wrote:

Hi, 

 

I am looking to solve for F2 in the below image, Can anyone help on how to get this working in MathCad please? 

 


Sure! Attach your worksheet and if you are not using Mathcad but rather Prime you should also state which version you are using.

You seem to have five equations and five unknowns.

Have not checked if the equations are independent, but if they are you may either use a solve block with "find" or put the five equations in a 5x1 matrix and use the symbolic "solve" command.

 

EDIT: Just noticed that you have SIX unknowns but only FIVE equations! So you can expect an infinite number of possible solutions!!
Maybe you'd like to recheck!

Here an approach done with Mathcad and a numeric solve block. Different guess values may yield different results, though.

Werner_E_0-1708382195393.png

 

 

View solution in original post

6 REPLIES 6
Werner_E
25-Diamond I
(To:Deepakjohsh)


@Deepakjohsh wrote:

Hi, 

 

I am looking to solve for F2 in the below image, Can anyone help on how to get this working in MathCad please? 

 


Sure! Attach your worksheet and if you are not using Mathcad but rather Prime you should also state which version you are using.

You seem to have five equations and five unknowns.

Have not checked if the equations are independent, but if they are you may either use a solve block with "find" or put the five equations in a 5x1 matrix and use the symbolic "solve" command.

 

EDIT: Just noticed that you have SIX unknowns but only FIVE equations! So you can expect an infinite number of possible solutions!!
Maybe you'd like to recheck!

Here an approach done with Mathcad and a numeric solve block. Different guess values may yield different results, though.

Werner_E_0-1708382195393.png

 

 

Thanks a ton Werner! I have understood what went wrong in my approach.

Below is the screenshot of the mistake I had done.

Deepakjohsh_0-1708403392389.png

 

Werner_E
25-Diamond I
(To:Deepakjohsh)

Yes, you have to use "Find" to solve for all of the unknowns, even though you might not be interested in them.

And you have to use the boolean equal for all the equations, not the assignment equal (:=).

But there still are too few equations (just five) for all the unknowns (six).

You can calculate Z in front of the solve block as it depends on known variables only. That way you still have four equations for five unknowns in the solve block.

Finally you may be able to let Prime find a formula for F2 which only uses the known variables plus one of the unknowns, maybe A2. So you would get a different value for F2 for different values of A2...

Thanks a ton again Werner. I tried replicating exactly the way you had solved this problem earlier.
but i get a different error message.

Could you  please throw some light on this please?

Deepakjohsh_1-1708410796636.png

 

Also, wrt the Variables, i had just missed out the value for A2.
it is a known value. sorry about that.

 

Werner_E
25-Diamond I
(To:Deepakjohsh)

If A2 is known you should define it in front of the solve block (like a, b etc.) and you should not solve for A2 (remove it from the result vector and in the find command.

 

The message you get is not an error but rather a warning because this statement overwrites the guess values for the variables (which is exactly what you want). You can manage (and turn off) those warnings ("calculation" ribbon, "Warnings").

You should get a result anyway if you evaluate F2 below the solve block.

For further question attach your worksheet and state the version it is created by.

Thanks a lot for your help Werner. Appreciate it a lot.

Announcements

Top Tags