I am faced with the following integral:
I can think of two approaches to solve it:
1) Separating into two terms as follows:
$\int x dx -a\int 1 dx$
From which the result would be:
$\int (x-a) dx = x^2/2 - ax$
2) Substituting $u =x-a$; $du=dx$
$\int u du = u^2 / 2 = (x - a)^2 / 2$
If we expand this solution:
$\int (x-a) dx = x^2/2 -ax + a^2/2$
Now, clearly, $x^2/2 -ax+a^2/2$ is not equal to $x^2/2 - ax$. So is either method invalid for some reason? Or am I making a mistake elsewhere?
I am aware this is probably a very dumb question, so I thank you very much for your attention and help!