solving equations, plotting is next



oops, I mistakenly sent this email to private address. Sorry.
Sending again, after few small changes.

Jaime Villate said:     (by the date of Fri, 26 Feb 2010 20:13:51 +0000)

> On Fri, 2010-02-26 at 19:38 +0100, Janek Kozicki wrote:
> > I know, maxima was thinking that A and B are functions because
> > I forgot '*' before brackets :) 
> 
> You also have another problem: you cannot expect to get a solution for A
> and B with only one equation that relates them. eq1 in your example
> relates variables a and b, which are considered different from A and B
> (Maxima is case-sensitive).

Yes, a,b are parameters (size of ellipse described by eq1). A,B are
unknowns (direction of a line going through x0 and y0). And I am seeking
a solution where the line is touching the ellipse. And in fact I had
to solve it with respect to 'x', and the condition is that Delta=0
(x1=x2). Because only in this case the line is touching the ellipse.
And so I managed to solve it, the answer is a ratio between A and B.

So now, if you have an ellipse at (0,0) with radius1=a, radius2=b,
and a point at (x0,y0). I can tell you that to draw a line touching
the ellipse from (x0,y0), you need the A,B parameters of a line to
satisfy this proportion:

A/B=-(sqrt(a^2*y0^2+b^2*x0^2-a^2*b^2)+x0*y0)/((x0-a)*(x0+a))

Now I would like to check this :)
Can I plot an ellipse and a line somehow? :)

Let's use my original equations:

eq1_ellipse: x^2/a^2+y^2/b^2=1;
eq2_line   : A*(x-x0)+B*(y-y0)=0;

assume a=2,b=4 and draw the ellipse. Can plot2d do that?

Then assume for example: A=1, x0=10,y0=12, calculate B, and draw a
line from eq2_line.

-- 
Janek Kozicki                                                         |