Solving Equations and Inequalities



Similar documents
Method To Solve Linear, Polynomial, or Absolute Value Inequalities:

Math Placement Test Practice Problems

Algebra. Exponents. Absolute Value. Simplify each of the following as much as possible. 2x y x + y y. xxx 3. x x x xx x. 1. Evaluate 5 and 123

The Method of Partial Fractions Math 121 Calculus II Spring 2015

Definition 8.1 Two inequalities are equivalent if they have the same solution set. Add or Subtract the same value on both sides of the inequality.

ALGEBRA REVIEW LEARNING SKILLS CENTER. Exponents & Radicals

Homework # 3 Solutions

Introduction to Complex Fourier Series

Find all of the real numbers x that satisfy the algebraic equation:

SOLVING TRIGONOMETRIC INEQUALITIES (CONCEPT, METHODS, AND STEPS) By Nghi H. Nguyen

Algebra 2: Themes for the Big Final Exam

1 Lecture: Integration of rational functions by decomposition

South Carolina College- and Career-Ready (SCCCR) Pre-Calculus

PRE-CALCULUS GRADE 12

Algebra and Geometry Review (61 topics, no due date)

Partial Fractions. Combining fractions over a common denominator is a familiar operation from algebra:

This is a square root. The number under the radical is 9. (An asterisk * means multiply.)

GRE Prep: Precalculus

Solving Rational Equations

Higher Education Math Placement

WritePlacer Sample Topic. WritePlacer. Arithmetic

The Mathematics Diagnostic Test

Continuity. DEFINITION 1: A function f is continuous at a number a if. lim

Algebra Practice Problems for Precalculus and Calculus

Differentiation and Integration

Lesson 9: Radicals and Conjugates

Separable First Order Differential Equations

Prentice Hall Mathematics: Algebra Correlated to: Utah Core Curriculum for Math, Intermediate Algebra (Secondary)

x(x + 5) x 2 25 (x + 5)(x 5) = x 6(x 4) x ( x 4) + 3

FINAL EXAM SECTIONS AND OBJECTIVES FOR COLLEGE ALGEBRA

TRIGONOMETRY Compound & Double angle formulae

Core Maths C1. Revision Notes

Math 0980 Chapter Objectives. Chapter 1: Introduction to Algebra: The Integers.

Answer Key for California State Standards: Algebra I

Precalculus REVERSE CORRELATION. Content Expectations for. Precalculus. Michigan CONTENT EXPECTATIONS FOR PRECALCULUS CHAPTER/LESSON TITLES

5.1 Radical Notation and Rational Exponents

Algebra 2 Chapter 1 Vocabulary. identity - A statement that equates two equivalent expressions.

Techniques of Integration

is identically equal to x 2 +3x +2

Lesson 9: Radicals and Conjugates

Vocabulary Words and Definitions for Algebra

1.4 Compound Inequalities

MATH 095, College Prep Mathematics: Unit Coverage Pre-algebra topics (arithmetic skills) offered through BSE (Basic Skills Education)

Lecture 3 : The Natural Exponential Function: f(x) = exp(x) = e x. y = exp(x) if and only if x = ln(y)

ALGEBRA 2/TRIGONOMETRY

14.1. Basic Concepts of Integration. Introduction. Prerequisites. Learning Outcomes. Learning Style

6.4 Logarithmic Equations and Inequalities

Notes and questions to aid A-level Mathematics revision

CORRELATED TO THE SOUTH CAROLINA COLLEGE AND CAREER-READY FOUNDATIONS IN ALGEBRA

4.3 Lagrange Approximation

2.2 Separable Equations

2.3. Finding polynomial functions. An Introduction:

1 if 1 x 0 1 if 0 x 1

MBA Jump Start Program

Core Maths C3. Revision Notes

MATH 132: CALCULUS II SYLLABUS

Polynomial and Rational Functions

Algebra 1 Course Title

November 16, Interpolation, Extrapolation & Polynomial Approximation

REVIEW EXERCISES DAVID J LOWRY

Chapter 2: Linear Equations and Inequalities Lecture notes Math 1010

HIBBING COMMUNITY COLLEGE COURSE OUTLINE

xn. x must be written as x^(2n) and NOT as x^2n. Writing x^2n means 4x y would be written as 4 x^2 y^3 or with the multiplication mark as 4*x^2*y^3.

SAT Subject Math Level 2 Facts & Formulas

ab = c a If the coefficients a,b and c are real then either α and β are real or α and β are complex conjugates

