Integrate x/(x^2 + 4) dx via trig substitution and by u=x^2+4 substitution. Show that results are equal.

Via trig substitution of x=2 *tan t, I get:
1/2 * tan^-1 (x/2) + c

Via u = (x^2 + 4) substitution, I get:
1/2 * ln |x^2 + 4| + c

How are these equal?

sorry. posted too quickly. got the answer.

Via trig substitution answer comes to:

ln|sqrt(x^2+4)/2| + c

which is the same as the other answer

Yes, good!

To show that the results obtained through trig substitution and the u-substitution are equal, we can start by expressing the trig substitution result in terms of the u-substitution variable.

Recall that in trigonometric substitution, we let x = 2tan(t). Using the trigonometric identity tan^2(t) + 1 = sec^2(t), we can rewrite the expression for x^2 in terms of t:

x^2 = (2tan(t))^2 = 4tan^2(t) = 4sec^2(t) - 4

Now, let's substitute this expression for x^2 in the original integral:

∫ (x/(x^2 + 4)) dx = ∫ (2tan(t)/(4sec^2(t))) (2sec^2(t)) dt
= ∫ tan(t) dt
= ∫ [sin(t)/cos(t)] dt
= -ln|cos(t)| + C

Next, we need to rewrite the result in terms of the variable u used in the u-substitution.

Recall that in the u-substitution, we let u = x^2 + 4. Rearranging, we have x^2 = u - 4. Differentiating both sides with respect to x, we get 2x dx = du. Solving for dx, we have dx = du/(2x).

Substituting these expressions back into the original integral, we have:

∫ (x/(x^2 + 4)) dx = ∫ (x/(u)) (du/(2x))
= ∫ (1/2) (du/u)
= (1/2) ln|u| + C

Now, recalling that u = x^2 + 4, we can substitute back to u in the result:

(1/2) ln|u| + C = (1/2) ln|x^2 + 4| + C

Therefore, after substituting back to x, the results obtained through trig substitution and u-substitution are indeed equal:

- ln|cos(t)| + C = (1/2) ln|x^2 + 4| + C

Hence, we have shown that the two approaches lead to the same result.