# 49: Complex Rational Expressions - Mathematics

49: Complex Rational Expressions - Mathematics

## Classes

How individual class transfers for major preparation can be found at Transfer Center. Before selecting any courses, please see a counselor for assistance in planning your program.

Course Outlines of Record (COR) contain the uniform standards applied to all sections of a given course upon which each student will be evaluated in the process of receiving a formal grade. All course outlines of record for Santa Monica College are stored on Curriucnet one can search by course without a username and password.

## 1.6 Rational Expressions

Notice that the result is a polynomial expression divided by a second polynomial expression. In this section, we will explore quotients of polynomial expressions.

### Simplifying Rational Expressions

The quotient of two polynomial expressions is called a rational expression . We can apply the properties of fractions to rational expressions, such as simplifying the expressions by canceling common factors from the numerator and the denominator. To do this, we first need to factor both the numerator and denominator. Let’s start with the rational expression shown.

We can factor the numerator and denominator to rewrite the expression.

Then we can simplify that expression by canceling the common factor ( x + 4 ) . ( x + 4 ) .

### How To

Given a rational expression, simplify it.

### Example 1

#### Simplifying Rational Expressions

Simplify x 2 − 9 x 2 + 4 x + 3 . x 2 − 9 x 2 + 4 x + 3 .

#### Analysis

We can cancel the common factor because any expression divided by itself is equal to 1.

No. A factor is an expression that is multiplied by another expression. The x 2 x 2 term is not a factor of the numerator or the denominator.

### Multiplying Rational Expressions

Multiplication of rational expressions works the same way as multiplication of any other fractions. We multiply the numerators to find the numerator of the product, and then multiply the denominators to find the denominator of the product. Before multiplying, it is helpful to factor the numerators and denominators just as we did when simplifying rational expressions. We are often able to simplify the product of rational expressions.

### How To

Given two rational expressions, multiply them.

1. Factor the numerator and denominator.
2. Multiply the numerators.
3. Multiply the denominators.
4. Simplify.

### Example 2

#### Multiplying Rational Expressions

Multiply the rational expressions and show the product in simplest form:

#### Solution

Multiply the rational expressions and show the product in simplest form:

### Dividing Rational Expressions

Division of rational expressions works the same way as division of other fractions. To divide a rational expression by another rational expression, multiply the first expression by the reciprocal of the second. Using this approach, we would rewrite 1 x ÷ x 2 3 1 x ÷ x 2 3 as the product 1 x ⋅ 3 x 2 . 1 x ⋅ 3 x 2 . Once the division expression has been rewritten as a multiplication expression, we can multiply as we did before.

### How To

Given two rational expressions, divide them.

1. Rewrite as the first rational expression multiplied by the reciprocal of the second.
2. Factor the numerators and denominators.
3. Multiply the numerators.
4. Multiply the denominators.
5. Simplify.

### Example 3

#### Dividing Rational Expressions

Divide the rational expressions and express the quotient in simplest form:

#### Solution

Divide the rational expressions and express the quotient in simplest form:

### Adding and Subtracting Rational Expressions

Adding and subtracting rational expressions works just like adding and subtracting numerical fractions. To add fractions, we need to find a common denominator. Let’s look at an example of fraction addition.

We have to rewrite the fractions so they share a common denominator before we are able to add. We must do the same thing when adding or subtracting rational expressions.

The easiest common denominator to use will be the least common denominator , or LCD. The LCD is the smallest multiple that the denominators have in common. To find the LCD of two rational expressions, we factor the expressions and multiply all of the distinct factors. For instance, if the factored denominators were ( x + 3 ) ( x + 4 ) ( x + 3 ) ( x + 4 ) and ( x + 4 ) ( x + 5 ) , ( x + 4 ) ( x + 5 ) , then the LCD would be ( x + 3 ) ( x + 4 ) ( x + 5 ) . ( x + 3 ) ( x + 4 ) ( x + 5 ) .

Once we find the LCD, we need to multiply each expression by the form of 1 that will change the denominator to the LCD. We would need to multiply the expression with a denominator of ( x + 3 ) ( x + 4 ) ( x + 3 ) ( x + 4 ) by x + 5 x + 5 x + 5 x + 5 and the expression with a denominator of ( x + 4 ) ( x + 5 ) ( x + 4 ) ( x + 5 ) by x + 3 x + 3 . x + 3 x + 3 .

## 7.3 Simplify Complex Rational Expressions

Complex fractions are fractions in which the numerator or denominator contains a fraction. We previously simplified complex fractions like these:

In this section, we will simplify complex rational expressions, which are rational expressions with rational expressions in the numerator or denominator.

### Complex Rational Expression

A complex rational expression is a rational expression in which the numerator and/or the denominator contains a rational expression.

Here are a few complex rational expressions:

Remember, we always exclude values that would make any denominator zero.

We will use two methods to simplify complex rational expressions.

We have already seen this complex rational expression earlier in this chapter.

We noted that fraction bars tell us to divide, so rewrote it as the division problem:

