Skip to content

Solving Systems of Non-linear equations

1 message · Gabor Grothendieck

#
Another follow up comment.  I tried it in Maxima (also free) and noticed
that it has the capability of performing the solution in just
a single line using the Maxima solve command so you may prefer
that.  Note that the first line display2d:false turns off fancy 2d output
and you can omit it if you want the fancy 2d output.

display2d:false;
solve([mean = a/(a+b), variance = (a*b)/(((a+b)^2) * (a+b+1))], [a,b]);

The output looks like this:

(%i18) display2d:false;
(%o18) FALSE
(%i19) solve([mean = a/(a+b), variance = (a*b)/(((a+b)^2) * (a+b+1))], [a,b]);
(%o19) [[a = -(mean*variance+mean^3-mean^2)/variance,
	 b = ((mean-1)*variance+mean^3-2*mean^2+mean)/variance],[a = 0,b = 0]]
On 11/30/05, Gabor Grothendieck <ggrothendieck at gmail.com> wrote: