Curve From Points

> with(linalg):

Warning, the protected names norm and trace have been redefined and unprotected

> with(plots):

Warning, the name changecoords has been redefined

Find the circle through the points (1,2), (3,4), (5,7):

Solution:
We want to fit a polynomial x^2 + y^2+ a x + b y + c = 0;

> v := vector([x^2 +y^2, x, y, 1 ]);

v := vector([x^2+y^2, x, y, 1])

> v1 := vector([1^2 + 2^2, 1, 2, 1]);

v1 := vector([5, 1, 2, 1])

> v2 := vector([3^2 + 4^2, 3,4,1]);

v2 := vector([25, 3, 4, 1])

> v3 := vector([5^2+7^2,5,7,1]);

v3 := vector([74, 5, 7, 1])

> A :=stackmatrix(v,v1,v2,v3);

A := matrix([[x^2+y^2, x, y, 1], [5, 1, 2, 1], [25,...

> eqn := det(A) = 0;

eqn := 2*x^2+2*y^2+38*x-58*y+68 = 0

Graphical Display

> gr := implicitplot(eqn,x=-40..40,y=-40..40, grid=[20,20]):

> display(gr, scaling=constrained,thickness=3);

[Maple Plot]

>

>