a. all of the above b. none of the above c. B, C, D, and F d. C, D, F e. C only f. C and F

Algebra I Vocabulary Cards

Integrals of Rational Functions

1.3 Algebraic Expressions

LAKE ELSINORE UNIFIED SCHOOL DISTRICT

Solving Rational Equations and Inequalities

Florida Math Correlation of the ALEKS course Florida Math 0028 to the Florida Mathematics Competencies - Upper

Algebra Unpacked Content For the new Common Core standards that will be effective in all North Carolina schools in the school year.

SECTION 0.6: POLYNOMIAL, RATIONAL, AND ALGEBRAIC EXPRESSIONS

SIMPLIFYING SQUARE ROOTS

Mark Scheme (Results) January Pearson Edexcel International GCSE Mathematics A (4MA0/3H) Paper 3H

Radicals - Rationalize Denominators

Georgia Department of Education Kathy Cox, State Superintendent of Schools 7/19/2005 All Rights Reserved 1

SUNY ECC. ACCUPLACER Preparation Workshop. Algebra Skills

Algebra 2 Year-at-a-Glance Leander ISD st Six Weeks 2nd Six Weeks 3rd Six Weeks 4th Six Weeks 5th Six Weeks 6th Six Weeks

3.6. Partial Fractions. Introduction. Prerequisites. Learning Outcomes

Indiana State Core Curriculum Standards updated 2009 Algebra I

Math Review. for the Quantitative Reasoning Measure of the GRE revised General Test

How To Understand And Solve Algebraic Equations

South Carolina College- and Career-Ready (SCCCR) Algebra 1

Derive 5: The Easiest... Just Got Better!

PYTHAGOREAN TRIPLES KEITH CONRAD

Maple for Math Majors. 8. Manipulating and Simplifying Expressions 8.1. Introduction

LAYOUT OF THE KEYBOARD

MATH 21. College Algebra 1 Lecture Notes

Linear Equations and Inequalities

Creating, Solving, and Graphing Systems of Linear Equations and Linear Inequalities

LINEAR INEQUALITIES. less than, < 2x + 5 x 3 less than or equal to, greater than, > 3x 2 x 6 greater than or equal to,

Irrational Numbers. A. Rational Numbers 1. Before we discuss irrational numbers, it would probably be a good idea to define rational numbers.

Solutions to Homework 10

SAMPLE. Computer Algebra System (Classpad 330 using OS 3 or above) Application selector. Icolns that access working zones. Icon panel (Master toolbar)

36 CHAPTER 1. LIMITS AND CONTINUITY. Figure 1.17: At which points is f not continuous?

0.8 Rational Expressions and Equations

Tim Kerins. Leaving Certificate Honours Maths - Algebra. Tim Kerins. the date

Transcription:

Solving Equations and Inequalities Akram Kalantari Department of Mathematics Yazd University Akram Kalantari Solving Equations and Inequalities 1 / 22

1 Solving for x 2 Declaring Variables 3 Solving Equations with Several Variables 4 Manipulating expressions 5 Expanding and Factoring polynomials 6 Working with rational functions 7 Manipulating trigonometric expressions 8 Simplifying and Expanding expressions Akram Kalantari Solving Equations and Inequalities 2 / 22

Solving for x In Sage, equations and inequalities are defined using the operators ==, <=, and >= and will return either True, False, or, if there is a variable, just the equation/inequality. definition sage: 9 == 9 True sage: 9 <= 10 True sage: 3 x 10 == 5 3 x 10 == 5 Akram Kalantari Solving Equations and Inequalities 3 / 22

Solving for x To solve an equation or an inequality we use using the, aptly named, solve() command. For the moment, we will only solve for x. The section on variables below explains how to use other variables. solution sage: solve (3 x 2 == 5, x) [x == (7/3)] sage: solve(2 x 5 == 1, x) [x == 3] sage: solve(2 x 5 >= 17, x) [[x >= 11]] sage: solve (3 x 2 > 5, x) [[x > (7/3)]] Akram Kalantari Solving Equations and Inequalities 4 / 22

Solving for x Equations can have multiple solutions, Sage returns all solutions found as a list. multiple solutions sage: solve ( x 2 + x == 6, x ) [x == 3, x == 2] sage: solve ( 2 x 2 x + 1 == 0, x ) [x == 1/4 I sqrt (7) + 1/4, x == 1/4 I sqrt (7) + 1/4] sage: solve (exp (x) == 1, x) [x == I pi] Akram Kalantari Solving Equations and Inequalities 5 / 22

