Equation solving
Hi All!
I''ve got a problem solving this equation -
u^2 - exp(u) = u
I know the solution is ''-2 W(-1/2)'' where
W(x) = rootof(y exp(y) = x,y)
But I need the process of the solution.
Anybody can help me?
NOTE: It''s not a homework!
----------
Dave
--------Dave[ Math Studio ] A Computer Algebra System
This has homework written all over it... If, as you say, this isn''t homework, what are you using it for?
Death of one is a tragedy, death of a million is just a statistic.
Death of one is a tragedy, death of a million is just a statistic.
If at first you don't succeed, redefine success.
If it''s not homework,
Use the Newton Raphson iteration to solv the equation:
x^2 - e^x - x = 0
(The solution is about -0.44413022882396659058546632949098)...
Use the Newton Raphson iteration to solv the equation:
x^2 - e^x - x = 0
(The solution is about -0.44413022882396659058546632949098)...
You got timeouts on the site too then...
Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
I don''t uderstand why nobody trust me it''s not a homework,
but never mind!
I''m writing symbolic equation solver and if I can''t
solve it by hand I probably won''t solve it by my
algorithm.
So anyone can help me with process of this equation?
but never mind!
I''m writing symbolic equation solver and if I can''t
solve it by hand I probably won''t solve it by my
algorithm.
So anyone can help me with process of this equation?
--------Dave[ Math Studio ] A Computer Algebra System
quote:
Original post by Dave007
I don''t uderstand why nobody trust me it''s not a homework,
but never mind!
Dave,
Understand that it is all too easy to merely type the words "this is not homework" even if the problem really is homework. You, Dave007, may be an honorable individual, but there are MANY people on these boards who would lie in a heartbeat to avoid punishment by the great moderator,

Bottom line, the phrase "this is not homework" is insufficient. If you raise a question that appears to be a homework question, I will assume it is homework and close the thread unless you provide a reasonable description of how it is related to your game development problem or otherwise suitable for discussion. The forum FAQ see link below describes my policy on homework in more detail.
Forum FAQ
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
Ok, I had to put in full expanation and ''this is ...'' phrase is very poor. I apogize :-).
So I ask again - is there anybody who can help me?
Thanks in advance
So I ask again - is there anybody who can help me?
Thanks in advance
--------Dave[ Math Studio ] A Computer Algebra System
As I wrote in my reply,
To solve the equation x2 - ex = x
you need to find an x so that x2 - ex - x = 0.
If you don't know the Newtone Raphson method,
search about it in google... (sosmath.com has an excelent explenation about it in the calculus section).
Anyhow, all you have to do is to define:
f(x) = x2 - ex - x
Drive it...
f'(x)=2x - ex - 1
Select a number which you think is close to the solution (or just pick a random one if you have no idead what the solution is), and use the formula:
xn+1 = xn-f(xn)/f'(xn)
where x1 is the number you've choose to begin with...
Do it until xn+1-xn is very close to zero (since exponent is an irrational number, the solution is irrational... trying the get xn+1-xn=0 will take you forever
)
Hope that does it for you...
EDIT: Wow... these 'sub' and 'sup' HTML tags are realy cool...
[edited by - z9u2K on July 3, 2002 5:46:02 PM]
To solve the equation x2 - ex = x
you need to find an x so that x2 - ex - x = 0.
If you don't know the Newtone Raphson method,
search about it in google... (sosmath.com has an excelent explenation about it in the calculus section).
Anyhow, all you have to do is to define:
f(x) = x2 - ex - x
Drive it...
f'(x)=2x - ex - 1
Select a number which you think is close to the solution (or just pick a random one if you have no idead what the solution is), and use the formula:
xn+1 = xn-f(xn)/f'(xn)
where x1 is the number you've choose to begin with...
Do it until xn+1-xn is very close to zero (since exponent is an irrational number, the solution is irrational... trying the get xn+1-xn=0 will take you forever

Hope that does it for you...
EDIT: Wow... these 'sub' and 'sup' HTML tags are realy cool...
[edited by - z9u2K on July 3, 2002 5:46:02 PM]
z9u2K, I know how to solve an equation numerically.
I need to find SYMBOLIC solution of the equation,
because I''m working on a symbolic (analytical) equation solver.
And I need to solve this equation by hand before
I implement it to my algorithm.
The only thing I know is that to solve
equation like x2-ex=0
or xx=10 I must use Lambert''s W
function which is defined as inverse of x exp(x).
I need to know the progress of equation manipulations
that leeds to the ANALYTICAL solution.
I need to find SYMBOLIC solution of the equation,
because I''m working on a symbolic (analytical) equation solver.
And I need to solve this equation by hand before
I implement it to my algorithm.
The only thing I know is that to solve
equation like x2-ex=0
or xx=10 I must use Lambert''s W
function which is defined as inverse of x exp(x).
I need to know the progress of equation manipulations
that leeds to the ANALYTICAL solution.
--------Dave[ Math Studio ] A Computer Algebra System
There a bunch of prior work in the area of symbolic mathematics, and as with most things in this world a web search using google can help-----if you''re able to filter the good and useful from the bad an irrelevant.
I did a search for you and found this site, which looks like it may be useful. You''ll find several commercial and university level projects. The university projects may have available documentation on the algorithms, and may also provide free source code. There''s lots of source code available for many of the projects described on this page:
stommel.tamu.edu/~baum/graphics-math.html
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
I did a search for you and found this site, which looks like it may be useful. You''ll find several commercial and university level projects. The university projects may have available documentation on the algorithms, and may also provide free source code. There''s lots of source code available for many of the projects described on this page:
stommel.tamu.edu/~baum/graphics-math.html
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement