## Polynomial Long Division: (x^4+2x^2-x+5)/(x^2-x+1)

This article will walk you through the process of performing polynomial long division to simplify the expression **(x^4+2x^2-x+5)/(x^2-x+1)**.

### Step 1: Set Up the Division

Start by setting up the division problem in the standard long division format.

```
__________
x^2-x+1 | x^4 + 0x^3 + 2x^2 - x + 5
```

Notice we included a **0x^3** term as a placeholder for the missing cubic term in the dividend.

### Step 2: Divide the Leading Terms

Focus on the leading terms of the divisor (x^2) and the dividend (x^4). Ask yourself: **"What do I multiply x^2 by to get x^4?"** The answer is **x^2**.

Write x^2 above the x^4 term in the quotient.

```
x^2
x^2-x+1 | x^4 + 0x^3 + 2x^2 - x + 5
```

### Step 3: Multiply and Subtract

Multiply the entire divisor (x^2-x+1) by the term you just placed in the quotient (x^2). This gives you:

```
x^2
x^2-x+1 | x^4 + 0x^3 + 2x^2 - x + 5
x^4 - x^3 + x^2
```

Now, subtract this entire expression from the dividend. Remember to change the signs when subtracting!

```
x^2
x^2-x+1 | x^4 + 0x^3 + 2x^2 - x + 5
x^4 - x^3 + x^2
------------------
x^3 + x^2 - x
```

### Step 4: Bring Down the Next Term

Bring down the next term from the dividend (-x).

```
x^2
x^2-x+1 | x^4 + 0x^3 + 2x^2 - x + 5
x^4 - x^3 + x^2
------------------
x^3 + x^2 - x + 5
```

### Step 5: Repeat the Process

Now, focus on the new leading terms: x^3 and x^2. Ask yourself: **"What do I multiply x^2 by to get x^3?"** The answer is **x**.

Write **x** in the quotient next to x^2.

```
x^2 + x
x^2-x+1 | x^4 + 0x^3 + 2x^2 - x + 5
x^4 - x^3 + x^2
------------------
x^3 + x^2 - x + 5
```

Multiply the divisor by x and subtract.

```
x^2 + x
x^2-x+1 | x^4 + 0x^3 + 2x^2 - x + 5
x^4 - x^3 + x^2
------------------
x^3 + x^2 - x + 5
x^3 - x^2 + x
--------------
2x^2 - 2x + 5
```

### Step 6: Continue until the Degree of the Remainder is Less than the Divisor

Repeat the process of dividing the leading terms, multiplying, and subtracting.

```
x^2 + x + 2
x^2-x+1 | x^4 + 0x^3 + 2x^2 - x + 5
x^4 - x^3 + x^2
------------------
x^3 + x^2 - x + 5
x^3 - x^2 + x
--------------
2x^2 - 2x + 5
2x^2 - 2x + 2
-------------
3
```

We stop here because the degree of the remainder (0) is less than the degree of the divisor (2).

### Solution

The result of the division is:

**(x^4+2x^2-x+5)/(x^2-x+1) = x^2 + x + 2 + 3/(x^2-x+1)**