Then, we multiplied the first rational expression by the reciprocal of the second, just like we do when we divide two fractions.

This is one method to simplify complex rational expressions. We make sure the complex rational expression is of the form where one fraction is over one fraction. We then write it as if we were dividing two fractions.

### Example 7.24

Simplify the complex rational expression by writing it as division: 6 x − 4 3 x 2 − 16 . 6 x − 4 3 x 2 − 16 .

#### Solution

Are there any value(s) of x that should not be allowed? The original complex rational expression had denominators of x − 4 x − 4 and x 2 − 16 . x 2 − 16 . This expression would be undefined if x = 4 x = 4 or x = −4 . x = −4 .

Simplify the complex rational expression by writing it as division: 2 x 2 − 1 3 x + 1 . 2 x 2 − 1 3 x + 1 .

Simplify the complex rational expression by writing it as division: 1 x 2 − 7 x + 12 2 x − 4 . 1 x 2 − 7 x + 12 2 x − 4 .

Fraction bars act as grouping symbols. So to follow the Order of Operations, we simplify the numerator and denominator as much as possible before we can do the division.

### Example 7.25

Simplify the complex rational expression by writing it as division: 1 3 + 1 6 1 2 − 1 3 . 1 3 + 1 6 1 2 − 1 3 .

#### Solution

 Simplify the numerator and denominator. Find the LCD and add the fractions in the numerator. Find the LCD and subtract the fractions in the denominator. Simplify the numerator and denominator. Rewrite the complex rational expression as a division problem. Multiply the first by the reciprocal of the second. Simplify. 3

Simplify the complex rational expression by writing it as division: 1 2 + 2 3 5 6 + 1 12 . 1 2 + 2 3 5 6 + 1 12 .

Simplify the complex rational expression by writing it as division: 3 4 − 1 3 1 8 + 5 6 . 3 4 − 1 3 1 8 + 5 6 .

We follow the same procedure when the complex rational expression contains variables.

### Example 7.26

#### How to Simplify a Complex Rational Expression using Division

Simplify the complex rational expression by writing it as division: 1 x + 1 y x y − y x . 1 x + 1 y x y − y x .

#### Solution

Simplify the complex rational expression by writing it as division: 1 x + 1 y 1 x − 1 y . 1 x + 1 y 1 x − 1 y .

Simplify the complex rational expression by writing it as division: 1 a + 1 b 1 a 2 − 1 b 2 1 a + 1 b 1 a 2 − 1 b 2 .

We summarize the steps here.

### How To

#### Simplify a complex rational expression by writing it as division.

1. Step 1. Simplify the numerator and denominator.
2. Step 2. Rewrite the complex rational expression as a division problem.
3. Step 3. Divide the expressions.

### Example 7.27

Simplify the complex rational expression by writing it as division: n − 4 n n + 5 1 n + 5 + 1 n − 5 . n − 4 n n + 5 1 n + 5 + 1 n − 5 .

#### Solution

 Simplify the numerator and denominator. Find common denominators for the numerator and denominator. Simplify the numerators. Subtract the rational expressions in the numerator and add in the denominator. Simplify. (We now have one rational expression over one rational expression.) Rewrite as fraction division. Multiply the first times the reciprocal of the second. Factor any expressions if possible. Remove common factors. Simplify.

Simplify the complex rational expression by writing it as division: b − 3 b b + 5 2 b + 5 + 1 b − 5 . b − 3 b b + 5 2 b + 5 + 1 b − 5 .

Simplify the complex rational expression by writing it as division: 1 − 3 c + 4 1 c + 4 + c 3 . 1 − 3 c + 4 1 c + 4 + c 3 .

### Simplify a Complex Rational Expression by Using the LCD

We “cleared” the fractions by multiplying by the LCD when we solved equations with fractions. We can use that strategy here to simplify complex rational expressions. We will multiply the numerator and denominator by the LCD of all the rational expressions.

Let’s look at the complex rational expression we simplified one way in Example 7.25. We will simplify it here by multiplying the numerator and denominator by the LCD. When we multiply by LCD LCD LCD LCD we are multiplying by 1, so the value stays the same.

### Example 7.28

Simplify the complex rational expression by using the LCD: 1 3 + 1 6 1 2 − 1 3 . 1 3 + 1 6 1 2 − 1 3 .

#### Solution

 The LCD of all the fractions in the whole expression is 6. Clear the fractions by multiplying the numerator and denominator by that LCD. Distribute. Simplify.

Simplify the complex rational expression by using the LCD: 1 2 + 1 5 1 10 + 1 5 . 1 2 + 1 5 1 10 + 1 5 .

Simplify the complex rational expression by using the LCD: 1 4 + 3 8 1 2 − 5 16 . 1 4 + 3 8 1 2 − 5 16 .

We will use the same example as in Example 7.26. Decide which method works better for you.

### Example 7.29

#### How to Simplify a Complex Rational Expressing using the LCD

Simplify the complex rational expression by using the LCD: 1 x + 1 y x y − y x . 1 x + 1 y x y − y x .

