PROBLEM
I have to compute this indefinite integral: $$\int(2-x)^2\ln(4x)\,\,dx$$
MY ATTEMPT
So I did integration by parts:
$$\begin{matrix} u=(2-x)^2 & dv=\ln(4x)\,\,dx\\ du=(2x-4)\,\,dx & v=\int\ln(4x)\\ \end{matrix}$$ $$\int\ln(4x)\,\,dx=\;\;?$$ $$\begin{matrix} a=\ln(4x) & db=dx\\ da={1\over x}\,\,dx & b=x\\ \end{matrix}$$
$$\int\ln(4x)\,\,dx=x\ln(4x)-\int x\,\cdot\frac1x\,\,dx$$ $$\int\ln(4x)\,\,dx=x\ln(4x)-x$$ So because of that: $$\int(2-x)^2\ln(4x)\,\,dx=(2-x)^2\Big(x\ln(4x)-x\Big)-\int(2x-4)\Big(x\ln(4x)-x\Big)\,\,dx$$ Now integrating by parts one more time: $$\begin{matrix} u=2x-4 & dv=\Big(x\ln(4x)-x\Big)\,\,dx\\ du=2\,\,dx & v=\int\Big(x\ln(4x)-x\Big)\,\,dx\\ \end{matrix}$$ $$\int\Big(x\ln(4x)-x\Big)\,\,dx=\int x\ln(4x)\,\,dx\;-\int x\,\,dx$$ $$\begin{matrix} a=\ln(4x) & db=x\,\,dx\\ da={1\over x}\,\,dx & b=\frac{x^2}{2}\\ \end{matrix}$$ $$\int x\ln(4x)\,\,dx=\frac{x^2}{2}\ln(4x)\;-\int\frac{x^2}{2}\,\cdot\frac1x\,\,dx$$ $$\int x\ln(4x)\,\,dx=\frac{x^2}{2}\ln(4x)\;-\int\frac x2\,\,dx$$ $$\int x\ln(4x)\,\,dx=\frac{x^2}{2}\ln(4x)\;-\frac{x^2}{4}$$ $$\int\Big(x\ln(4x)-x\Big)\,\,dx=\frac{x^2}{2}\ln(4x)\;-\frac{x^2}{4}-\frac{x^2}{2}$$ Finally, after all this mess, plugging in in the equation of the original integral: $$\int(2-x)^2\ln(4x)\,\,dx=(2-x)^2\Big(x\ln(4x)-x\Big)-\frac{x^2}{2}\ln(4x)\;+\frac{x^2}{4}+\frac{x^2}{2}+c$$ Now, I cleaned up this mess a little to give a nicer answer: $$(2-x)^2\Big(x\ln(4x)-x\Big)-\frac{x^2}{2}\ln(4x)\;+\frac{x^2}{4}+\frac{x^2}{2}+c$$ $$x(x^2-4x+4)\Big(\ln(4x)-1\Big)-\frac{x^2}{2}\ln(4x)\;+\frac{x^2}{4}+\frac{x^2}{2}+c$$ $$(x^3-4x^2+4x)\ln(4x)-x^2+4x-4-\frac{x^2}{2}\ln(4x)\;+\frac34 x^2+c$$ $$(x^3-4x^2+4x)\ln(4x)-\frac{x^2}{2}\ln(4x)-x^2+4x-4\;+\frac34 x^2+c$$ $$\boxed{\Big(x^3-\frac{9}{2}x^2+4x\Big)\ln(4x)-\frac{1}{4}x^2+4x-4+c}$$
ANSWER FROM WOLFRAMALPHA
WolframAlpha gives me a different answer: $$\frac{1}{9}x\Big(-x^2+3(x^2-6x+12)\ln(4x)+9x-36\Big)+c$$ Even after rearranging the WA's answer, I get similar answer but the coefficients and other details don't match. I won't bother rearranging the WolframAlpha's answer here, but trust me, after putting it into similar form to my answer, it doesn't work.
So what did I do wrong?
Up to here
$$\int(2-x)^2\ln(4x)\,\,dx=(2-x)^2\Big(x\ln(4x)-x\Big)-\int(2x-4)\Big(x\ln(4x)-x\Big)\,\,dx$$
it seems to be correct but this
$$\int(2-x)^2\ln(4x)\,\,dx=(2-x)^2\Big(x\ln(4x)-x\Big)-\frac{x^2}{2}\ln(4x)\;+\frac{x^2}{4}+\frac{x^2}{2}+c$$
seems not correct since you didn't considered the term
$$A=(2x-4)\left(\frac{x^2}{2}\ln(4x)\;-\frac{x^2}{4}-\frac{x^2}{2}\right)$$
and also the calculation of this part $\left(\frac{x^2}{2}\ln(4x)\;-\frac{x^2}{4}-\frac{x^2}{2}\right)$ seems uncorrect indeed the integral should be
$$\int(2x-4)\Big(x\ln(4x)-x\Big)\,\,dx=-\frac89x^3+3x^2+\frac23(x^3-3x^2)\ln (4x)$$
Let try to fix form here, since
$$\int\Big(x\ln(4x)-x\Big)\,\,dx=\frac{x^2}{2}\ln(4x)\;-\frac{x^2}{4}-\frac{x^2}{2}=\frac{x^2}{2}\ln(4x)\;-\frac{3x^2}{4}$$
we have that
$$\int(2x-4)\Big(x\ln(4x)-x\Big)\,\,dx=\\ =(2x-4)\left(\frac{x^2}{2}\ln(4x)\;-\frac{3x^2}{4}\right)-2\int\Big(\frac{x^2}{2}\ln(4x)\;-\frac{3x^2}{4}\Big)\,\,dx=\\ =(2x-4)\left(\frac{x^2}{2}\ln(4x)\;-\frac{3x^2}{4}\right)+\frac{x^3}{2}-\int x^2\ln(4x)\,\,dx=\\ =(x^3-2x^2)\ln(4x)\;-(x^3-3x^2)-\frac13x^3\log (4x)+\frac19x^3=\\ -\frac89x^3+3x^2+\frac23(x^3-3x^2)\ln (4x)$$