StudySmarter - The all-in-one study app.

4.8 • +11k Ratings

More than 3 Million Downloads

Free

Euclidean Algorithm

- Calculus
- Absolute Maxima and Minima
- Absolute and Conditional Convergence
- Accumulation Function
- Accumulation Problems
- Algebraic Functions
- Alternating Series
- Antiderivatives
- Application of Derivatives
- Approximating Areas
- Arc Length of a Curve
- Arithmetic Series
- Average Value of a Function
- Calculus of Parametric Curves
- Candidate Test
- Combining Differentiation Rules
- Combining Functions
- Continuity
- Continuity Over an Interval
- Convergence Tests
- Cost and Revenue
- Density and Center of Mass
- Derivative Functions
- Derivative of Exponential Function
- Derivative of Inverse Function
- Derivative of Logarithmic Functions
- Derivative of Trigonometric Functions
- Derivatives
- Derivatives and Continuity
- Derivatives and the Shape of a Graph
- Derivatives of Inverse Trigonometric Functions
- Derivatives of Polar Functions
- Derivatives of Sec, Csc and Cot
- Derivatives of Sin, Cos and Tan
- Determining Volumes by Slicing
- Direction Fields
- Disk Method
- Divergence Test
- Eliminating the Parameter
- Euler's Method
- Evaluating a Definite Integral
- Evaluation Theorem
- Exponential Functions
- Finding Limits
- Finding Limits of Specific Functions
- First Derivative Test
- Function Transformations
- General Solution of Differential Equation
- Geometric Series
- Growth Rate of Functions
- Higher-Order Derivatives
- Hydrostatic Pressure
- Hyperbolic Functions
- Implicit Differentiation Tangent Line
- Implicit Relations
- Improper Integrals
- Indefinite Integral
- Indeterminate Forms
- Initial Value Problem Differential Equations
- Integral Test
- Integrals of Exponential Functions
- Integrals of Motion
- Integrating Even and Odd Functions
- Integration Formula
- Integration Tables
- Integration Using Long Division
- Integration of Logarithmic Functions
- Integration using Inverse Trigonometric Functions
- Intermediate Value Theorem
- Inverse Trigonometric Functions
- Jump Discontinuity
- Lagrange Error Bound
- Limit Laws
- Limit of Vector Valued Function
- Limit of a Sequence
- Limits
- Limits at Infinity
- Limits of a Function
- Linear Approximations and Differentials
- Linear Differential Equation
- Linear Functions
- Logarithmic Differentiation
- Logarithmic Functions
- Logistic Differential Equation
- Maclaurin Series
- Manipulating Functions
- Maxima and Minima
- Maxima and Minima Problems
- Mean Value Theorem for Integrals
- Models for Population Growth
- Motion Along a Line
- Motion in Space
- Natural Logarithmic Function
- Net Change Theorem
- Newton's Method
- Nonhomogeneous Differential Equation
- One-Sided Limits
- Optimization Problems
- P Series
- Particle Model Motion
- Particular Solutions to Differential Equations
- Polar Coordinates
- Polar Coordinates Functions
- Polar Curves
- Population Change
- Power Series
- Ratio Test
- Removable Discontinuity
- Riemann Sum
- Rolle's Theorem
- Root Test
- Second Derivative Test
- Separable Equations
- Simpson's Rule
- Solid of Revolution
- Solutions to Differential Equations
- Surface Area of Revolution
- Symmetry of Functions
- Tangent Lines
- Taylor Polynomials
- Taylor Series
- Techniques of Integration
- The Fundamental Theorem of Calculus
- The Mean Value Theorem
- The Power Rule
- The Squeeze Theorem
- The Trapezoidal Rule
- Theorems of Continuity
- Trigonometric Substitution
- Vector Valued Function
- Vectors in Calculus
- Vectors in Space
- Washer Method
- Decision Maths
- Geometry
- 2 Dimensional Figures
- 3 Dimensional Vectors
- 3-Dimensional Figures
- Altitude
- Angles in Circles
- Arc Measures
- Area and Volume
- Area of Circles
- Area of Circular Sector
- Area of Parallelograms
- Area of Plane Figures
- Area of Rectangles
- Area of Regular Polygons
- Area of Rhombus
- Area of Trapezoid
- Area of a Kite
- Composition
- Congruence Transformations
- Congruent Triangles
- Convexity in Polygons
- Coordinate Systems
- Dilations
- Distance and Midpoints
- Equation of Circles
- Equilateral Triangles
- Figures
- Fundamentals of Geometry
- Geometric Inequalities
- Geometric Mean
- Geometric Probability
- Glide Reflections
- HL ASA and AAS
- Identity Map
- Inscribed Angles
- Isometry
- Isosceles Triangles
- Law of Cosines
- Law of Sines
- Linear Measure and Precision
- Median
- Parallel Lines Theorem
- Parallelograms
- Perpendicular Bisector
- Plane Geometry
- Polygons
- Projections
- Properties of Chords
- Proportionality Theorems
- Pythagoras Theorem
- Rectangle
- Reflection in Geometry
- Regular Polygon
- Rhombuses
- Right Triangles
- Rotations
- SSS and SAS
- Segment Length
- Similarity
- Similarity Transformations
- Special quadrilaterals
- Squares
- Surface Area of Cone
- Surface Area of Cylinder
- Surface Area of Prism
- Surface Area of Sphere
- Surface Area of a Solid
- Surface of Pyramids
- Symmetry
- Translations
- Trapezoids
- Triangle Inequalities
- Triangles
- Using Similar Polygons
- Vector Addition
- Vector Product
- Volume of Cone
- Volume of Cylinder
- Volume of Pyramid
- Volume of Solid
- Volume of Sphere
- Volume of prisms
- Mechanics Maths
- Acceleration and Time
- Acceleration and Velocity
- Angular Speed
- Assumptions
- Calculus Kinematics
- Coefficient of Friction
- Connected Particles
- Constant Acceleration
- Constant Acceleration Equations
- Converting Units
- Force as a Vector
- Kinematics
- Newton's First Law
- Newton's Law of Gravitation
- Newton's Second Law
- Newton's Third Law
- Projectiles
- Pulleys
- Resolving Forces
- Statics and Dynamics
- Tension in Strings
- Variable Acceleration
- Probability and Statistics
- Bar Graphs
- Basic Probability
- Charts and Diagrams
- Conditional Probabilities
- Continuous and Discrete Data
- Frequency, Frequency Tables and Levels of Measurement
- Independent Events Probability
- Line Graphs
- Mean Median and Mode
- Mutually Exclusive Probabilities
- Probability Rules
- Probability of Combined Events
- Quartiles and Interquartile Range
- Systematic Listing
- Pure Maths
- ASA Theorem
- Absolute Value Equations and Inequalities
- Addition and Subtraction of Rational Expressions
- Addition, Subtraction, Multiplication and Division
- Algebra
- Algebraic Fractions
- Algebraic Notation
- Algebraic Representation
- Analyzing Graphs of Polynomials
- Angle Measure
- Angles
- Angles in Polygons
- Approximation and Estimation
- Area and Circumference of a Circle
- Area and Perimeter of Quadrilaterals
- Area of Triangles
- Arithmetic Sequences
- Average Rate of Change
- Bijective Functions
- Binomial Expansion
- Binomial Theorem
- Chain Rule
- Circle Theorems
- Circles
- Circles Maths
- Combination of Functions
- Combinatorics
- Common Factors
- Common Multiples
- Completing the Square
- Completing the Squares
- Complex Numbers
- Composite Functions
- Composition of Functions
- Compound Interest
- Compound Units
- Conic Sections
- Construction and Loci
- Converting Metrics
- Convexity and Concavity
- Coordinate Geometry
- Coordinates in Four Quadrants
- Cubic Function Graph
- Cubic Polynomial Graphs
- Data transformations
- Deductive Reasoning
- Definite Integrals
- Deriving Equations
- Determinant of Inverse Matrix
- Determinants
- Differential Equations
- Differentiation
- Differentiation Rules
- Differentiation from First Principles
- Differentiation of Hyperbolic Functions
- Direct and Inverse proportions
- Disjoint and Overlapping Events
- Disproof by Counterexample
- Distance from a Point to a Line
- Divisibility Tests
- Double Angle and Half Angle Formulas
- Drawing Conclusions from Examples
- Ellipse
- Equation of Line in 3D
- Equation of a Perpendicular Bisector
- Equation of a circle
- Equations
- Equations and Identities
- Equations and Inequalities
- Estimation in Real Life
- Euclidean Algorithm
- Evaluating and Graphing Polynomials
- Even Functions
- Exponential Form of Complex Numbers
- Exponential Rules
- Exponentials and Logarithms
- Expression Math
- Expressions and Formulas
- Faces Edges and Vertices
- Factorials
- Factoring Polynomials
- Factoring Quadratic Equations
- Factorising expressions
- Factors
- Finding Maxima and Minima Using Derivatives
- Finding Rational Zeros
- Finding the Area
- Forms of Quadratic Functions
- Fractional Powers
- Fractional Ratio
- Fractions
- Fractions and Decimals
- Fractions and Factors
- Fractions in Expressions and Equations
- Fractions, Decimals and Percentages
- Function Basics
- Functional Analysis
- Functions
- Fundamental Counting Principle
- Fundamental Theorem of Algebra
- Generating Terms of a Sequence
- Geometric Sequence
- Gradient and Intercept
- Graphical Representation
- Graphing Rational Functions
- Graphing Trigonometric Functions
- Graphs
- Graphs and Differentiation
- Graphs of Common Functions
- Graphs of Exponents and Logarithms
- Graphs of Trigonometric Functions
- Greatest Common Divisor
- Growth and Decay
- Growth of Functions
- Highest Common Factor
- Hyperbolas
- Imaginary Unit and Polar Bijection
- Implicit differentiation
- Inductive Reasoning
- Inequalities Maths
- Infinite geometric series
- Injective functions
- Instantaneous Rate of Change
- Integers
- Integrating Polynomials
- Integrating Trig Functions
- Integrating e^x and 1/x
- Integration
- Integration Using Partial Fractions
- Integration by Parts
- Integration by Substitution
- Integration of Hyperbolic Functions
- Interest
- Inverse Hyperbolic Functions
- Inverse Matrices
- Inverse and Joint Variation
- Inverse functions
- Iterative Methods
- Law of Cosines in Algebra
- Law of Sines in Algebra
- Laws of Logs
- Limits of Accuracy
- Linear Expressions
- Linear Systems
- Linear Transformations of Matrices
- Location of Roots
- Logarithm Base
- Logic
- Lower and Upper Bounds
- Lowest Common Denominator
- Lowest Common Multiple
- Math formula
- Matrices
- Matrix Addition and Subtraction
- Matrix Determinant
- Matrix Multiplication
- Metric and Imperial Units
- Misleading Graphs
- Mixed Expressions
- Modulus Functions
- Modulus and Phase
- Multiples of Pi
- Multiplication and Division of Fractions
- Multiplicative Relationship
- Multiplying and Dividing Rational Expressions
- Natural Logarithm
- Natural Numbers
- Notation
- Number
- Number Line
- Number Systems
- Numerical Methods
- Odd functions
- Open Sentences and Identities
- Operation with Complex Numbers
- Operations with Decimals
- Operations with Matrices
- Operations with Polynomials
- Order of Operations
- Parabola
- Parallel Lines
- Parametric Differentiation
- Parametric Equations
- Parametric Integration
- Partial Fractions
- Pascal's Triangle
- Percentage
- Percentage Increase and Decrease
- Percentage as fraction or decimals
- Perimeter of a Triangle
- Permutations and Combinations
- Perpendicular Lines
- Points Lines and Planes
- Polynomial Graphs
- Polynomials
- Powers Roots And Radicals
- Powers and Exponents
- Powers and Roots
- Prime Factorization
- Prime Numbers
- Problem-solving Models and Strategies
- Product Rule
- Proof
- Proof and Mathematical Induction
- Proof by Contradiction
- Proof by Deduction
- Proof by Exhaustion
- Proof by Induction
- Properties of Exponents
- Proportion
- Proving an Identity
- Pythagorean Identities
- Quadratic Equations
- Quadratic Function Graphs
- Quadratic Graphs
- Quadratic functions
- Quadrilaterals
- Quotient Rule
- Radians
- Radical Functions
- Rates of Change
- Ratio
- Ratio Fractions
- Rational Exponents
- Rational Expressions
- Rational Functions
- Rational Numbers and Fractions
- Ratios as Fractions
- Real Numbers
- Reciprocal Graphs
- Recurrence Relation
- Recursion and Special Sequences
- Remainder and Factor Theorems
- Representation of Complex Numbers
- Rewriting Formulas and Equations
- Roots of Complex Numbers
- Roots of Polynomials
- Roots of Unity
- Rounding
- SAS Theorem
- SSS Theorem
- Scalar Triple Product
- Scale Drawings and Maps
- Scale Factors
- Scientific Notation
- Second Order Recurrence Relation
- Sector of a Circle
- Segment of a Circle
- Sequences
- Sequences and Series
- Series Maths
- Sets Math
- Similar Triangles
- Similar and Congruent Shapes
- Simple Interest
- Simplifying Fractions
- Simplifying Radicals
- Simultaneous Equations
- Sine and Cosine Rules
- Small Angle Approximation
- Solving Linear Equations
- Solving Linear Systems
- Solving Quadratic Equations
- Solving Radical Inequalities
- Solving Rational Equations
- Solving Simultaneous Equations Using Matrices
- Solving Systems of Inequalities
- Solving Trigonometric Equations
- Solving and Graphing Quadratic Equations
- Solving and Graphing Quadratic Inequalities
- Special Products
- Standard Form
- Standard Integrals
- Standard Unit
- Straight Line Graphs
- Substraction and addition of fractions
- Sum and Difference of Angles Formulas
- Sum of Natural Numbers
- Surds
- Surjective functions
- Tables and Graphs
- Tangent of a Circle
- The Quadratic Formula and the Discriminant
- Transformations
- Transformations of Graphs
- Translations of Trigonometric Functions
- Triangle Rules
- Triangle trigonometry
- Trigonometric Functions
- Trigonometric Functions of General Angles
- Trigonometric Identities
- Trigonometric Ratios
- Trigonometry
- Turning Points
- Types of Functions
- Types of Numbers
- Types of Triangles
- Unit Circle
- Units
- Variables in Algebra
- Vectors
- Verifying Trigonometric Identities
- Writing Equations
- Writing Linear Equations
- Statistics
- Bias in Experiments
- Binomial Distribution
- Binomial Hypothesis Test
- Bivariate Data
- Box Plots
- Categorical Data
- Categorical Variables
- Central Limit Theorem
- Chi Square Test for Goodness of Fit
- Chi Square Test for Homogeneity
- Chi Square Test for Independence
- Chi-Square Distribution
- Combining Random Variables
- Comparing Data
- Comparing Two Means Hypothesis Testing
- Conditional Probability
- Conducting a Study
- Conducting a Survey
- Conducting an Experiment
- Confidence Interval for Population Mean
- Confidence Interval for Population Proportion
- Confidence Interval for Slope of Regression Line
- Confidence Interval for the Difference of Two Means
- Confidence Intervals
- Correlation Math
- Cumulative Frequency
- Data Analysis
- Data Interpretation
- Discrete Random Variable
- Distributions
- Dot Plot
- Empirical Rule
- Errors in Hypothesis Testing
- Estimator Bias
- Events (Probability)
- Frequency Polygons
- Generalization and Conclusions
- Geometric Distribution
- Histograms
- Hypothesis Test for Correlation
- Hypothesis Test of Two Population Proportions
- Hypothesis Testing
- Inference for Distributions of Categorical Data
- Inferences in Statistics
- Large Data Set
- Least Squares Linear Regression
- Linear Interpolation
- Linear Regression
- Measures of Central Tendency
- Methods of Data Collection
- Normal Distribution
- Normal Distribution Hypothesis Test
- Normal Distribution Percentile
- Point Estimation
- Probability
- Probability Calculations
- Probability Distribution
- Probability Generating Function
- Quantitative Variables
- Quartiles
- Random Variables
- Randomized Block Design
- Residual Sum of Squares
- Residuals
- Sample Mean
- Sample Proportion
- Sampling
- Sampling Distribution
- Scatter Graphs
- Single Variable Data
- Skewness
- Standard Deviation
- Standard Normal Distribution
- Statistical Graphs
- Statistical Measures
- Stem and Leaf Graph
- Sum of Independent Random Variables
- Survey Bias
- Transforming Random Variables
- Tree Diagram
- Two Categorical Variables
- Two Quantitative Variables
- Type I Error
- Type II Error
- Types of Data in Statistics
- Venn Diagrams

