how to calculate integral of square of a function When doing differentiation, I know that if $f$ is a function on $x$, then

$$ { d \over dx } f^2 = 2 f {df \over dx} $$

so the opposite in integration is also clear:

$$ \int 2 f { df \over dx } dx = f^2 $$

I also know that 

$$ \int x^2 dx = { x^3 \over 3} $$

But I'm not sure as to how I can evaluate:

$$ \int f^2 dx $$

I mean is there any identity for this? That the above is equal to another function of $f$ (such as $f^3 \over 3$ times something)? Is there any method to find this? I googled some but perhaps I wasn't using proper search terms so I didn't get any clear results so I'm asking here. [I hope my question is clear enough :-(]
Can't be done, in general. For example, it is easy to do $$\int xe^{x^2}\,dx$$ but there is no expression for $$\int x^2e^{2x^2}\,dx$$ in terms of the familiar functions of undergraduate mathematics.
i suppose if you substitute the function as any arbitrary variable X u can solve this integration. for example while integrating (1+x)^2 you substitute 1+x=t then differentiate both with respect to t. this gives you dx=dt. here, no matter what your function, make dx the subject of the equation so that you can replace dx in your original integral. after that you integrate the function as integration of t^2 which is t^3/3 and then resubstitute t=1+x in the answer to get your answer.This is of course a very simple example but the process is the same.