#### Solution

Simplify the complex rational expression by using the LCD: 1 a + 1 b a b + b a . 1 a + 1 b a b + b a .

Simplify the complex rational expression by using the LCD: 1 x 2 − 1 y 2 1 x + 1 y . 1 x 2 − 1 y 2 1 x + 1 y .

### How To

#### Simplify a complex rational expression by using the LCD.

1. Step 1. Find the LCD of all fractions in the complex rational expression.
2. Step 2. Multiply the numerator and denominator by the LCD.
3. Step 3. Simplify the expression.

Be sure to start by factoring all the denominators so you can find the LCD.

### Example 7.30

Simplify the complex rational expression by using the LCD: 2 x + 6 4 x − 6 − 4 x 2 − 36 . 2 x + 6 4 x − 6 − 4 x 2 − 36 .

#### Solution

Simplify the complex rational expression by using the LCD: 3 x + 2 5 x − 2 − 3 x 2 − 4 . 3 x + 2 5 x − 2 − 3 x 2 − 4 .

Simplify the complex rational expression by using the LCD: 2 x − 7 − 1 x + 7 6 x + 7 − 1 x 2 − 49 . 2 x − 7 − 1 x + 7 6 x + 7 − 1 x 2 − 49 .

Be sure to factor the denominators first. Proceed carefully as the math can get messy!

### Example 7.31

Simplify the complex rational expression by using the LCD: 4 m 2 − 7 m + 12 3 m − 3 − 2 m − 4 . 4 m 2 − 7 m + 12 3 m − 3 − 2 m − 4 .

#### Solution

Simplify the complex rational expression by using the LCD: 3 x 2 + 7 x + 10 4 x + 2 + 1 x + 5 . 3 x 2 + 7 x + 10 4 x + 2 + 1 x + 5 .

Simplify the complex rational expression by using the LCD: 4 y y + 5 + 2 y + 6 3 y y 2 + 11 y + 30 . 4 y y + 5 + 2 y + 6 3 y y 2 + 11 y + 30 .

### Example 7.32

Simplify the complex rational expression by using the LCD: y y + 1 1 + 1 y − 1 . y y + 1 1 + 1 y − 1 .

#### Solution

Simplify the complex rational expression by using the LCD: x x + 3 1 + 1 x + 3 . x x + 3 1 + 1 x + 3 .

Simplify the complex rational expression by using the LCD: 1 + 1 x − 1 3 x + 1 . 1 + 1 x − 1 3 x + 1 .

### Media

Access this online resource for additional instruction and practice with complex fractions.

### Section 7.3 Exercises

#### Practice Makes Perfect

Simplify a Complex Rational Expression by Writing it as Division

In the following exercises, simplify each complex rational expression by writing it as division.

x − 2 x x + 3 1 x + 3 + 1 x − 3 x − 2 x x + 3 1 x + 3 + 1 x − 3

y − 2 y y − 4 2 y − 4 + 2 y + 4 y − 2 y y − 4 2 y − 4 + 2 y + 4

Simplify a Complex Rational Expression by Using the LCD

In the following exercises, simplify each complex rational expression by using the LCD.

5 z 2 − 64 + 3 z + 8 1 z + 8 + 2 z − 8 5 z 2 − 64 + 3 z + 8 1 z + 8 + 2 z − 8

3 s + 6 + 5 s − 6 1 s 2 − 36 + 4 s + 6 3 s + 6 + 5 s − 6 1 s 2 − 36 + 4 s + 6

4 a 2 − 2 a − 15 1 a − 5 + 2 a + 3 4 a 2 − 2 a − 15 1 a − 5 + 2 a + 3

5 b 2 − 6 b − 27 3 b − 9 + 1 b + 3 5 b 2 − 6 b − 27 3 b − 9 + 1 b + 3

5 c + 2 − 3 c + 7 5 c c 2 + 9 c + 14 5 c + 2 − 3 c + 7 5 c c 2 + 9 c + 14

6 d − 4 − 2 d + 7 2 d d 2 + 3 d − 28 6 d − 4 − 2 d + 7 2 d d 2 + 3 d − 28

In the following exercises, simplify each complex rational expression using either method.

3 b 2 − 3 b − 40 5 b + 5 − 2 b − 8 3 b 2 − 3 b − 40 5 b + 5 − 2 b − 8

x − 3 x x + 2 3 x + 2 + 3 x − 2 x − 3 x x + 2 3 x + 2 + 3 x − 2

#### Self Check

ⓐ After completing the exercises, use this checklist to evaluate your mastery of the objectives of this section.

ⓑ After looking at the checklist, do you think you are well-prepared for the next section? Why or why not?

As an Amazon Associate we earn from qualifying purchases.

Want to cite, share, or modify this book? This book is Creative Commons Attribution License 4.0 and you must attribute OpenStax.

If you are redistributing all or part of this book in a print format, then you must include on every physical page the following attribution:

• Use the information below to generate a citation. We recommend using a citation tool such as this one.
• Authors: Lynn Marecek, Andrea Honeycutt Mathis
• Publisher/website: OpenStax
• Book title: Intermediate Algebra 2e
• Publication date: May 6, 2020
• Location: Houston, Texas
• Book URL: https://openstax.org/books/intermediate-algebra-2e/pages/1-introduction
• Section URL: https://openstax.org/books/intermediate-algebra-2e/pages/7-3-simplify-complex-rational-expressions

© Jan 21, 2021 OpenStax. Textbook content produced by OpenStax is licensed under a Creative Commons Attribution License 4.0 license. The OpenStax name, OpenStax logo, OpenStax book covers, OpenStax CNX name, and OpenStax CNX logo are not subject to the Creative Commons license and may not be reproduced without the prior and express written consent of Rice University.

## 49: Complex Rational Expressions - Mathematics

College Algebra
Tutorial 11: Complex Rational Expressions

Tutorial

 Complex Fraction

In other words, there is at least one small fraction within the overall fraction.

Some examples of complex fractions are:

 Method I Simplifying a Complex Fraction

*Rewrite fractions with LCD of ab

*Rewrite div. as mult. of reciprocal

*Divide out a common factor of ab

*Rewrite fractions with LCD of ( x - 4)

*Rewrite fractions with LCD of ( x - 4)

*Rewrite div. as mult. of reciprocal

*Divide out a common factor of ( x - 4)

 Method II Simplifying a Complex Fraction

*Mult. num. and den. by ( x + 1)( x - 1)

*Divide out the common factor of x

*Mult. num. and den. by ( x + 5)( x - 5)

Practice Problems 1a - 1b: Simplify.

Videos at this site were created and produced by Kim Seward and Virginia Williams Trice.
Last revised on Dec. 15, 2009 by Kim Seward.

## How To : Simplify complex rational expressions

In order to simplify complex rational expressions, it is important to be able to find the lowest common denominator. Complex rational expressions are fractions that are divided by fractions. When you have found the lowest common denominator, then, you should multiply both fractions by the common denominator. With 4/x divided by 3/y, the common denominator it xy. Therefore, you should multiply the top and bottom by xy. Then, simplify the expression. This will give you 4y/3x. Regardless of how complicated the problem is the process will always be exactly the same as this simple problem. Look at all of the denominators. Then, figure out what the lowest common denominator is. Then, multiply all of the equations by the common denominator. Then, simplify it. Then, solve it. Make sure it's in its simplest form.

Want to master Microsoft Excel and take your work-from-home job prospects to the next level? Jump-start your career with our Premium A-to-Z Microsoft Excel Training Bundle from the new Gadget Hacks Shop and get lifetime access to more than 40 hours of Basic to Advanced instruction on functions, formula, tools, and more.

## 49: Complex Rational Expressions - Mathematics

Recall, polynomials behave very much like integers. Just as the sums, differences, and products of integers are integers themselves -- sums, differences, and products of polynomials are always themselves polynomials. As for division, quotients of integers can sometimes be integers, but they need not be, and quotients of two polynomials are sometimes expressible as a polynomial, but other times they are not. Integers can be factored polynomials can be factored. There are other similarities as well, although that is a discussion best saved for another time.

Let us consider more deeply just what happens when we divide two polynomials instead.

First, just as we name quotients of two integers rational values, we call quotients of two polynomials rational expressions. As this naming convention suggests, these two mathematical concepts are intimately connected.

We can reduce rational values to "lowest terms" we can likewise reduce rational expressions to "lowest terms". We can add, subtract, multiply, and divide rational values, and provided we don't divide by zero the result is always expressible as a rational value. The exact same can be said of rational expressions.

Further, since we often think of the variables in polynomials (and hence the polynomials themselves) as having real values, the way in which we reduce, add, subtract, multiply and divide rational expressions exactly parallels the same operations on their numerical counterparts.

As multiplication is mechanically the simplest of these four operations with regard to rational values, let us begin there.

### Multiplying and Simplifying Rational Expressions

As suggested above, products of both rational values and rational expressions are found in the exact same way -- multiply the numerators and multiply the denominators to find the numerator and denominator, respectively, of the result.

This mechanism for finding a product gives us a means to simplify rational expressions.

Consider the analogous process for rational values.

For example, to simplify (i.e., reduce to "lowest terms") the fraction $frac<385><2730>$ we factor the numerator and denominator, and then re-group any common factors found between the two to form a multiplication by "one", which can then be cancelled, as shown below$equire$

In a like manner, we can simplify a rational expression by factoring both the numerator and denominator and then cancelling any common factors found between the two, as shown by the example below (you may assume $b e 3$):

The above technique suggests a better way to find simplified products of rational values (and hence, rational expressions).

Consider what happens if one just multiplies both numerators together and both denominators together. If we wish to have a completely simplified answer, we'll just need to turn around and factor these two products completely, so that common factors can be found.

Doesn't it make more sense to instead factor both numerators and both denominators, and look for common factors at that time? Any factors common to one of the two numerators and one of the two denominators may similarly be re-grouped to form a multiplication by "one" and thus, canceled.

