# [R] roots for two variables.

Berend Hasselman bhh at xs4all.nl
Wed Nov 27 08:11:42 CET 2013

```On 27-11-2013, at 05:16, Binod Manandhar <gibinod at yahoo.com> wrote:

> I was trying to find root for two non-linear equations.  My equation is similar as follows:
>  120 – 5* exp(b0+b1*4)
> / (1+ exp(b0+b1*4) ) = 0
>  690 – 31*
> exp(b0+b1*4) / (1+ exp(b0+b1*4) ) =0
>
> How could find value of bo and b1 root values?

You can use packages nleqslv, BB, (and ktsolve) for solving systems of non linear equations.
See the taskviews Optimization and NumericalMathematics on CRAN.

But you will not succeed in your case.

In your equations replace the expression exp(b0+b1*4) / (1+ exp(b0+b1*4) ) with Z.
Then you have two linear equations:

120-5*Z=0
690-31*Z=0

The system is incompatible. You can’t solve this for Z.

So you need to rethink your equations.

Berend

>
> Saymi
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help