Message Boards Message Boards

0
|
3342 Views
|
1 Reply
|
1 Total Likes
View groups...
Share
Share this post:

How would you find the equation on mathematica

Anonymous User
Anonymous User
Posted 10 years ago

Find the equation of a circle that contains points (4,-3),(-4,5), and (-2,7)

POSTED BY: Anonymous User

Hi,

what about this? First we generate a list of the points:

points = {{4, -3}, {-4, 5}, {-2, 7}}

Then we generate the equations:

Table[(x - a)^2 + (y - b)^2 == R^2 /. {x -> points[[i, 1]], y -> points[[i, 2]]}, {i, 1, 3}]

which gives

{(4 - a)^2 + (-3 - b)^2 == R^2, (-4 - a)^2 + (5 - b)^2 == R^2, (-2 - a)^2 + (7 - b)^2 == R^2}

Note that we used the general form of the equation that generates a circle. These determine the unknowns $a,b,R$.

sols = Solve[Table[(x - a)^2 + (y - b)^2 == R^2 /. {x -> points[[i, 1]], y -> points[[i, 2]]}, {i, 1, 3}], {a, b, R}]

That gives

{{a -> 1, b -> 2, R -> -Sqrt[34]}, {a -> 1, b -> 2, R -> Sqrt[34]}}

It is easy to check that the circle

((x - a)^2 + (y - b)^2 == R^2 /. sols[[2]])

which is

(-1 + x)^2 + (-2 + y)^2 == 34

fulfils the conditions:

Table[((x - a)^2 + (y - b)^2 == R^2 /. sols[[2]]) /. {x -> points[[i, 1]], y -> points[[i, 2]]}, {i, 1, 3}]

evaluates to

{True, True, True}

Cheers,

Marco

POSTED BY: Marco Thiel
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract