# Integration of $\int(2-x/2)^2dx$

Got an exam tomorrow and my head is no longer working. Could someone walk through the integration of this function

$$\int\left(2-\frac x2\right)^2dx$$

I understand integration by parts and stuff like that.

• just expand the square Commented Jun 2, 2013 at 15:19
• @Mattis:what are u trying ?
– M.H
Commented Jun 2, 2013 at 15:19

Hint: $\displaystyle \int u'(x)(u(x))^2dx=\dfrac{(u(x))^3}{3}+C$

• That's it, all I need. Thanks! Commented Jun 2, 2013 at 15:21
• So, try to memorize it. Git will not be with you while taking the exam. ;-) Commented Jun 2, 2013 at 15:24
• @BabakS. Funny ^_^ Commented Jun 2, 2013 at 15:25
• @Mattis Remmber that the u(x) need to be linear when you do that. Commented Jun 2, 2013 at 15:28
• @OfirAttia I don't know what you mean: $$\left( \dfrac{(u(x))^3}{3} +C \right)'=u'(x)(u(x))^2$$. Commented Jun 2, 2013 at 15:31

Sometimes when you've got a hammer, everything looks like nail. i.e. when you've been practicing all the complicated reverse chain rules and integration by parts and substitution, etc. you tend to be madly trying to apply one of these tricks to every problem and miss the much simpler solutions.

In this case, just expand (it's only to the power of two, nothing terrible) and then integrate term by term.

Good luck for the exam!

• I did, at first, but there are a lot of terms like that in different variations and it becomes hell pretty fast. I have the solution the teacher did, and I want to learn how he did it. Commented Jun 2, 2013 at 15:25
• Well actually in this case the "reverse chain rule" will work. To do this, we look at the derivative of what's inside the brackets and see if it's present outside the brackets up to a constant. In this case, this holds, the derivative is simply -1/2. So we can do a "reverse chain rule" i.e. raise the power by one and divide by the new power, but also divide by the -1/2. Try differentiating the answer to see why this works.
– john
Commented Jun 2, 2013 at 15:28