# Homework Help: Solving set of non-linear equations with two unknowns in MATLAB

1. Jul 20, 2012

### bilalcisco

Hi,
I have two non-linear equations with two unknowns, i.e., tau and p. both equations are:
p=1-(1-tau).^(n-1)
and
tau - 2*(1-2*p) ./ ( (1-2*p)*(W+1)+(p*W).*(1-(2*p).^m)).

I am interested to find the value of tau.
After doing some research on internet I came to know that these equations can be solved by finding roots and finding fixed points. However, the problem is not that straight as it involves two non-linear equations, as opposed to various examples I found on internet which involves only one non-linear equation.
Additionally, I have matlab code for solving this problem, but still spending few days to understand and searching internet relentlessly, I couldn't understand how this solution actually works. Below I am giving that matlab code and need your helping hand to explain it to me the actual logic behind solving 'set of non-linear equations.

Matlab M-file is:

function result=tau_eq(tau)

n=6;
W=32;
m=5;

p=1-(1-tau).^(n-1);
result=tau - 2*(1-2*p) ./ ( (1-2*p)*(W+1)+(p*W).*(1-(2*p).^m));

Command at the command window:
result=fzero(@tau_eq,[0,1],[])
output is:
result =

0.0448

The given result is satisfactory, however I do not understand the logic behind it. Any explanation or referring to useful resources will be highly appreciated.