Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If we are given a function of $x$, $a(x)$, how hard is it to find an $f(x)$ and $g(x)$ such that $$a(x)=f(x)g'(x)+f'(x)g(x)$$ For comparison, I'd like to know when this is easier than symbolically or numerically integrating $a(x)$.

I'd like to know, if possible, what general conditions allow us to efficiently find $f(x)$ and $g(x)$. I'm hoping this isn't too general a question. Additionally, I'd like to know the methods that allow us to do so.

share|cite|improve this question
You want to find $f$ and $g$ such that $a=(fg)'$? Could you give an example? – Pedro Tamaroff Jul 11 '12 at 23:49
@PeterTamaroff: Let $a(x)=\cos^3(x)-\sin^2(x)\cos(x)$. Then we can pick an $f(x) = \sin(x)$ and $g(x)=\cos^2(x)$. It's easy to come up with an example if you start with $f(x)$ and $g(x)$. But I find it tough to go the other way. – Matt Groff Jul 12 '12 at 0:10
It can't be any easier than antidifferentiating $a$, since, if you can do it, you can antidifferentiate $a$ just by writing down $fg$. – Gerry Myerson Jul 12 '12 at 0:51
It's as hard as integrating. If you can find $f,g$, then $fg$ is an indefinite integral. If you can find an indefinite integral $f$, then you can use $g = 1$. – Yuval Filmus Jul 12 '12 at 1:42
I like to think of this as the same as applying integration by parts, since it comes from $d(uv) = d(u)v + u(dv)$. – Thomas Belulovich Aug 13 '12 at 18:44

Suppose $a(x)=x^2\cos x + 2x\sin x$.

Recognizing that as $f'(x)g(x)+ f(x)g'(x)$, with $f(x)= \sin x$ and $g(x)= x^2$, seems like the quickest way of finding the antiderivative of the whole expression.

share|cite|improve this answer

Isn't this just integration by parts. Where

$$ \int a(x)\,{\rm d}x = f(x)g(x)= \int \frac{{\rm d}f(x) g(x)}{{\rm d}x}\,{\rm d}x = \int f(x)g'(x) \,{\rm d}x +\int f'(x)g(x) \,{\rm d}x $$ $$ = \int f(x) \,{\rm d}g +\int g(x) \,{\rm d}f $$


$$ \int u \;{\rm d}v = u\, v - \int v \;{\rm d}u $$

share|cite|improve this answer
How do you find $f(x)$ and $g(x)$, without knowing the solution to the integral? – Matt Groff Aug 13 '12 at 19:58
The way integration by parts works is to transform $\int a {\rm d}x$ into $\int u {\rm d}v$ and then computing the r.h.s. of the equality above. – ja72 Aug 13 '12 at 20:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.