Solving a problem by adding 0 and multiplying by 1

Has it ever occurred to you that when solving a problem, a non-trivial step might make the problem trivial?

Well, if you are a mathematician, it probably has. The only difference might be the number of steps needed to turn the problem into something easier.

Take for example the following problem which I solved yesterday in a forum on which I have the privilege to moderate.

Compute the following integral :

\int_{0}^{\frac{\pi}{2}}\frac{e^x+cos(x)}{e^x+sin(x)+cos(x)}dx

Two students are trying to solve it but they are getting nowhere, thus they ask for help. So, here am I, thinking about it. First, I get rid of the limits (temporarily).

\int\frac{e^x+cos(x)}{e^x+sin(x)+cos(x)}dx (1)

OK, cool. Then, I notice a nice pattern. If I had a -sin(x) in the numerator, I could just set u=e^x+sin(x)+cos(x) and problem solved. So, I add it and then remove it, to get.

\int\frac{e^x+cos(x)+sin(x)-sin(x)}{e^x+sin(x)+cos(x)}dx

So, one of the integrals is easy to solve, while the other is kind of harder. Wouldn’t it be nice if we had another pair of e^x,\ cos(x)? Then, we would have two easy integrals and problem solved.

OK, so we add those two and to keep the balance, we divide by 2.

\int\frac{1}{2}\frac{2e^x+2cos(x)+sin(x)-sin(x)}{e^x+sin(x)+cos(x)}dx (2)

And amazingly, while the only thing we did to get from (1) to (2) was to multiply by 1 and then add 0, the second problem is directly solvable while the first is not. How cool is that?

Answer : very!

Advertisements