Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   Re: Algorithm to solve equation for variable (http://www.velocityreviews.com/forums/t123784-re-algorithm-to-solve-equation-for-variable.html)

David Zimmerman 06-27-2003 08:37 PM

Re: Algorithm to solve equation for variable
 


Dan wrote:
> I am looking for an algorithm to solve an equation for any particular
> variable. For example, if I have the equation y = w * h + l (actually
> I have y = w h * l + because I'm using postfix notation), I need an
> algorithm that can solve the equation for any of w, h, l.
>
> I only support the four basic operators in my equations ( + - * / )
> and do not support functions. The way I store the equation is in a
> container; each item in the container is either a variable name or an
> Integer representing the operation, where + is 2, - is 3, * is 4 and /
> is 5.


If you have this equation
0 = x*x*x*x*x + b*x*x*x*x + c*x*x*x + d*x*x + e*x + f
and are asked to solve for x, there is no analytic solution. Equations
of order 5 or higher have no general solution. I believe that what your
asking to do is *very* difficult in general. Mathematica is big,
expensive piece of software that does some of this (and a lot of other
things).



All times are GMT. The time now is 10:07 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57