Suppose you are a towel manufacturer. You get shipments of fabric in rectangles of \(600 \,cm\) by \(250 \,cm,\) and you want to make the largest square towels possible without wasting any fabric. What size should you cut? The answer is actually to find the **greatest common divisor** of the two side lengths, \(600\,cm\) and \(250\,cm,\) which is \(50\,cm,\) so the towels should have a side length of \(50\,cm.\) In this case it is not too hard to calculate the greatest common factor by listing the factors of each of the side lengths and seeing the largest number that is in both, but as the lengths get longer, this task will get more and more tedious. This calls for a better way of calculating the greatest common divisor: **the Euclidean Algorithm**.

Before you study the Euclidean Algorithm, it is important to fully understand greatest common divisors first.

The greatest common divisor is one of the most fundamental concepts in elementary number theory.

The **Greatest Common Divisor** of two integers \(p\) and \(q\) is the greatest positive integer such that dividing both \(p\) and \(q\) by that number will give an integer value. This is written \(GCD(p, q).\)

For example:

The divisors of 12 are 1, 2, 3, 4, 6 and 12.

The divisors of 16 are 1, 2, 4, 8 and 16.

Hence, the greatest common divisor of 12 and 16, \(GCD(12,16),\) is 4.

The **Euclidean Algorithm** is a method of finding the greatest common divisor between two numbers. The Euclidean Algorithm finds \(GCD(a,b), a>b\) in the following way:

Find integers \(q_1, r_1 \) such that \(r_1 < b \) and \(a = q_1 b + r_1.\)

If \(r_1 = 0,\) then \(GCD(a,b)\) is \(b.\)

If \(r_1 \neq 0,\) then \(GCD(a,b) = GCD(b, r_1).\) Repeat the algorithm for \(GCD(b, r_1)\) until you find an \(r_i=0,\) in which case \(GCD(a,b) = r_{i-1}.\)

The \(q\) values are called the **quotients **and the \(r\) values are the **remainders**. This algorithm is **recursive**, meaning part of it requires plugging a value back into the algorithm again, but it will always give an answer. This is because in step one, you require that \(r_1 < b,\) so when you use the algorithm recursively you guarantee that \( r_i < \dots < r_2 < r_1 < b, \) meaning that eventually you will reach an \(r\) that is equal to 0.

Now that you know how the Euclidean algorithm works, let's look at some examples of it.

Use the Euclidean Algorithm to find \( GCD(100,78). \)

**Solution**

First, you must find \(q_1,r_1\) such that

\[ 100 = q_1 78 + r_1.\]

\(q_1\) must be \(1,\) since any integer greater than that will exceed our left-hand side. Given this, \(r_1\) must be \(22\) to make the left-hand side equal to 100.

