How do you integrate #(x^2 + x - 1) * (x^2 + x - 1)#?

1 Answer
Mar 11, 2018

#int (x^2+x-1)(x^2+x-1)dx = x^5/5 + x^4/2 - x^3/3 - x^2+x#

Explanation:

Usually, the best way to integrate polynomial functions is to do it the "brute" way. Firstly, let's calculate #(x^2+x-1)(x^2+x-1)# :

#(color(red)(x^2)+color(blue)x-1)(x^2+x-1)=#
#color(red)(x^4+x^3-x^2) + color(blue)(x^3+x^2-x) -x^2-x+1#

This simplifies to #x^4+2x^3-x^2-2x+x#.

In order to integrate it, you have to use a few properties of integrations :

#int color(red)(f(x))+color(blue)(g(x)) dx = color(red)(int f(x)dx) +color(blue)(int g(x)dx#
#int kf(x)dx = kint f(x)dx#, if #k# is a constant.

The initial integral has become

#int(x^2+x-1)(x^2+x-1)dx =#

#=int(x^4+2x^3-x^2-2x+1)dx =#

#=int x^4dx + 2intx^3 - intx^2 -2intxdx+int1dx#

Now, we know that

#int x^color(red)kdx = x^color(red)(k+1)/color(red)(k+1)#

And finally, we have

#x^color(red)(5)/color(red)5+2*x^color(red)4/color(red)4-x^color(red)3/color(red)3-2*x^color(red)2/color(red)2+x#.

The last one, #int 1dx# is equal to #x# because #1=x^color(red)0#, for all #x#.

So the integral of #(x^2+x-1)(x^2+x-1)# is

#color(red)(int(x^2+x-1)(x^2+x-1)dx = x^5/5 +x^4/2-x^3/3-x^2+x#.