a3+a2-4a-4a-2

Factor out the greatest common factor from each group.

Group the first two terms and the last two terms.

(a3+a2)-4a-4a-2

Factor out the greatest common factor (GCF) from each group.

a2(a+1)-4(a+1)a-2

a2(a+1)-4(a+1)a-2

Factor the polynomial by factoring out the greatest common factor, a+1.

(a+1)(a2-4)a-2

Rewrite 4 as 22.

(a+1)(a2-22)a-2

Since both terms are perfect squares, factor using the difference of squares formula, a2-b2=(a+b)(a-b) where a=a and b=2.

(a+1)(a+2)(a-2)a-2

(a+1)(a+2)(a-2)a-2

Cancel the common factor.

(a+1)(a+2)(a-2)a-2

Divide (a+1)(a+2) by 1.

(a+1)(a+2)

(a+1)(a+2)

Apply the distributive property.

a(a+2)+1(a+2)

Apply the distributive property.

a⋅a+a⋅2+1(a+2)

Apply the distributive property.

a⋅a+a⋅2+1a+1⋅2

a⋅a+a⋅2+1a+1⋅2

Simplify each term.

Multiply a by a.

a2+a⋅2+1a+1⋅2

Move 2 to the left of a.

a2+2⋅a+1a+1⋅2

Multiply a by 1.

a2+2a+a+1⋅2

Multiply 2 by 1.

a2+2a+a+2

a2+2a+a+2

Add 2a and a.

a2+3a+2

a2+3a+2

Divide (a^3+a^2-4a-4)/(a-2)