View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Dana DeLouis Dana DeLouis is offline
external usenet poster
 
Posts: 947
Default how to solve equations in excel that involve iterations?

Hi. Just some thoughts.
With multiple square roots, it brings to mind multiple solutions. Also,
note that it ae, or a<b, then you will be working with Complex numbers.
(Sqrt of negative numbers). Does this constraint hold? b<a<e? If C is the
opposite sign of D, you will have a sqrt of a negative number as well.
One additional method could be the Newton Equation. Goal Seek works great,
but can be limited in its accuracy. However, you can loop a few more times
in your own function.
This isn't fancy, and it doesn't have much error checking. Here's a simple
example using Mike's numbers...

Sub TestIt()
Debug.Print Fx(2, 3, 4, 5)
End Sub

Function Fx(b, c, d, e)
Dim K1
Dim K2
Dim a
Dim Num
Dim Den
Dim Last

K1 = b / 2
K2 = Sqr(c / d)
Last = 0
a = (b + e) / 2 'Middle
Do While Last < a
Last = a
Num = a + K1 - ((K2 * (e - a) ^ (3 / 2)) / Sqr(a - b))

Den = ((Sqr(e - a) * (2 * a - 3 * b + e) * K2) / _
(a - b) ^ (3 / 2) + 2) / 2

a = a - Num / Den
Debug.Print a

If a e Then a = e
If a < b Then a = b + 0.00001
Loop
End Function

Returns a = 2.68510380165928
which checks...

--
HTH :)
Dana DeLouis
Windows XP & Office 2003


"san2000" wrote in message
...
The equation has one unknown, but appear on both sides of the equation:

A+B/2 = SQRT(C/D) * [(E - A)^(3/2)] / [(A - B)^(1/2)]

THe only unknown that need to be solved is A. B, C, D, and E are known
variables. How to solve?