\[ 100 = 1 \cdot 78 + 22. \]

Since \(r_1 = 22 \neq 0,\) you must repeat the algorithm with \(GCD(78, 22).\) \(22\) goes into \(78\) \(3\) times with a remainder of \(12,\) hence these are the values for \(q_2\) and \(r_2.\)

\[ 78 = 3 \cdot 22 + 12. \]

Again, \(r_2 \cdot 0\) so the algorithm must be repeated with \(GCD(22, 12). \) \(12\) goes into \(22\) once with a remainder of \(10,\) so:

\[ 22 = 1 \cdot 12 + 10.\]

Again, the algorithm must be repeated. This time, finding \(GCD(12,10).\) 10 goes into 12 once, with a remainder of 2, so:

\[ 12 = 1 \cdot 10 + 2.\]

The algorithm must be repeated once more. \(2\) goes into \(10\) \(5\) times, with no remainder:

\[ 10 = 5\cdot 2 + 0.\]

Since the remainder here is \(0,\) the algorithm is finished. The last remainder in the algorithm was \(2,\) hence \(GCD(100,78) = 2.\)

For questions with relatively smaller numbers such as the one above, the Euclidean algorithm may be no quicker than simply listing and comparing the divisors of each number. But when the numbers are bigger, the Euclidean Algorithm is very useful.

