InterviewSolution
| 1. |
Evaluate the following integral: ∫ (2x+1)/(x+1)(x-2)dx \(\int\frac{2x+1}{(x+1)(x-2)}\) dx |
|
Answer» Here the denominator is already factored. So let, ∫ (2x+1)/(x+1)(x-2)dx = \(\frac{A}{x+1}+\frac{B}{x-2}\) ...(i) ⇒ \(\int\frac{2x+1}{(x+1)(x-2)}\) = \(\frac{A(x-2)+B(x+1)}{(x+1)(x-2)}\) ⇒ 2x + 1 = A(x – 2) + B(x + 1)……(ii) We need to solve for A and B. One way to do this is to pick values for x which will cancel each variable. Put x = 2 in the above equation, we get ⇒ 2(2) + 1 = A(2 – 2) + B(2 + 1) ⇒ 3B = 5 ⇒ B = \(\frac{5}{3}\) Now Put x = – 1 in equation (ii), we get ⇒ 2( – 1) + 1 = A(( – 1) – 2) + B(( – 1) + 1) ⇒ – 3A = – 1 ⇒ A = \(\frac{1}{3}\) We put the values of A and B values back into our partial fractions in equation (i) and replace this as the integrand. We get, \(\int[\frac{A}{x+1}+\frac{B}{x-2}]\) dx ⇒ \(\int[\frac{\frac{1}{3}}{x+1}+\frac{\frac{5}{3}}{x-2}]\) dx Split up the integral, ⇒ \(\frac{1}{3}\)\(\int[\frac{1}{x+1}]\)dx + \(\frac{5}{3}\)\(\int[\frac{1}{x-2}]\)dx Let substitute u = x + 1 ⇒ du = dx and z = x – 2 ⇒ dz = dx, So the above equation becomes, ⇒ \(\frac{1}{3}\)\(\int[\frac{1}{u}]\)du + \(\frac{5}{3}\)\(\int[\frac{1}{z}]\)dz On integrating we get, ⇒ \(\frac{1}{3}\)log|u| + \(\frac{5}{3}\)log|z| + c Substituting back, we get ⇒ \(\frac{1}{3}\)log|x + 1| + \(\frac{5}{3}\)log|x - 2| + c Note : the absolute value signs account for the domain of the natural log function (x>0). Hence, \(\int\frac{2x+1}{(x+1)(x-2)}\) dx = \(\frac{1}{3}\)log|x + 1| + \(\frac{5}{3}\)log|x - 2| + c |
|