An error occurred when searching, please try again!

If I am programming some methods on finding roots of equations using excel and was wondering if there was a way to do it so I didnt have to write an equation out each time and reprogram all the cells.

What I mean is....

If I have the equation x^2 + 2x +1 = 0

Can I put x^2 + 2x +1 into a cell and as the value of x changes, let it do it automatically?

As in if I have x = 3 and I put 3 in cell A1

can I program another cell to = x^2 + 2x +1 where x = A1 or something along those lines so it will sub in whatever calue I put in A1 without me having to change the equation?

Cheers

James

Cheers

james

What I mean is....

If I have the equation x^2 + 2x +1 = 0

Can I put x^2 + 2x +1 into a cell and as the value of x changes, let it do it automatically?

As in if I have x = 3 and I put 3 in cell A1

can I program another cell to = x^2 + 2x +1 where x = A1 or something along those lines so it will sub in whatever calue I put in A1 without me having to change the equation?

Cheers

James

Cheers

james

Options

## All Comments

(10) Jump to unreadPost a commentjust put a value in cell A1

and put this formula in A2

=SUM(A1^2 + 2*A1 +1)

value in a1 of 5 calculated 36

seems ok

The x value will change alot, so I wanted sort of and absolute equation which will input different values.

What I am actually doing is interval bisection so it puts say, 3 through, then 4 through and checks if one is positive and one is negative. If so, it will then put 3.5 through and check is the sign (plus or minus) changes between 3 and 3.5 or 3.5 and 4. Whichever it is will then be divided again, eg check 3 and 3.25 and 3.25 and 3.5.

And if I change the initial 3 and 4, the rest will change too, so I would have to input loads for each time it checks if you catch my drift.

Also, if I change the equation at all I would love it to be able to put x through without having to change the formulas in each cell and only one if possible.

Reps for the help though. Thanks

The x value will change alot, so I wanted sort of and absolute equation which will input different values.

What I am actually doing is interval bisection so it puts say, 3 through, then 4 through and checks if one is positive and one is negative. If so, it will then put 3.5 through and check is the sign (plus or minus) changes between 3 and 3.5 or 3.5 and 4. Whichever it is will then be divided again, eg check 3 and 3.25 and 3.25 and 3.5.

And if I change the initial 3 and 4, the rest will change too, so I would have to input loads for each time it checks if you catch my drift.

Also, if I change the equation at all I would love it to be able to put x through without having to change the formulas in each cell and only one if possible.

Reps for the help though. Thanks

Is this useful? http://static.toodoc.com/download.php?s=YTo0OntzOjM6InVybCI7czo1ODoiaHR0cDovL3d3dy5jc3VzLmVkdS9pbmRpdi9uL25ndy9FRUUtMjQ0L25vdGUvQmlzZWN0aW9uLnhscyI7czo0OiJzaXplIjtzOjU6IjQ3MTA0IjtzOjQ6ImRhdGUiO3M6MTA6IjIwMDgvMDIvMTIiO3M6NToidGl0bGUiO3M6OToiQmlzZWN0aW9uIjt9 I can't tell as I don't have excel on my laptop.

You could use Excel's goal seeking to do that.

Put your equation in cell B1, but use A1 instead of X so you can enter a value in A1.

For the equation you are using, B1 will contain "

=A1^2+2*A1+1"Go to >Tools<>Goal Seek<

[INDENT]In "Set Cell" put B1

In "To Value" put 0

In "By Changing Cell" put A1

Click OK[/INDENT]

Excel will successively calculate and get as close to zero as it can (Probably .000 something).

Repeat as required for other calculations.

If you are just trying to solve quadratic equations, why not just use the old formula:

See http://library.thinkquest.org/20991/alg2/quad.html

or http://en.wikipedia.org/wiki/Quadratic_equation

Will let me check my own answers and was just interested really if I could program it, its easy to do but the way I have done it takes ages so just wondered if I could do it a better way. It will help me program my differential equation eolver better too along with Linear Interpolation and the Newton Raphson method as well.

Not sure what a place holder is so I will look it up. will look at the links given too thanks.

This is what I'm trying to achieve hopefully, although it wont be setup like this, just to give you all an idea...