# Is this a valid operation (integration by parts)?

1. Jun 16, 2014

### jam_27

Say I have a function,

f(x) = x sec (f(x)) [this is just an example function, the actual problem is more complicated]

g(x) = x f(x), then using integration by parts, I can write

I = abg(x) dx = abx f(x) dx = (f(x) $\frac{x^{2}}{2}$)|$^{b}_{a}$- $\frac{1}{2}$ab$\frac{d f(x)}{dx}$ x2 dx

Then can I write the integral as (cancelling dx from the numerator and denominator in integral on the RHS)?

I = (f(x) $\frac{x^{2}}{2}$)|$^{b}_{a}$- $\frac{1}{2}$f(a)f(b) x2 df

or,

I = (f(x) $\frac{x^{2}}{2}$)|$^{b}_{a}$- $\frac{1}{2}$f(a)f(b) f2 cos2 (f) df ?

This is simplified version of my actual problem. So any inputs will be very useful?

PS: I have edited the originally posted problem definition as it was causing confusion.

Last edited: Jun 16, 2014
2. Jun 16, 2014

### micromass

Staff Emeritus
So you need to find the integral

$$-\int_a^b xW(-x)dx$$

where $W$ is the Lambert W-function?

What kind of answers are acceptable? A closed form solution? A series solution?

Wolfram alpha gives the following:

$$\int - x W(-x)dx = \frac{x^2(1 - W(-x))(2W(-x)^2+1)}{8W(-x)^2}$$

which in term of your notation would be

$$\frac{x^2(1 + f(x))(2f(x)^2 +1)}{8f(x)^2}$$

3. Jun 16, 2014

### jam_27

I know about the Lambert W-function. As I said, above is a simplified version of my actual problem. so I specifically need to know if my last 2 steps are valid operations. Thanks

4. Jun 16, 2014

### micromass

Staff Emeritus
OK.

I think this is ok.

Any reason why you don't have $f^2/e^{2f}$? You have $x = \frac{f(x)}{e^{f(x)}}$ and thus $x^2 = \frac{f(x)^2}{e^{2f(x)}}$. No?

5. Jun 16, 2014

### jam_27

Thanks, I have corrected the typo and also the original problem definition. Please see if its ok now.

6. Jun 16, 2014

### micromass

Staff Emeritus
Seems fine to me.