use excell to find root of function

B

Bernie Deitrick

Excel doesn't have a function that can identify all the roots of a cubic
equation. You can use Solver to find one root of the equation, by using the
formula

=A1^3+2*A1-1.125

and by having Solver vary cell A1.

X = 0.5 is the one root that you will find.

HTH,
Bernie
MS Excel MVP

"(e-mail address removed)"
 
D

Dana DeLouis

Another option is to use Iteration. This Macro will set it up for you in
Cells A1:C1. Due to the nature of your equation, your "Guess" has to be
fairly close. The menu item is under:
Tools | Options | Calculation -> check on "Iteration"

Sub Demo()

With Application
.Iteration = True
.MaxIterations = 200
.MaxChange = 1 * 10 ^ -16
End With

[A1] = 1.4 'Guess
[B1].Formula = "=A1^3+2*A1-1.125"
[C1].Formula = "=AVERAGE(A1,A1-B1)"

'// For iteration, change A1 to a reference
[A1].Formula = "=C1"
[A1].NumberFormat = "0.00000000000000"
End Sub

= = = =

If you set A2 to the value of 2.0, and A3 to the value of -1.125, then you
could set a cell named "z" to the following...

z = SQRT(12*A2^3+81*A3^2)-9*A3

then..
=(2^(1/3)*z^(2/3)-2*3^(1/3)*A2)/(6^(2/3)*z^(1/3))

to return 0.5

You can change the 2 & -1.125 a little to get other values assuming A1^3
stays the same
--
Dana DeLouis
Win XP & Office 2003


"(e-mail address removed)"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top