Use the Euclidean Algorithm to find \( GCD(2365,781). \)

**Solution**

Firstly, you must find \(q_1,r_1\) such that

\[ 2365 = q_1 781 + r_1.\]

Three lots of \(781\) can go into \(2365\) before exceeding it, hence \(q_1\) must be three. This leaves a remainder of 22, which is the value for \(r_1.\)

\[ 2365 = 3 \cdot 781 + 22. \]

Since \(r_1\) is not \(0,\) you must repeat the algorithm with \(GCD(781, 22).\) \(22\) can go into \(781\) 35 times, leaving a remainder of \(11.\) Hence:

\[ 781 = 35 \cdot 22 + 11. \]

Since \(r_2\) is not \(0,\) the algorithm must be repeated again, for \(GCD(22, 11).\) This one is quite easy, \(11\) goes into \(22\) twice with no remainder.

\[ 22 = 2 \cdot 11 + 0.\]

Since there is no remainder, the previous remainder must be the greatest common divisor. Hence, \( GCD(2365, 781) = 11. \)

Now that you have seen the Euclidean algorithm and a few examples of it, you may be wondering: why does it work? The key part of the Euclidean algorithm that requires proving is that if

\[ a = q_1 b + r_1, \]

then \( GCD(a,b) = GCD(b, r_1). \)

