0% found this document useful (0 votes)
22 views2 pages

Chapter4 Prob29

The document describes how to derive the equation of a circle that passes through three given points using a system of linear equations. It provides a MATLAB script to solve the equations and calculate the circle's center (a, b) and radius (r). The results from both a user-defined function and MATLAB's left division operation yield the same values for a, b, and r.

Uploaded by

skibidipapap
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views2 pages

Chapter4 Prob29

The document describes how to derive the equation of a circle that passes through three given points using a system of linear equations. It provides a MATLAB script to solve the equations and calculate the circle's center (a, b) and radius (r). The results from both a user-defined function and MATLAB's left division operation yield the same values for a, b, and r.

Uploaded by

skibidipapap
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1

4.29 In a Cartesian coordinate system the equation of a circle with its


center at point ( a, b ) and radius r is: y
(-8, 4)
( x – a )2 + ( y – b )2 = r2 (-1, 3.2)
x
Given three points, ( – 1, 3.2 ) , ( – 8, 4 ) , and ( – 6.5, – 9.3 ) , determine the
equation of the circle that passes through the points.
Solve the problem by deriving a system of three linear equations (substi- (-6.5, -9.3)
tute the points in the equation) and solve the system.
(a) Use the user-defined function GaussPivotLarge developed in Problem 4.21.
(b) Solve the system of equations using MATLAB’s left division operation.
Solution
The equation of the circle can be written in the form:
– 2xa – 2yb + c = – ( x 2 + y 2 ) where c = a 2 + b 2 – r 2

The problem is solved by substituting the three points in the equation of the circle. This gives a system of
three linear equations for the unknowns a, b, and c. Once a, b, and c are known r is calculated by:
r = a2 + b2 – c .

The problem is solved in the following script file:

x=[-1 -8 -6.5]
y=[3.2 4 -9.3]
A=[-2*x(1) -2*y(1) 1; -2*x(2) -2*y(2) 1; -2*x(3) -2*y(3) 1];
B=[-(x(1)^2+y(1)^2); -(x(2)^2+y(2)^2); -(x(3)^2+y(3)^2)];
% Part (a)
disp('Part (a)')
Ca = GaussPivotLarge(A,B);
a=Ca(1)
b=Ca(2)
r=sqrt(Ca(1)^2+Ca(2)^2-Ca(3))
% Part (b)
disp('Part (b)')
Cb=A\B;

Excerpts from this work may be reproduced by instructors for distribution on a not-for-profit basis
for testing or instructional purposes only to students enrolled in courses for which the textbook
has been adopted. Any other reproduction or translation of this work beyond that permitted by
Sections 107 or 108 of the 1976 United States Copyright Act without the permission of the
copyright owner is unlawful.
2

a=Cb(1)
b=Cb(2)
r=sqrt(Cb(1)^2+Cb(2)^2-Cb(3))

When the script is executed the following answers are displyed in the Comand Window:

x =
-1.0000 -8.0000 -6.5000
y =
3.2000 4.0000 -9.3000
Part (a)
a =
-5.1877
b =
-2.4174
r =
7.0066
Part (b)
a =
-5.1877
b =
-2.4174
r =
7.0066

Excerpts from this work may be reproduced by instructors for distribution on a not-for-profit basis
for testing or instructional purposes only to students enrolled in courses for which the textbook
has been adopted. Any other reproduction or translation of this work beyond that permitted by
Sections 107 or 108 of the 1976 United States Copyright Act without the permission of the
copyright owner is unlawful.

You might also like