Then -- and only then -- we multiply together the remaining factors to form the numerator and denominator of our final answer.

For rational values, this helps keep the numbers small, which in turn makes factoring easier, as shown below:

For rational expressions, the same strategy minimizes the degrees of the polynomials in the resulting numerator and denominator. This strategy of factor-cancel-combine is very important, as factoring arbitrary polynomials of large degree is extremely difficult -- and polynomials of large degree is exactly what we often produce if we fail to cancel common factors before expanding the products in the numerator and denominator.

The following provides an example, assuming all of the variables present have values such that all of the expressions below are defined (i.e., no denominator is zero).

Note that above we treat each rational expression as a value -- one associated with some particular values of $x$, $y$, and $z$. &dagger This explains the need for the assumption that these variables' values are chosen so that no zero denominators are present.

### Dividing Rational Expressions

Whether one is talking about rational values or rational expressions -- division is of course just a multiplication by a reciprical (i.e., the multiplicative inverse). So given a quotient, one can always rewrite the expression as a product, and proceed as suggested above.

Don't forget that a quotient $a div b$ can also be written as a fraction $displaystyle>$.

As such, we could have began the last example with $frac>>,,>> = cdots$ and it would have been simplified in the exact same manner.

Recall, adding rational values is a bit more involved than multiplying or dividing them. Working with polynomials instead of integers in the numerators and denominators further complicates things, since either multiplying them together or factoring them is often difficult to do by inspection -- especially when more than two polynomials are involved.

Given this, let us first review how rational values are normally added together, and then how this process can be tweaked a bit so that it better generalizes to a technique for adding rational expressions.

When the denominators of the two fractions are the same, we simply add the numerators, putting their sum over the common denominator. That is to say,

However, if the denominators of the two fractions differ, then we first have to re-express the fractions with a common denominator before we proceed. Often this is done by inspection when the numbers involved are small.

For example, noticing that $42$ is the smallest integer divisible by both $6$ and $21$, we could determine

However, when the numbers involved are larger, finding the common denominator by inspection is much more difficult. As such, let us consider a slightly different course of action.

First, notice that the least common denominator is a multiple of both denominators, and thus contains in its factorization all of the factors of the denominators in the fractions being summed. To clarify, consider the following example where the denominators present have been completely factored:

The first denominator's factored form tells us that the common denominator we seek must have factors $3$ and $7^2$. The second denominator's factored form tells us that the common denominator must have factors $7$ (which we already knew) and $13$.

Thus, the common denominator must minimally have factors $3$, $7^2$, and $13$. Any additional factors only serves to increase the value, so the least common denominator is simply $3 cdot 7^2 cdot 13$.

