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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Solving a system of equations

VipulAcharya
1-Newbie

Solving a system of equations

Hi:

I am completely new to MathCad and have a system of 6 equations that I need to solve. I have 6 variables and up to 12 "constants" that will change depending on my specific application. For example:

Variables are R1 to R6

"Constants" are various letters symbols.

How do I reduce the equations so that the 6 variables are solved in terms of the "constants"

I want to then take these expressions (variables in terms of constants) and put them in my spreadsheet for future use. Then I can change the constants in my spreadsheet and get the variable.

Can anyone help me?

Thanks.

29 REPLIES 29

It sounds like you are looking for a symbolic solution rather than a numeric one. Depending on the complexity of the equations there may be no such solution though, and even if there is it may be so large as to be effectively useless. Could you post a worksheet showing the 6 equations.

Yes - I would like a symbolic solution.

I haven't even started entering them yet - I have them written on paper, but many of the symbols I want to use have subscript nomenclature such as

"Delta 1p", "Delta 2p", "Delta 3p.....Delta 6p" These are all upper case Deltas. They are all a function of P, L and L1 - L6. Nothing too complex, just multiplication, division, addition and exponents. Then I have,

"Delta 11", "Delta 21", "Delta 31.....Delta 61" these are lower case deltas. The are a function of R1, and all the Ls. same level of complexity. Then I have

"Delta 12", "Delta 22", "Delta 32.....Delta 62" lower case deltas, etc.... all the way to delta 66

So I have 36 small deltas and 6 big deltas. Then I have 7 Ls ( L, L1, L2, ...L6)

I have 6 equations:

delta11 + delta 21 + delta31...+delta61 = 0

delta 12 + delta 22 + ....+delta 62 = 0

etc

delta16 + delta26 + ....+ delta66 = 0

Then I want solve for R1 - R6 all interms of P and the 7 Ls.

I started entering the equations into the worksheet and it thinks the subscript p is a variable instead of a nomenclature thing.

I hope you can be patient with me

Thank you for your help.

Nothing too complex, just multiplication, division, addition and exponents. Then I have,

That doesn't mean they will not be too complex. The exponents in particular could be a problem.

I started entering the equations into the worksheet and it thinks the subscript p is a variable instead of a nomenclature thing.

There are two types of subecript in Mathcad: a vector subscript, which you get with "[", and a literal subscript, which you get with ".". A vector subscript is an index into an array, and must therefore be a number or a variable. A literal subscript is just part of the variable name. You are obviously using vector subscripts, whereas you should be using literal subscripts.