Solving for x The solution set of certain inequalities consists of the union and intersection of open intervals. inequalities solution sage: solve ( x 2 6 >= 3, x ) [[x <= 3], [x >= 3]] sage: solve ( x 2 6 <= 3, x ) [[x >= 3, x <= 3]] Akram Kalantari Solving Equations and Inequalities 6 / 22

Solving for x The solve() command will attempt to express the solution of an equation without the use of floating point numbers. If this cannot be done, it will return the solution in a symbolic form. solve() sage: solve (sin (x) == x, x) [x == sin (x)] sage: solve (exp (x) x == 0, x) [x == e x ] sage: solve (cos (x) sin (x) == 0, x) [sin (x) == cos (x)] sage: solve (cos (x) exp (x) == 0, x) [cos (x) == e x ] Akram Kalantari Solving Equations and Inequalities 7 / 22

Solving for x To find a numeric approximation of the solution we can use the f ind root() command. Which requires both the expression and a closed interval on which to search for a solution. find root() sage: find root (sin (x) == x, pi/2, pi/2) 0.0 sage: find root (sin (x) == cos (x), pi, 3 pi/2) 3.9269908169872414 This command will only return one solution on the specified interval, if one exists. It will not find the complete solution set over the entire real numbers. To find a complete set of solutions, the reader must use f ind root() repeatedly over cleverly selected intervals. Sadly, at this point, Sage cannot do all of the thinking for us. This feature is not planned until Sage 10. Akram Kalantari Solving Equations and Inequalities 8 / 22

Declaring Variables In the previous section we only solved equations in one variable, and we always used x. When a session is started, Sage creates one symbolic variable, x, and it can be used to solve equations. If you want to use an additional symbolic variable, you have to declare it using the var() command. The name of a symbolic variable can be a letter, or a combination of letters and numbers: var() sage: sage: sage: y, z, t = var( y z t ) phi, theta, rho = var( phi theta rho ) x1, x2 = var( x1 x2 ) Note Variable names cannot contain spaces, for example square root is not a valid variable name, whereas square root is. Akram Kalantari Solving Equations and Inequalities 9 / 22

Declaring Variables Attempting to use a symbolic variable before it has been declared will result in a NameError. NameError sage: u NameError: name u is not defined sage: solve (u 2 1, u) NameError Traceback (most recent call last) NameError: name u is not defined Akram Kalantari Solving Equations and Inequalities 10 / 22

Declaring Variables We can un-declare a symbolic variable, like the variable phi defined above, by using the restore() command. restore() sage: restore( phi ) sage: phi NameError: name phi is not defined Akram Kalantari Solving Equations and Inequalities 11 / 22

Solving Equations with Several Variables Small systems of linear equations can be also solved using solve(), provided that all the symbolic variables have been declared. The equations must be input as a list, followed by the symbolic variables. The result may be either a unique solution, infinitely many solutions, or no solutions at all. solve() sage: solve ([3 x y == 2, 2 x y == 1], x, y) [[x == (1/5), y == ( 7/5)]] sage: solve ([2 x + y == 1, 4 x 2 y == 2], x, y) [[x == 1/2 r1 1/2, y == r1]] sage: solve ([2 x y == 1, 2 x y == 2], x, y) [] Akram Kalantari Solving Equations and Inequalities 12 / 22

Solving Equations with Several Variables In the second equation above, r1 signifies that there is a free variable which parametrizes the solution set. When there is more than one free variable, Sage enumerates them r1, r2,, rk. free variable sage: solve ([2 x + 3 y + 5 z == 1, 4 x + 6 y + 10 z == 2, 6 x + 9 y + 15 z == 3], x, y, z) [[x == 5/2 r1 3/2 r2 + 1/2, y == r2, z == r1]] solve() can be very slow for large systems of equations. For these systems, it is best to use the linear algebra functions as they are quite efficient. Akram Kalantari Solving Equations and Inequalities 13 / 22

