-
1 Attachment(s)
Solving Equations
Would someone mind giving me a hand in solving some equations?
I have three equations and three unknowns. The unknowns are x2,x3 &x4.
I've attached the equations in MSWord.
Even the first equation...how would I rearrange that to be able to substitute it into the others?
-
Re: Solving Equations
You have to isolate one of the variables in the expression to be able to substitute it in another.
For example, the first equation.
First get rid of the fractions. Multiply both sides with (x2 + x3).
Then multiply out all the brackets on the right.
You should get something like:
x2 = x4*x2/(...) - x5*x4/(...) + (..)/(..)
You can then get every term that has an x2 in it to the left again, you end up with something like:
x2 - x4*x2/(...) + x5*x2/(...) = (known vars)/(other known vars)
Finally you can factor out x2:
x2 * [1 - x4/(...) + x5/(...)] = ...
And then divide by everything between the [ ] brackets:
x2 = (...) / [1 - x4/(...) + x5/(...)]
You have now isolated x2 and can substitute it in the other equations.
It's quite a messy equation but if you keep doing it without making mistakes you will get it.
-
Re: Solving Equations
Ripper. Thankyou. I've got X2 now. Then last two are going to be painful.
-
Re: Solving Equations
Is this some homework problem or something? Or is it something you genuinely need solved for some practical purpose?
Just so you know, there are lots of math programs out there who solve things like this in a second...
If it's just some howework problem or something however just solve them yourself, it's a very good algebra excercise.
-
Re: Solving Equations
It's for an application I'm trying to create. If you've got a suggestion of an application I can use or if you can help me out I'd be grateful. What I posted there is about page 4 of the calculations so I don't even know if what I have is correct.
It's getting VERY messy with those last two formulas. It's a one off thing so I don't want to pay for software if I don't have to.
-
Re: Solving Equations
There are tons of programs which (probably) all have free trial versions available:
Matlab
Maple
Mathcad
Maybe even excel? Don't know about that...
-
Re: Solving Equations
What you have is a set of simultaneous non-linear equations. If all you are looking for is a quick and dirty numerical solution (as opposed to an algebraic one), then I'd try the "Didactic Optimization Tool for EXCEL" at this site:
http://digilander.libero.it/foxes/SoftwareDownload.htm
Just scroll down the page until you see it. It's an EXCEL add-in that's free. I use it frequently. Since you have only a few variables, it should work. Try the Downhill Simplex method if you have a reasonable estimate of the solution, or the random method with a wide range of limits if you have no idea. You may have to play with things a while.
Or, if you really want to have some fun, solve the problem w/ Excel using Netwon's Method by calculating the partial derivatives of each function with respect the the unknowns (i.e. forming the Jacobian) and iteratively solve with the built-in linear solver. The following link describes the technique:
http://www.physicsforums.com/showthread.php?t=95580
P.S. How's the post tensioned cable business?
-
Re: Solving Equations
I don't think Matlab would be able to solve these symbolically. As far as I know it works entirely in concrete numbers. Mathematica, however, would be very happy to solve these, and there most definitely is a trial version with a short period available.
-
1 Attachment(s)
Re: Solving Equations
I do need to solve the equations algebraically. I've got a vb application in which I need the formulaes.
I'm still stuck. X2 and X4 in the attached two equations are still unknown. I'm now sure that these two equations are correct.
Would Mathematica really be able to take these two equations, combine them and reorder everything to find a simplified answers to the unknows? If someone's got time can they feed these two through it to get a result in terms of X2 and X4?
-
Re: Solving Equations
Just a little help here, the whole right-hand-side of the first equation can be simplified as:
- [ (-x3 + x4) * x3^2 * (x5 - x4) ] / [ (x5-x3)^2 ]
-
1 Attachment(s)
Re: Solving Equations
Damn.
Nick, I forgot to replace X2 on the left hands side which is why there's too many variables to solve it.
If you or anyone's still interested in trying to solve it attached are the equations.
Nick. Thanks very much for that. I'll see if I can work out how you've simplified it that far.
X3 and X4 are the only unknowns so basically I need two equations as equating these values. Spent hours on it but it is solvable.
Sadly above me.
-
Re: Solving Equations
I just edited that last post.
-
Re: Solving Equations
If you can tell me what ' RoC(y1-y3) ' stands for I might be able to let maple solve it.
-
Re: Solving Equations
Well I tried to use Maple to solve the equations (the ones in your very first post), regarding the RoC things as constants, but what I got was complete garbage...
If printed out the result is probably like 5 pages long... I can't make anything out of it...
Maybe your best bet is to try to solve it numerically with some approximations. You'll have to give us some numbers for that though...
Also I'm not sure how to do that...
-
Re: Solving Equations
I too tried entering those into Mathematica, and it solved the equations assuming RoC(y1-y3)=RoC(y3-y5)=R for some constant R; those assumptions are probably not true but I don't know what else RoC could mean besides radius of convergence, and even then I'd need context.
Regardless, like Nick said the result was pages and pages long full of nested radicals and awful exponentials. Yes, technically you could code the formula it gives, but your application is insanely complicated if you really can't find any way around that. Unless the true nature of RoC simplifies things greatly, I would start looking into numerical methods for solving this instead of solving it exactly. Iterative numerical methods, assuming you find one that converges for your purposes, would give you arbitrarily high accuracy (more than a computer can reasonably store if you like) and be simpler in the end. You also wouldn't need to change much if your underlying equations turn out to be slightly different than you think right now.
If you want I'll post the output, but only as a series of screenshots since anything else is too error-prone.
-
1 Attachment(s)
Re: Solving Equations
I must have made a mistake somewhere along the way. After about 8 hours of fiddling with the equation and simplifying and checking previous equations I've taken out one more variable.
Down to the last one and it's just getting harder. Would someone mind having a look at this one?
I need to solve it in terms of X4.
RoC is a single variable. It's the radius of curvature. Good guess Jemidiah.
-
Re: Solving Equations
If programs like Maple and Mathematica come up with a 5 page solution, I doubt you are going to find a correct solution by hand.
Although Maple could be wrong, (I have learned not to trust those programs all the way every time), it is more probable that you made a slight mistake somewhere.
As we said, your best bet might be to solve it numerically. If you have any good guesses for what x2, x3 and x4 could be (for example between 1 and 3 or something like that) than I am sure you can solve it numerically. (I have no idea how though).
If the assignment is to solve it algebraically then I don't know why Maple comes up with 5 pages worth of complicated formulas, I don't see anyone doing that by hand...
-
Re: Solving Equations
I've just put that formula into excel with known test values and ran a goal seek. It didn't give me the right answer the first time until I guessed that there might be more than one solution.
When I put in a start value for x4 which was closer to what I expected it did goal seek to the expected answer.
I'm writing to the person who's done it before asking for a hint. I'll let you know if I get a response. He might want to keep it to himself though.
-
Re: Solving Equations
Thanks all for your help. Get back to you soon!
-
Re: Solving Equations
Appears that the person who has done it doesn't want to give out any secrets. I've realised that I am able to iterate a solution from the equation and I can only guess he has done the same. The itteration completes in about 7 passes of the 12 equations to the accuracy I need so it's unnoticable.
Thanks again everyone for your help.