There is no need to multiply this out yet (indeed, in some problems we will never have to find this product -- so one shouldn't waste time doing so). Instead, we just ask ourselves what factors do the denominators of our summands lack that are present in the common denominator?

Equivalently, but more efficiently -- as soon as we factor the denominators of the two fractions we wish to add, we ask ourselves the question: "What does each denominator lack as a factor that the other denominator has present as a factor?"

In the example above, the first denominator lacks a factor of $13$, the second lacks a factor of $3$ and a (second) factor of $7$.

We can add these factors to each denominator with the some clever multiplications by "one", and then add the resulting fractions as their common denominators are now equal, as shown below:

Note, at this moment we want to avoid the temptation to multiply out the denominator of our result. We would like to have our final answer in simplified form (i.e., "lowest terms"), which requires that all common factors between the numerator and denominator be eliminated. So why would we multiply out the denominator only to turn around and factor it again so that we can identify any such common factors?

Indeed, the more expedient course of action here is to factor the numerator and then cancel any appropriate common factors that might be found. Only after that has been done, should we multiply everything out, as shown below

This slightly modified technique for adding rational values now extends nicely to adding rational expressions.

### Subtracting Rational Expressions

Just as with subtracting rational values, to subtract two rational expressions, we simply "add the negative" (i.e., $a - b = a + (-1)b$).

From there, we can proceed with the technique described in the previous section to add rational expressions:

### Complex Fractions

When a fraction's numerator and denominator consist of rational expressions -- or sums or differences of the same -- we call the fraction a complex fraction. The following are some examples:

Given their structure -- and provided that denominators remain non-zero -- we can always reduce such expressions down to a rational function by following the steps below:

1. collapse the numerator to a single rational expression
2. collapse the denominator to a single rational expression and then
3. find the quotient of these two rational expressions via multiplying by a reciprical.

Often, we can be much more efficient by multiplying by a "well-chosen value of one" first. This is certainly the case with the previous example, as shown below.

As can be seen above, we choose the factors of our "well-chosen value of one" so that they will reduce as many rational expressions to polynomials as possible in our overall expression.

&dagger: At some time in the near future, we will treat similar expressions as functions instead. At that time we will have to revisit exactly what we mean by two such expressions being "equal". The reinterpretation will be subtle, but will have important consequences, especially with regard to the evaluation of certain expressions in calculus called "limits".

To set the path for directories which Matlab should see:
path(path, 'c:mydocu

Write this in file "startup.m" in the directory \$Matlab oolboxlocal

Write m-file to define functions or executable commands, which can be called by writing the name of the file.

To break a line use . (three dots).

-ascii Use 8-digit number format

-ascii -double Use 16-digit number format

-ascii -double -tabs Delimit array elements with tabs.

-v4 Create a file for Matlab4

-append Append data to an existing MAT-file

where x and y are arrays of the same dimension.

To change the size of the marker use 'MarkerSize', # (12, for example)

Options: axis([x_initial x_final y_initial y_final])

axis auto re-enable automatic limits selection

grid off % to delete the grid

We can identify multiple plots by using legend. Ex:

COLORDEF Set color defaults.

COLORDEF WHITE or COLORDEF BLACK changes the color defaults on the root so that subsequent figures produce plots with a white or
black axes background color. The figure background color is changed to be a shade of gray and many other defaults are changed so that there will
be adequate contrast for most plots.

text(x,y,'. ','Fontsize'. 'FontName','Times')

Fontsize defines the dimension of the fonts, FontName the fonts

To display multiple plots in the same window:

where the window is partitioned in a m x n matrix, and p selects the position of the current subplot

To open a new graphic window, type:

To print a figure in a eps file, with a TIFF preview:

print -depsc2 -tiff figure.eps

Differential Equation Solvers

To solve a differential equation numerically, there are different methods:

Define a function in a separate m-file:

dy = zeros(4,1)
dy(1) = y(3) %y(1)=x
dy(2) = y(4) %y(2)=y
dy(3) = -y(3) %y(3)=v_x
dy(4) = -y(4)-9.81 %y(4)=v_y

The command to compute the solution is:

[T, Y] = ode. ('function', [T_initial T_final], [initial conditions], options)

To set options, write before the previous line:

options = odeset('RelTol', . 'AbsTol', [ as many as variables in the ODE])

To stop integration at a given event:
In the main file type:

options = odeset(. 'Events','on') % This checks for the event in the function
[T,Y, te,ye,ie]= solver('function', [tspan],[Incon], options)

function varargout = myfunction(t,y,flag) % varargout allows any number of output arguments from a function.
switch flag % open switch

case '' % no flag
dy=zeros(n,1)
dy(1)=.
.
dy(n)=.
[varargout<1>]=dy

case 'events'
[varargout<1:3>]=events(t,y)

function [value, isterminal,direction]= events(t,y)
value=. % variable to be checked
isterminal =. % a vector of 1 or 0 of the same dimension of value. 1 stop the integration.
direction=. % a vector of the same dimension of value. Specify the direction of zero crossing:
% -1 for negative value, 1 for positive and 0 for no preference.

h=plot(x1,y1, 'marker','o', 'markersize', n,'erase','xor') % This set the graphic object, define a marker type ('o'), and
% size (n), and the appearance of the object when the graphic
% screen is redrawn (xor erase previous version of the object,
% none leave previous versions on the screen.

x1=. % This can also go before.
y1=.

axis ([. ]) axis square % To get same scale on the plot and a defined range.

for k=2:length(T) % Start for cycle, with arbitrary number of iterations
set(h1, 'xdata', x1, 'ydata', y1) % Draw the point at the new position
drawnow % Flushes the graphics output to the screen without waiting for
end % end for cycle

for k=1:n
plot(whatever)
M(k) = getframe(gcf) % That store the plots in a matrix, (gcf) is to get the whole screen, axis and label
included
end

movie(M) % That project the movie

movie2avi(M,'filename', 'fps',#) % fps =frame per second (usually 16)

To obtain the dimension of an array:

To create a vector of integers:

A list of functions which provide column-oriented data analysis can be found at:

Outliers: how to eliminate them.

You can remove outliers or misplaced data points from a data set in much the same manner as NaNs. For the vehicle traffic count
data, the mean and standard deviations of each column of the data are (count is the data file):

mu = mean(count)
sigma = std(count)

The number of rows with outliers greater than three standard deviations is obtained with:

[n,p] = size(count)
outliers = abs(count - mu(ones(n, 1),:)) > 3*sigma(ones(n, 1),:)
nout = sum(outliers)
nout =
1 0 0

There is one outlier in the first column. Remove this entire observation with

POLYFIT Fit polynomial to data.

POLYFIT(X,Y,N) finds the coefficients of a polynomial P(X) of degree N that fits the data, P(X(I))

=Y(I), in a least-squares sense.

[P,S] = POLYFIT(X,Y,N) returns the polynomial coefficients P and a structure S for use with POLYVAL to obtain error estimates on
predictions. If the errors in the data, Y, are independent normal with constant variance, POLYVAL will produce error bounds which
contain at least 50% of the predictions.

The structure S contains the Cholesky factor of the Vandermonde matrix (R), the degrees of freedom (df), and the norm of the
residuals (normr) as fields.

To find the time behavior of a ditribution assumed linear

To find for the error in the exponent p, you need to determine the quantity S of above:

p_min=polyfit(t, y+delta,1)
p_max=polyfit(t,y-delta,1)

The error in p is the differnce between p_min and p_max

To compute the module of an angle (normalized to 360 o ).

Creating Symbolic Variables and Expressions

To create a symbolic variable:

To create more than one (more practical command):

syms a b c x (equivalent to a = sym('a') b = sym('b') etc.)

To simplify a symbolic expression use simplify(f)

Symbolic and Numeric Conversions

sym(t,'f') returns a symbolic floating-point representation

sym(t,'r') returns the rational form

(default setting for sym, sym(t,'r') is equivalent to sym(t)).

A particular effective use of sym is to convert a matrix from numeric to symbolic form. E.g.

1.0000 0.5000 0.3333
0.5000 0.3333 0.2500
0.3333 0.2500 0.2000

By applying sym to A

[ 1, 1/2, 1/3]
[ 1/2, 1/3, 1/4]
[ 1/3, 1/4, 1/5]

Other options of sym are e (returns the rational form of t plus the difference between the theoretical rational expression for t and its actual (machine) floating-point value in terms of eps (the floating-point relative accuracy. E.g.

and d, which returns the decimal expansion of t up to the number of significant digits specified by digits. E.g .

Constructing Real and Complex Variables

syms x y real
z = x + i*y

returns a complex (z) variable. conj(z) returns:

Creating a Symbolic Matrix

We can create a circulant matrix with elements a, b, and c, with the commands:

syms a b c
A = [ a b c b c a c a b]

[ a, b, c]
[ b, c, a]
[ c, a, b]

Since A is circulant, the sum over each row and column is the same. E.g.

The command sum(A(:,1)) == sum(A(:,2)) % This is a logical test.

Now replace the (2,3) entry of A with beta and the variable b with alpha. The commands:

syms alpha beta
A(2,3) = beta
A = subs(A,b,alpha)

[ a, alpha, c]
[ alpha, c, beta]
[ c, a, alpha]

The Default Symbolic Variable

This is the variable used by default to differentiate, integrate, etc. symbolic expression. It is generally the letter that is closest to 'x' alphabetically. If there are two equally close, the letter later in the alphabet is chosen.
E.g.

syms x n
f = x^n

To find the default symbolic variable use the command findsym. E.g.

To differentiate with respect to the default symbolic variable, use diff. E.g.

syms a x
f = sin(a*x)
diff(f)

To differentiate with respect to the variable a, type

ans =

cos(a*x)*x

To calculate the second derivative (with respect to x):

diff(f,x,2)

ans =

-sin(a*x)*a^2

We can also differentiate a symbolic matrix:

syms a x
A = [cos(a*x), sin(a*x) -sin(a*x),cos(a*x)]

A =

[ cos(a*x), sin(a*x)]
[ -sin(a*x), cos(a*x)]

diff(A)

ans =

[ -sin(a*x)*a, cos(a*x)*a]
[ -cos(a*x)*a, -sin(a*x)*a]

We can also perform differentiation of a column vector with respect to a row vector, like the Jacobian of a transformation. Consider the transformation from Euclidean (x,y,z) to sperical (r,l,f) coordinates:

syms r l f
x = r*cos(l)*cos(f) y =r*cos(l)*sin(f) z=r*sin(l)
J = jacobian([xyz],[r l f])

J =

[ cos(l)*cos(f), -r*sin(l)*cos(f), -r*cos(l)*sin(f)]
[ cos(l)*sin(f), -r*sin(l)*sin(f), r*cos(l)*cos(f)]
[ sin(l), r*cos(l), 0]

and the command

detJ = simple(det(J))

returns

simple returns the expression with the fewest possible number of characters.

## Rational and Polynomial Functions

Use the structure of an expression to identify ways to rewrite it. Tasks are limited to polynomial, rational, or exponential expressions. For example, see x 4 - y 4 as (x 2 ) 2 - (y 2 ) 2 , thus recognizing it as a difference of squares that can be factored as (x 2 - y 2 )(x 2 + y 2 ).

Write expressions in equivalent forms to solve problems. Derive the formula for the sum of a finite geometric series (when the common ratio is not 1), and use the formula to solve problems. For example, calculate mortgage payments.

Understand the relationship between zeros and factors of polynomials. Know and apply the Remainder Theorem: For a polynomial p(x) and a number a, the remainder on division by x - a is p(a), so p(a) = 0 if and only if (x - a) is a factor of p(x).

Understand the relationship between zeros and factors of polynomials.​ Identify zeros of polynomials when suitable factorizations are available, and use the zeros to construct a rough graph of the function defined by the polynomial. Tasks include quadratic, cubic, and quartic polynomials and polynomials in which factors are not provided. For example, find the zeros of f(x) = (x 2 - 1)(x 2 + 1).

Create equations that describe numbers or relationships. Create equations and inequalities in one variable and use them to solve problems. Include equations arising from linear and quadratic functions, and simple rational and exponential functions.

Understand solving equations as a process of reasoning and explain the reasoning. Explain each step in solving a simple equation as following from the equality of numbers asserted at the previous step, starting from the assumption that the original equation has a solution. Construct a viable argument to justify a solution method.

Understand solving equations as a process of reasoning and explain the reasoning. Solve simple rational and radical equations in one variable, and give examples showing how extraneous solutions may arise.

Solve equations and inequalities in one variable. Solve quadratic equations by inspection (e.g., for x 2 = 49), taking square roots, completing the square, the quadratic formula and factoring, as appropriate to the initial form of the equation. Recognize when the quadratic formula gives complex solutions and write them as a ± bi for real numbers a and b.

Represent and solve equations and inequalities graphically. Explain why the x-coordinates of the points where the graphs of the equations y=f(x) and y=g(x) intersect are the solutions of the equation f(x)=g(x) find the solutions approximately, e.g., using technology to graph the functions, make tables of values, or find successive approximations. Include cases where f(x) and/or g(x) are linear, polynomial, rational, absolute value, exponential, and logarithmic functions.

Interpret functions that arise in applications in terms of the context. For a function that models a relationship between two quantities, interpret key features of graphs and tables in terms of the quantities, and sketch graphs showing key features given a verbal description of the relationship. Key features include: intercepts intervals where the function is increasing, decreasing, positive, or negative relative maximums and minimums symmetries end behavior and periodicity.

Rewrite rational expressions. Rewrite simple rational expressions in different forms write a(x) /b(x) in the form q(x) + r(x) /b(x), where a(x), b(x), q(x), and r(x) are polynomials with the degree of r(x) less than the degree of b(x), using inspection, long division, or, for the more complicated examples, a computer algebra system. From the PARCC Model Content Frameworks: “This standard sets an expectation that students will divide polynomials with remainder by inspection in simple cases. For example, one can view the rational expression (x+4) /(x+3) as (x+4) /(x+3) = (x+3) +1 /(x+3) = 1 + 1 /(x+3) ."

Analyze functions using different representations. Compare properties of two functions each represented in a different way (algebraically, graphically, numerically in tables, or by verbal descriptions). For example, given a graph of one quadratic function and an algebraic expression for another, say which has the larger maximum.

Perform arithmetic operations with complex numbers. Know there is a complex number i such that i 2 = -1, and every complex number has the form a + bi with a and b real.

Perform arithmetic operations with complex numbers. Use the relation i 2 = -1 and the commutative, associative, and distributive properties to add, subtract, and multiply complex numbers.

Use complex numbers in polynomial identities and equations. Solve quadratic equations with real coefficients that have complex solutions.

Use polynomial identities to solve problems. Prove polynomial identities and use them to describe numerical relationships. For example, the polynomial identity (x 2 + y 2 ) 2 = (x 2 - y 2 ) 2 + (2xy) 2 can be used to generate Pythagorean triples.

Solve Systems of equations. Solve systems of linear equations exactly and approximately (e.g., with graphs), focusing on pairs of linear equations in two variables.

Solve Systems of equations. Solve a simple system consisting of a linear equation and a quadratic equation in two variables algebraically and graphically. For example, find the points of intersection between the line y = -3x and the circle x 2 + y 2 = 3.

Translate between the geometric description and the equation for a conic section. Derive the equation of a parabola given a focus and directrix.

Use complex numbers in polynomial identities and equations. Know the Fundamental Theorem of Algebra show that it is true for quadratic polynomials.

In this unit, students will study properties of rational and polynomial expressions as they appear in both functions and equations. They will also use solving polynomial equations of various forms to extend the number system into the Complex Plane. Students will identify algebraic terms, write equivalent expressions in factored form, and use the zero product property to understand that all polynomials can be expressed as a product of factors added to a remainder. This allows us to arrive at the remainder theorem, to identify the zeroes of the polynomial, and to sketch its graph.

## SUMMARY

### Key Words

• A monomial is an algebraic expression in which the literal numbers are related only by the operation of multiplication.
• A polynomial is the sum or difference of one or more monomials.
• A binomial is a polynomial having two terms.
• A trinomial is a polynomial having three terms.
• If x 2 = y, then x is a square root of y.
• The principal square root of a positive number is the positive square root.
• The symbol is called a radical sign and indicates the principal square root of a number.
• A perfect square number has integers as its square roots.

### Procedures

• The first law of exponents is x a x b = x a+b .
• To find the product of two monomials multiply the numerical coefficients and apply the first law of exponents to the literal factors.
• To multiply a polynomial by another polynomial multiply each term of one polynomial by each term of the other and combine like terms.
• The second law of exponents is (x a ) b = x ab .
• The third law of exponents is
• To divide a monomial by a monomial divide the numerical coefficients and use the third law of exponents for the literal numbers.
• To divide a polynomial by a monomial divide each term of the polynomial by the monomial.
• To divide a polynomial by a binomial use the long division algorithm.