Solving Equations with Several Variables Solving inequalities in several variables can lead to complicated expressions, since the regions they define are complicated. In the example below, Sages solution is a list containing the point of interesection of the lines, then two rays, then the region between the two rays. solve() sage: solve ([x y >= 2, x + y <= 3], x, y) [[x == (5/2), y == (1/2)], [x == y+3, y < (1/2)], [x == y+2, y < (1/2)], sage: solve ([2 x y < 4, x + y > 5, x y < 6], x, y) [[ y + 5 < x, x < 1/2 y + 2, 2 < y]] Akram Kalantari Solving Equations and Inequalities 14 / 22

Solving Equations with Several Variables Finding the roots of an equation (also known as the zeros of the equation) is closely related to solving an equation. Callable symbolic expressions in Sage have a special method that finds their roots. roots() f(x) = 2 x 2 + 3 x 1 f.roots() [( 1/4 sqrt(17) 3/4, 1), (1/4 sqrt(17) 3/4, 1)] f(x) = x 2 2 x + 1 f.roots() [(1, 2)] Akram Kalantari Solving Equations and Inequalities 15 / 22

Manipulating expressions There are many ways to manipulate relational expressions with Sage. manipulating expressions exp1 = (x + 3) 3 == (x 1) 2 exp1.lhs() (x + 3) 3 exp1.rhs() (x 1) 2 exp1.multiply both sides(x 2 ) x 2 (x + 3) 3 == x 2 (x 1) 2 exp1.add to both sides(7 x) (x + 3) 3 + 7 x == (x 1) 2 + 7 x exp1.divide both sides(7) 1/7 (x + 3) 3 == 1/7 (x 1) 2 Akram Kalantari Solving Equations and Inequalities 16 / 22

Expanding and Factoring polynomials Expanding a polynomial is the process of converting the polynomial from a product of sums to a sum of products. Factoring is the opposite process, in which a sum of products is converted into a product of factors. expanding and factoring polynomials expr = (y 7)/(x 2 + 1) == x 3 5 expr.expand() y/(x 2 + 1) 7/(x 2 + 1) == x 3 5 expr.expand( left ).lhs() y/(x 2 + 1) 7/(x 2 + 1) expr.expand( right ).rhs() x 3 5 expr.f actor() (y 7)/(x 2 + 1) == x 3 5 Akram Kalantari Solving Equations and Inequalities 17 / 22

Working with rational functions working with rational functions var( s ) f(s) = (s + 1)/(s 2 (s + 2) 3 ) f.numerator() s > s + 1 f.denominator() s > (s 2 (s + 2) 3 ) f.expand rational() s > 1/((s + 2) 3 s) + 1/((s + 2) 3 s 2 ) f.partial f raction() s > 1/16/(s + 2) 1/16/s + 1/8/s 2 1/4(s + 2) 3 We defined a rational function, and demonstrated the utility methods numerator and denominator to obtain different parts of the expression.the method expand rational separates the expression into a sum of terms by multiplying out products of sums and exponentials, splitting the numerator into terms, and distributing multiplication over addition. The method partial fraction returns the partial fraction expansion of the expression. Akram Kalantari Solving Equations and Inequalities 18 / 22

Manipulating trigonometric expressions Expressions involving trigonometric functions can be difficult to manipulate because of the numerous trigonometric identities that can be used. Fortunately, Sage can automate this process. manipulating trigonometric expressions var( x y ) f(x, y) = sin(x) cos(x) 3 + sin(y) 2 g(x, y) = f.reduce trig() (x, y) > 1 2 cos(2y) + 1 8 sin(4x) + 1 4 sin(2x) + 1 2 g.expand trig() or g.trig expand() 1 2 sin(x)3 cos(x) + 1 2 sin(x) cos(x)3 + 1 2 sin(x) cos(x) + 1 2 sin(y)2 1 2 cos(y)2 g.expand trig().simplif y trig() or g.expand trig().trig simplif y() cos(x) 3 sin(x) + sin(y) 2 Akram Kalantari Solving Equations and Inequalities 19 / 22

Simplifying and Expanding expressions There are special rules for manipulating logarithms and radicals, so Sage has special methods for expanding and simplifying expressions involving these operations. There is also a separate method for simplifying rational expressions. simplifying expressions : Logarithms, rational functions, and radicals f(x) = log(x 2 sin(x)/sqrt(1 + x)) f.expand log() 1/2 log(x + 1) + 2 log(x) + log(sin(x)) f.simplify log() x > log(x 2 sin(x)/sqrt(1 + x)) f(x) = (x + 1)/(x 2 + x) f.simplif y rational() x > 1/x f(x) = sqrt(x 2 + x)/sqrt(x) f.simplif y radical() x > sqrt(x + 1) Akram Kalantari Solving Equations and Inequalities 20 / 22

Simplifying and Expanding expressions Figure: The methods available in Sage for simplifying and expanding expressions Akram Kalantari Solving Equations and Inequalities 21 / 22

Simplifying and Expanding expressions THE END Akram Kalantari Solving Equations and Inequalities 22 / 22