Sovling non-linear eq-sys (beginners question)

• To: mathgroup at smc.vnet.net
• Subject: [mg71207] Sovling non-linear eq-sys (beginners question)
• From: 17538 at student.hhs.se
• Date: Fri, 10 Nov 2006 06:38:12 -0500 (EST)

```I wonder how I can use Mathematica to solve a system of non-linear
equations.

If I want to find the parameters of an ellipse, given coordinates of
some points on it, then I have a system of four non-linear equations.
Where should I go from here in order to make Mathematica help me with
the substitutions necessary to express each parameter as a function of
the coordinates of the points?

Here follows an example:

The formula of an ellipse (with an axis parallell to the x-axis of the
coordinate system) is:

(x-ox)^2 / s^2 + (y-oy)^2 / b^2 = 1

where
s: half length of small axis.
b: half length of big axis.
ox: x-coordinate of the center of the ellipse.
oy: y-coordinate of the center of the ellipse.
x,y: coordinates of a point on perimeter of the ellipse.

I solve for each of the 4 parameters s, b, ox, oy and insert unique
{x,y}-values in each equation:
s = f(x1,y1,b,ox,oy)
b = f(x2,y2,s,ox,oy)
ox = f(x3,y3,b,s,oy)
oy = f(x4,y4,b,s,ox)

[Of course, there are two functions for each parameter, one describing
the upper half and the other describing the lower half, so to speak.]

Now I should be able to substitute my way to a solution like this:

Inserting b = f(x2,y2,s,ox,oy) in s = f(x1,y1,b,ox,oy) gives:
s = f(x1,y1,f(x2,y2,s,ox,oy),ox,oy)

Solving for s gives:
s = f(x1,y1,x2,y2,ox,oy)

And then continue with inserting oy = f(...) in s' = f(...) above and
again solving for s, then the same with ox so that I arrive at s =
f(x1,y1,x2,y2,x3,y3,x4,y4). Then the procedure is repeated with each of
the other parameters b, ox, oy.

The thing is that it gets quite tedious even for a pretty simple
problem like this. And what about doing it for an ellipse with a tilted
axis (not parallell with the x-axis of the coordinate system)? That
would introduce a new parameter, a new equation in the system and
significantly longer equations too (maybe it is pointless to work with
algebraic solutions in that case anyway).

So, what tricks can Mathematica perform in order to do the work for me?

I'm grateful for any comments or reference that could help me!

```

• Prev by Date: Re: animation question
• Next by Date: Re: Challenge problem
• Previous by thread: Re: Typo in DedekindEta function definition?
• Next by thread: Re: Sovling non-linear eq-sys (beginners question)