I am looking through the solution of integrating: $$\int\_{}^{} \frac{x^4+1}{x^3+1} dx$$
I understand it but for the following part:
[![enter image description here](https://i.stack.imgur.com/oaGcE.png)](https://i.stack.imgur.com/oaGcE.png)
My problem is limited to the first and penultimate column. I would very much appreciate it if someone could explain to me these, especially the penultimate one.

EDIT 0: Clarification

I have a problem with this line:
[![enter image description here](https://i.stack.imgur.com/fc2Py.png)](https://i.stack.imgur.com/fc2Py.png)
How do I get those thetas?

My main problem is with this part:
[![enter image description here](https://i.stack.imgur.com/83dBw.png)](https://i.stack.imgur.com/83dBw.png)
Why 1 = ..., -1 = ... and 0 = ...?
['https://math.stackexchange.com/questions/3503714', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/398496/']
An introduction to partial fractions.

If we have two fraction and we want to add them together, $\frac {a}{b} + \frac {c}{d} = \frac {ad + bc}{bd}$

We can do the same thing, with rational polynomials.

$ \frac {1}{x} - \frac {1}{x+1} = \frac{x+1}{(x)(x+1)} - \frac {x}{x(x+1)} = \frac {x+1-x}{x(x+1)} = \frac {1}{x(x+1)}$

Supposing you had $\frac {1}{x(x+1)}$ How do you break it into partial fractions?

We already know the solution, but how do you find it if you didn't know?

We know that the denominators are factors of the denominator of the original expression.

So we "guess" that it might look something like this:

$\frac {1}{x(x+1)} = \frac {a}{x} + \frac {b}{x+1}$ 

Solve for $a,b$

Multiply both sides by $(x)(x+1)$

$\frac {1}{x(x+1)}(x)(x+1) = \frac {a}{x}(x)(x+1) + \frac {b}{x+1}(x)(x+1)\\
1 = a(x+1) + bx\\
1 = ax + a + bx\\
1 = (a+b)x + a$

We have an $x$ term on the right and no $x$ term on the left, we might do something like this to create an x term on the left without changing the value of the expression.

$0x + 1 = (a+b)x + a$

If the LHS equals the RHS, then the coefficient of the x terms must be equal. The constant terms must also be equal.

$0x = (a+b)x\\
1 = a$

There was no reason to carry the $x$ along and we could have cut straight to 

$0 = a+b\\
1 =a$

One more increase in difficulty.

Suppose we have.

$\frac {1}{x(x^2+1)}$

When we break it into partial fractions, we should assume that the degree of the numerator in each term is one less than the degree of the denominator. That is:

$\frac {1}{x(x^2+1)} = \frac {a}{x} + \frac {bx + c}{x^2 + 1}$

Then we multiply both sides by $(x)(x^2+1)$ as we did before, and set corresponding coefficients equal to each other.

$\frac {1}{x(x^2+1)}(x)(x^2+1) = \frac {a}{x}(x)(x^2+1) + \frac {bx + c}{x^2 + 1}(x)(x^2+1)\\
1 = a(x^2 + 1) + (bx+c) x\\
1 = ax^2 + a + bx^2+ cx\
0x^2 + 0x + 1 = (a+b) x^2 + cx + a\\
0 = a+b\\
0 = c\\
1 = a$

This is exactly what was done in the problem above

$\frac {1-x}{(x+1)(x^2-x+1)}$

We want the numerators to be of one degree less than each term's denominator.

$\frac {1-x}{(x+1)(x^2-x+1)} = \frac {a}{x-1} + \frac {bx + c}{x^2 - x + 1}$

Multiply through by $(x^3 + 1)$ or $(x+1)(x^2 - x + 1)$ if you prefer.

$\frac {1-x}{(x+1)(x^2-x+1)}(x+1)(x^2 - x + 1) = \frac {a}{x+1}(x+1)(x^2 - x + 1) + \frac {bx + c}{x^2 - x + 1}(x+1)(x^2 - x + 1)\\
1-x = a(x^2 - x + 1)+ (bx + c)(x+1)\\
1-x = ax^2 - ax + a + bx^2 + bx + cx + c\\
0x^2 - x + 1 = (a+b)x^2 + (-a+b+c)x + (a+c)\\
0 = a+b\\
-1 = -a+b+c \\
1 = a+c$

I hope this clears things up.
Solution of integral will be by partial fraction method
$$I=\int (x+\frac{1-x}{x^3+1})dx$$
$$I = \frac{x^2}{2}+\int (\frac{1-x}{(x+1)(x^2-x+1)})dx$$
Where you can solve for 
$$I\_1=\int (\frac{1-x}{(x+1)(x^2-x+1)})dx$$
Using partial fraction like done here
<https://www.mathsdiscussion.com/discussion-forum/topic/indefinite-integral/?part=1#postid-77>
$$I=\frac{x^2}{2}-\frac{1}{3}ln(\frac{x^2-x+1}{(x+1)^2})+C$$
Problem what you say in your solution is when let
$$\frac{1-x}{(x+1)(x^2-x+1)}=\frac{a}{x+1}+\frac{bx+c}{x^2-x+1}$$
Multiplying both sides by $(x+1)(x^2-x+1)$ we ge
$$1-x=a(x^2-x+1)+(bx+c)(x+1)$$
Now comparing coefficients of $x^2$ , x and constant terms on both sides we get
$$ $$
Coefficient of$x^2$ on both sides 0=a+b
$$. $$
Coefficient of x on both sides -1=-a+b+c
$$. $$
Constant terms on both sides 1=a+c
$$ $$ This how we get those 3 equations