Thanks for that explanation. I will start entering my equations and see where I get. I will post for you (if you don't mind) in the next day or so.

Thanks again.

Hi Richard:

I have attached the basics of my problem. Can you help me with how I go about solving?

Thanks

I just saw that there was a small equation on the left that is not relevent.

Here is my worksheet - not sure what to do next

In your first equation you want to set x equal to L1 to L6, but there is already an L in the equation. Is this a diffferent L?

Yes - sorry, it is a different L. I guess there is L1 to L7 in that case.

Sorry, I misspoke. It is a different L, but stays constant. x is still only from L1 to L6.

Thanks.

In equation 1 is P supposed to be R1 through R6?

In Equation 1, P stays as P (another changeable "constant").

I appreciate your help..

In Equation 1, P stays as P (another changeable "constant").

Good thing, because otherwise your solution is the trivial one of all zeros

As it happens, you are in luck. It's solvable, and the expressions don't even look that ugly. You should look at what I have done carefully though, to make sure all the deltas are what you think they should be.

You should probably also feed some numbers into the resulting equations to make sure they are correct (i.e. do evaluate to zero). It's never a good idea to blindly trust the symbolic processor. It has a few bugs and sometimes gets things wrong (not that often, but sometimes).

Thank you so much. I am actually at home right now (no MathCAD). So I won't be able to check it out until tomorrow, but thanks again. I really appreciate it.

Hi Richard:

thanks for helping me on this. I am not the best at matrices. I wanted to verify a few things if that is ok. In your / my first equation, it says that you assume P is supposed to be R1 to R6. But it is just P as we clarified. I think you just left the note there, but wanted to be sure.

Also, I think that the second equation for the small delta has all the "i" and "j" reversed. I changed it around but now it says that the answer is too large to display

I was hoping you could check the attached make sure I didn't mess up your equations and tell me how to display the answer.

Also, not sure about your background, if you discerned or care what the math is about, but I thought I would explain anyway.

It is a system of equations for solving a statically indeterminate structure. It is a cantilever beam with a point load on it. There are 6 supports along the length of the beam that don't allow the beam to move at that point. The P is force on the beam and R are reaction forces at each of the supports. The deltas are deflections. The force displacement method of solving for all the support forces is that you replace the support with an unknown force at each point. You only apply one of the 7 forces at a time (actual force + 6 unkown support reactions). You then compute the deflection at each of the 6 support points for each load configuration (the actual force + 6 support forces). delta 11 is the deflection of the beam at support point 1 due to a load at point 1. delta 12 is the deflection at point 1 due to a load at point 2, etc. Assuming linear elastic behaviour, and beacause the support points do not actually move, you solve for all the deflections at a point = 0. This will give you the support forces.

Anyway, thanks again for all your help and I know you don't have do any of this, but do really appreciate it.

Vipul Acharya wrote:

thanks for helping me on this. I am not the best at matrices. I wanted to verify a few things if that is ok. In your / my first equation, it says that you assume P is supposed to be R1 to R6. But it is just P as we clarified. I think you just left the note there, but wanted to be sure.

Yes, sorry. I forgot to delete that.

Also, I think that the second equation for the small delta has all the "i" and "j" reversed. I changed it around but now it says that the answer is too large to display

Good catch! You are correct. I was in a bit of a hurry, and should have looked at the matrix I built more carefully.

I was hoping you could check the attached make sure I didn't mess up your equations and tell me how to display the answer.

The attached worksheet shows you how to split the solutions out one at a time. They are still too large to display though, and I can't figure out how to simplify them enough. That's not good news, because it means the solutions are probably so complex it is not going to be practical to type them into a spreadsheet even if you could see them.

I also tried this in Mathcad 13, which can display much larger results (don't ask me the logic of reducing the allowed size when they went to 14, because I have no idea). Mathcad 13 has a different symbolic engine though (Maple, rather than MuPad), and it can't even solve the equations.

Also, not sure about your background, if you discerned or care what the math is about, but I thought I would explain anyway.

Physics, so I didn't guess what the equatons represented, but I do understand your explanation.

Hi Richard:

I reduced it to i/j = 1 to 4 instead of 1 to 6 and it displays. This should cover what I need, I was thinking 6 as being "more than enough". I assume I change the solution from 11 to 14 to display each result separately. This seems to be the way to go.

Thanks again, it is very much appreciated.

Hi Again:

I was thinking that if there is no way to display with the 6 forces unknown, I would take getting 5 or 4 over not getting anything....I mean that we reduce it to a system of 5 equations and 5 unknowns, etc.

Thanks again.

I was thinking that if there is no way to display with the 6 forces unknown, I would take getting 5 or 4 over not getting anything....I mean that we reduce it to a system of 5 equations and 5 unknowns, etc.

You may want to try that. If you get it to display for 4 or 5 unknowns please post the worksheet. I'm curious to see just how ugly the solutions look

Here is the worksheet with the first solution. It shouldn't be that bad as long as I don't go over the character limit in the Excel cell. I guess it will take 10 minutes per solution to enter and check to make sure i didn't make any typos.

Thanks again.

as I don't go over the character limit in the Excel cell.

That is 32767 characters, so I doubt it!

check to make sure i didn't make any typos.

Evaluate them numerically in Mathcad for some example numbers, then do the same in Excel

How do I evaluate them numerically in MathCad?

Like so

RichardJ
19-Tanzanite
(To:RichardJ)

A better version

I didn't see a difference - perhaps it was the wrong file?

perhaps it was the wrong file?

Oops

I still don't see where I can input values and solve numerically..? I must be doing something wrong...

Never mind...now I was looking at the wrong file

Thanks again for everything.

I added solutions for the other 3 so you can see them all at the same time. Looks like the R1 is the worst...

Announcements

Top Tags