Once this is proven, the Euclidean algorithm works through recursion so that

\[\begin{align} GCD(a,b) &= GCD(b, r_1) \\ & \quad \vdots \\ &= GCD(r_{i-1}, 0) \\ &= r_{i-1}. \end{align} \]

Before we prove this, here are some important things to note. For any integers \(p, q, r\):

- If \(p\) divides \(q\), then \(p\) divides \(rq.\)
- If \(p\) divides \(q\) and \(r,\) then \(p\) divides \(q + r.\)
- If \(p\) divides \(q\) and \(r,\) then \(p \leq GCD(q,r). \)

Now that these have been stated, we can use them to build the proof.

Prove that if \( a = q b + r, \) then \( GCD(a,b) = GCD(b, r). \)

**Solution**

Rearrange the first equation to be

\[ r = a - qb. \]

\( GCD(a,b) \) must divide \(a\) and \(b\) by its definition. Hence, it must also divide \(-qb\) by rule 1 above. Using rule 2, we get that \(GCD(a,b)\) must divide \(a - qb = r.\) By rule three, since \(GCD(a,b) \) must divide \(b\) and \(r,\) \(GCD(a,b) \leq GCD(b,r).\)

Similarly, \(GCD(b,r)\) must divide both \(b\) and \(r,\) by definition. By rule 1, it must also divide \(qb.\) By rule 2, it must also divide \( qb + r = a.\) Since \(GCD(b,r)\) divides \(a\) and \(b,\) by rule three \(GCD(b,r) \leq GCD(a,b). \)

Since \(GCD(a,b) \leq GCD(b,r)\) and \(GCD(b,r) \leq GCD(a,b),\) it must be the case that \(GCD(a,b) = GCD(b, r).\)

Here, the Euclidean Algorithm has only been applied to integers, but it can be applied to many other types of mathematical objects too. Here, you will look at using the Euclidean Algorithm to find the greatest common divider of two polynomials.

A polynomial \(p(x)\) **divides** another polynomial \(q(x)\) if there exists another polynomial, \(r(x),\) such that \(p(x) = q(x) \cdot r(x). \)

A **monic polynomial** is a polynomial with a leading coefficient of \(1,\) meaning the coefficient of the highest power term is \(1.\)

The **greatest common divisor**, \(GCD(p, q)\)** **of polynomials \(p(x), q(x)\) is the monic polynomial of the highest order that divides both \(p(x)\) and \(q(x).\)

The requirement for the greatest common divisor of polynomials to be monic ensures that it is unique. With these definitions in place, the Euclidean Algorithm works in exactly the same way as it does for real numbers. To find \(GCD(a(x), b(x)): \)

Find polynomials \(q_1(x), r_1(x) \) such that \(r_1(x) \) is lower order than \(b(x)\) and \(a(x) = q_1(x) b(x) + r_1(x).\)

If \(r_1(x) = 0,\) then \(GCD(a(x),b(x))\) is \(b(x).\)

If \(r_1(x) \neq 0,\) then \(GCD(a(x),b(x)) = GCD(b(x), r_1(x)).\) Repeat the algorithm for \(GCD(b(x), r_1(x))\) until you find an \(r_i(x)=0,\) in which case \(GCD(a(x),b(x)) = r_{i-1}(x).\)

Use the Euclidean Algorithm to find \( GCD(f(x),g(x)), \) where:

\[ \begin{align} f(x) & = x^4 - 5x^3 - 35x^2 - 5x - 36 \\ g(x) & = x^3 - 5x^2 + x-5. \end{align} \]

**Solution**

