|
-
Jun 24th, 2001, 06:24 AM
#1
Thread Starter
Registered User
try to solve this simple problem:
Hi,
Try to solve this 2 equations system:
I. X² + Y = 10
II. X + Y² = 4
Good Luck.
-
Jun 24th, 2001, 06:34 AM
#2
Monday Morning Lunatic
I got y = +/- 1.648 putting it through Excel's Solver
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Jun 24th, 2001, 08:36 AM
#3
Frenzied Member
I got 3 . something....don't have my calculator with me.....probably wrong but I tried
-
Jun 24th, 2001, 08:38 AM
#4
Hyperactive Member
Well...
...the problem arises when you substitute one eqn into the other - you get a polynomial of order 4.
This could be solved if it was in the form Y^4+Y^2+c=0 with the quadratic eqn for y^2, but no, these eqns also give a single Y term in the polynomial.
So that leaves iterative methods, graphical solution, trial and error or use of computer.
There are 10 types of people in the world - those that understand binary, and those that don't.
-
Jun 24th, 2001, 08:47 AM
#5
Thread Starter
Registered User
That is the whole problem.
I have a Y^4 , Y^2, and a single Y.
How to solve this?
-
Jun 24th, 2001, 08:49 AM
#6
Monday Morning Lunatic
Newton-Raphson should work for this - I couldn't be bothered to do it so I used Solver instead.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Jun 24th, 2001, 08:58 AM
#7
Hyperactive Member
Followup...
Guys, we have a formula to solve cubics and polynomials order 4. However, it often gives imaginery results.
Iteration is the best bet here.
There are 10 types of people in the world - those that understand binary, and those that don't.
-
Jun 24th, 2001, 02:19 PM
#8
Thread Starter
Registered User
What's Iteration?
Can you give me a simple example of implementing this ?
-
Jun 24th, 2001, 02:21 PM
#9
Monday Morning Lunatic
Do a search for Newton Raphson equation solving on Google.
Iteration basically involves passing the output of a function back to the input again. The function gradually increases the accuracy, until you get to a specific difference between the input and output, at which point you stop.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Jun 24th, 2001, 02:34 PM
#10
Thread Starter
Registered User
Originally posted by parksie
Iteration basically involves passing the output of a function back to the input again. The function gradually increases the accuracy, until you get to a specific difference between the input and output, at which point you stop.
You mean recursive function until I get the accuracy level I want?
-
Jun 24th, 2001, 03:50 PM
#11
Hyperactive Member
Iteration...
...iteration is the best. The easiest type is basic iteration. Newton Raphson is better but takes more work.
Take this (really easy) example. Find where x=x^2. Now, the key to iteration is that sometimes the results diverge and sometimes they converge. You need to rearrange the eqn so it converges on a result. Experience tells us square root both sides to get sqrt(x)=x.
Now put x as any number - take 5. Then perform the function repeatedly:
x=sqrt(5)
x=sqrt(sqrt(5))
etc until the result converges on 1!
Now, this could be used with your polynomial. A word of advice: indexes less than one generally converge. You can illustrate which functions diverge or converge nicely with a diagram/graph which i forget.
Let me know how you find iteration. And since this is a VB forum, Newton Raphson is much less computer intensive but requires differentiation.
There are 10 types of people in the world - those that understand binary, and those that don't.
-
Jun 24th, 2001, 06:30 PM
#12
Frenzied Member
Full solution.
Substituting y = 10 - x^2 into the other equation and rearranging a bit, results in the following.
X^4 - 20*x^2 + x +96 = 0, which is the correct form for using Newton-Raphson (?spelling).
Newton-R starts with a guess and results in a better guess. If you start with a reasonable guess and keep it up, you find a solution. For some functions, there are no solutions and the method loops forever or gets into other trouble. For some functions with solutions, a bad initial guess can also result in looping forever or other problems.
The method works as follows.
Given Function( x ) = 0
Next = Last - Function( Last ) / Derivative( Last )
For the above,
Function( x ) = x^4 - 20*x^2 + x + 96
Derivative( x ) = 4*x^3 - 40*x + 1
If I have not made a typo, the following are the four solutions. Newton-R will also find complex solutions, provided you iterate using complex arithmetic.
-3.57092 874075
-2.72165 120064
+3.00000 000000
+3.29257 994140
To give an idea of how the iteration works, starting with a first guess of two.
2.00000 00000 00000
2.72340 42553 19149
2.92221 98923 45288
2.98789 85715 83022
2.99958 22642 72998
2.99999 94621 74258
2.99999 99999 99105
2.99999 99999 99999
3.00000 00000 00000
Once it gets close, the precision tends to double with each iteration. With a bad initial guess, it can take quite a few iterations to get close to a root, and if the guess is really bad, you might never converge. High order polynomials and various complicated functions some times take quite a few iterations to get close, but once you get 2-4 decimal digits of precision, they usually converge pretty fast.
You do not have to know much calculus to apply Newton-R. There are handbooks which give you cookbook recipe-like rules for finding derivatives. The handbook with at most a five minute explanation can provide you with enough information to use Newton-R, and you might not even need the five minute explanation.
Live long & prosper.
The Dinosaur from prehistoric era prior to computers.
Eschew obfuscation!
If a billion people believe a foolish idea, it is still a foolish idea!
VB.net 2010 Express
64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.
-
Jun 24th, 2001, 06:33 PM
#13
Monday Morning Lunatic
Once again Guv shames us all 
Yep, Newton-Raphson is right (just checked my maths workbook)
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Jun 25th, 2001, 06:21 AM
#14
Thread Starter
Registered User
Thank you very much, Guv.
That really helped.
I think I'll post some more nice math things soon.
I am currently reading the G-R-E-A-T math book called:
"Fermat's Last Theorem" - By Simon Singh.
Recommended!
-
Jun 25th, 2001, 06:34 AM
#15
Banned
Lior
This link might spoil your reading, but if you want to see...
http://www.vbforums.com/showthread.p...threadid=67713
And I'm talking of that very same book.
-
Jun 25th, 2001, 01:40 PM
#16
Thread Starter
Registered User
Well, thanks for the link.
I saw you said you didnt like the end of the book.
Well..., I cant say anything about that yet, because I haven't finished reading it all yet. I have just started reading it today, and found it pretty addictive (at least the first part of it). That's why I've finished reading more than 160 pages out of total 380 pages, in one day. I hope I'll finish reading it tommorow or in two days, and then I'll have my opinion about its end.
Anyway, its first 160 pages are great, for anyone who likes math.
You'll find there info about Archimedes, Cauclides, Pitagoras, Geuss, and of course Fermat.
-
Jun 26th, 2001, 07:27 AM
#17
Thread Starter
Registered User
I finished reading the book a couple of minutes ago.
And I pretty liked its end.
Especially the 1st April joke, and the situation when he thought to give up.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|