Proof for formula $\int e^{g(x)}[f'(x) + g'(x)f(x)] dx = f(x) e^{g(x)}+C$
I recently saw someone using this formula here on one of the questions since I can't comment , can someone please give me the proof of this equation and type of problems where it can be used ?
Solution 1:
Open the brackets and separate it out as
$$\int e^{g(x)}g'(x)f(x)dx + \int e^{g(x)} f'(x)dx$$
Using integration by parts on the first terms we have
$$f(x)e^{g(x)} - \int f'(x)e^{g(x)} + \int f'(x)e^{g(x)}$$
The second and third term will cancell out yielding
$$=f(x)e^{g(x)}$$
Samples where it can be used :
Q1) $$\int e^{x+\frac{1}{x}}\left(1+x-\frac{1}{x}\right)dx$$
Q2) $$\int e^{\tan x}\left(x\sec^{2}x+ \sin2x\right)dx$$
And one of the beast
Q3) $$\int e^{x\sin x+\cos x}\left(\frac{x^{4}\cos^{3}x -x \sin x+ \cos x}{x^{2}\cos^{2}x}\right)dx$$
Solution 2:
Hint: Take the derivative of the right side and use product rule.