To find the \(q\) and \(r\) values, you could use polynomial division. In this case however, you can see that by multiplying \(g(x)\) by \(x,\) the the \(x^4, x^3,\) and \(x\) terms are all correct. Hence, you can take \(x\) to be \(q_1(x),\) and correct the sum by setting the remainder as \(-36x^2 - 36.\)

\[ x^4 - 5x^3 - 35x^2 - 5x - 36 = (x) \cdot (x^3 - 5x^2 + x-5) + (-36x^2 - 36). \]

Since the remainder term is not zero, you must repeat the algorithm using \(GCD(g(x), r_1(x)).\) This time, lets use polynomial division.

\[ \begin{array}{rll} - \frac{1}{36} x + \frac{5}{36} \phantom{)} && \\ -36x^2-36 \enclose{longdiv}{\; x^3 - 5x^2 + \phantom{1}x - 5\phantom{)}}\kern-.2ex \\ \underline{-\; (x^3 +0x^2 + \phantom{1} x )\phantom{-5) }} && \hbox{Subtract like terms} \\ -5x^2 + 0x -5\phantom{)} && \hbox{} \\ \underline{\phantom{ x^3 }-(-5x^2-0x -5)} && \hbox{Subtract like terms} \\ \phantom{00}0\phantom{)} && \hbox{The remainder is zero.} \end{array}\]

Hence, the quotient value is \(-\frac{1}{36} + \frac{5}{36} \) and the remainder is \( 0.\) So

\[ x^3 - 5x^2 + x-5 = \left(-\frac{1}{36} + \frac{5}{36}\right) \cdot (-36x^2 - 36) + 0. \]

Since the remainder is 0, the greatest common divider must be the last remainder, \(-36x^2 - 36.\) But for polynomials, the greatest common divider must be monic, so you must divide this polynomial by \(-36\) such that it is monic. Hence, \(GCD(a(x),b(x) = x^2 + 1. \)

- The Euclidean algorithm is used to find the greatest common divider between two integers.
- The Euclidean Algorithm finds \(GCD(a,b), a>b\) in the following way:
- Find integers \(q_1, r_1 \) such that \(r_1 < b \) and \(a = q_1 b + r_1.\)
- If \(r_1 = 0,\) then \(GCD(a,b)\) is \(b.\)
- If \(r_1 \neq 0,\) then \(GCD(a,b) = GCD(b, r_1).\) Repeat the algorithm for \(GCD(b, r_1)\) until you find an \(r_i=0,\) in which case \(GCD(a,b) = r_{i-1}.\)

The Euclidean Algorithm finds GCD(a,b), a>b in the following way:

Find integers q, r such that r < b and a = qb + r.

If r=0 then GCD(a,b) is b.

If r isn't 0 then GCD(a,b) = GCDb, r). Repeat the algorithm for GCD(b, r) until you find a remainder of 0 in which case GCD(a,b) is the r that gave you a remainder of 0.

The GCD(30, 18) can be found using the Euclidean Algorithm:

- 30 = 1*18 + 12,
- 18 = 1*12 + 6,
- 12 = 2*6 + 0.

The last non-zero remainder is 6, hence GCD(30,18) = 6.

The Euclidean algorithm works because if a = q*b + r, then GCD(a, b) = GCD(b, r).

The Euclidean Algorithm finds GCD(a,b), a>b in the following way:

Find integers q, r such that r < b and a = qb + r.

If r=0 then GCD(a,b) is b.

If r isn't 0 then GCD(a,b) = GCDb, r). Repeat the algorithm for GCD(b, r) until you find a remainder of 0 in which case GCD(a,b) is the r that gave you a remainder of 0.

The GCD(30, 18) can be found using the Euclidean Algorithm:

- 30 = 1*18 + 12,
- 18 = 1*12 + 6,
- 12 = 2*6 + 0.

The last non-zero remainder is 6, hence GCD(30,18) = 6.

More about Euclidean Algorithm

Be perfectly prepared on time with an individual plan.

Test your knowledge with gamified quizzes.

Create and find flashcards in record time.

Create beautiful notes faster than ever before.

Have all your study materials in one place.

Upload unlimited documents and save them online.

Identify your study strength and weaknesses.

Set individual study goals and earn points reaching them.

Stop procrastinating with our study reminders.

Earn points, unlock badges and level up while studying.

Create flashcards in notes completely automatically.

Create the most beautiful study materials using our templates.

Sign up to highlight and take notes. It’s 100% free.