Engineers-Excel.com

     
Engineering using Spreadsheets

Simulaneous Non Linear Equation Solver

Description























This is a template that allows the use of the Solver tool in Excel to solve a set of coupled non-linear equations.

Download

.xls file (18 KB)

This file contains the example described below.

How to use the tool

This template requires the Solver Add-in to work. To enable this Add-in, go to Tools -> Add-ins and check solver add-in. This will add "Solver..." under the Tools menu.

This use of this template is best illustrated by an example. Let us solver the following coupled simultaneous non-linear equations:

x = sin(y) and y = cos(x)

Initial guesses for the variables are entered under 'Variables' in column A and the equations are keyed into column B. The equations must be in the form f(variables) = 0, hence we key in the equations as:

x - sin(y) and y - cos(x)

The figure below shows the setup.

Setup

Now go to Tools, choose Solver and set it up to target cell C4 to 0 as shown in the figure below.

Solver

Solver will try to find a solution to the equations. In this case, it comes up with the following solution:

x = 0.6951 radians (39.8 degrees), y = 0.7684 radians (44.0 degrees)

Solved

How it works

This template works by using the solver tool to minimise the error between the equations and 0 in a least square sense. The target cell C4 is the total squared error, which the solver tries to set to 0.

Note that this tool comes up with only one solution even though there may be multiple solutions to the equations.

Note: It may not always be feasible to solve a given set of non-linear equations.