## escolas 2 years ago By completing the square and using a trig substitution, evaluate

1. escolas

$\int\limits_{}^{}\frac{ x dx }{-x^{2}-2x+3 }$

2. escolas

After completing the square I got $\int\limits_{}^{}\frac{ x dx }{ (x+1)^2 +4 }$

3. escolas

But I'm not sure what the mean by using a trig substitution...

4. zepdrix

Hmm did you complete the square correctly? I feel like there should be a negative on the outside..

5. zepdrix

$\large -x^2-2x+3 \qquad = \qquad -(x^2+2x-3)$Then to complete the square, we'll add and subtract 1.$\large -(\color{orangered}{x^2+2x+1}-1-3) \qquad = \qquad -(\color{orangered}{(x+1)^2}-4)$

6. escolas

See the negative confused me too, I forgot about that. that seems right

7. zepdrix

If you don't want to factor out the negative, then I guess we would have,$\large 4-(x+1)^2$

8. zepdrix

Which is probably the way we want to write it :)

9. escolas

What I had originally done was moved the 3 over to the other side and then divided by -1 but I don't think thats right

10. escolas

But what does it mean by a trig substitution?

11. zepdrix

So are you familiar with the idea of U Substitution? It's a similar idea, just a little bit more complex c:

12. escolas

I am, is it something like the proof of the area of a circle where you randomly (or seemingly randomly) substitute in a sinx or cosx to magically make things work?

13. zepdrix

Here is our integral so far, $\large \int\limits \frac{x\;dx}{4-(x+1)^2}$ Just to make sure we're on the same page.

14. zepdrix

The purpose of a Trig sub is that by applying one, we can get rid of the addition/subtraction in the bottom. We can turn it into a single term in the denominator, and it makes it a ton easier to deal with.

15. escolas

Yep, perfect!

16. escolas

Ok yea that makes sense I think..

17. zepdrix

It makes more sense when you have sqrt's in the bottom. But this problem still applies. When we see this form, $\large a^2-x^2$We'll make the substitution $$\large x=a\sin\theta$$. Here is what will happen when we do that.$\large a^2-x^2 \qquad = \qquad a^2-(a \sin \theta)^2 \qquad = \qquad a^2-a^2\sin^2 \theta$$\large a^2(1-\sin^2\theta) \qquad = \qquad a^2(\color{royalblue}{\cos^2\theta})$

18. zepdrix

Lemme know if you're confused about any of that simplification. The blue step was where we applied this identity,$\large \color{royalblue}{\cos^2\theta+\sin^2\theta=1}\qquad \rightarrow \qquad \color{royalblue}{\cos^2\theta=1-\sin^2\theta}$

19. escolas

wow thats awesome...

20. escolas

so then you have x over that though, where can you go from there?

21. zepdrix

So we'll have to replace several pieces :) We'll also have to substitute in for the dx, so we'll have to take the derivative of our $$\large x=a\sin\theta$$.

22. escolas

oh nvm...you substitute the x in the numerator too...

23. escolas

I'm slow haha sorry

24. zepdrix

Yah good call :D

25. zepdrix

In the problem we're working on, it's just a tiny bit more complicated, $$x$$ is not the thing being squared. $$(x+1)$$ is. So THAT is the thing we'll setting up to substitute.

26. zepdrix

We want to let,$\large x+1=2\sin \theta$Take a look at that a minute, let it sink in :D Our $$a$$ is 2 right? Because we have $$2^2$$ in front of the subtraction.

27. escolas

Ohh ok yea I was just about to do it and got a little stuck there. that makes more sense. So how do we deal with the numerator then?

28. zepdrix

Let's write our integral like this, maybe it's easier to read this way,$\large \int\limits\limits \frac{x}{4-(x+1)^2}\left(dx\right)$

29. zepdrix

Oh i see what you're saying. :) Hmm we'll have to be a little sneaky I guess. $\large x+1=2\sin \theta \qquad \rightarrow \qquad x=2\sin \theta -1$

30. escolas

Again...a little slow. that makes perfect sense

31. zepdrix

Hold on the microwave beeped!! :O brb lol

32. escolas

haha no worries!!

33. escolas

So I think I correctly reduced it down to $\int\limits_{}^{}\frac{ 2\sin \theta-1}{ 4\cos ^2 \theta }$

34. escolas

Does that seem right so far?

35. zepdrix

$\large \int\limits\frac{ 2\sin \theta-1}{ 4\cos ^2 \theta }(dx)$Yah looks good so far :)

36. escolas

But I need a $d \theta$

37. zepdrix

true story :O

38. escolas

haha is that just the derivative of x+1?

39. escolas

no 2sinx

40. zepdrix

$\large x+1=2\sin \theta$We want to take the derivative of both sides, with respect to x. Yah good, both sides.

41. escolas

$2\cos \theta$?

42. zepdrix

Err maybe we want to take it with respect to theta, then we don't have the chain rule. It won't matter either way, I'm just trying to think about what will be easier to understand.

43. zepdrix

$\large dx=2\cos \theta\; d \theta$That's what you came up with? yah looks good.

44. escolas

Ok cool this still isn't loooking too great haha

45. zepdrix

XD

46. escolas

Oh do the cosines cancel out?

47. zepdrix

$\large \int\limits\limits\frac{ 2\sin \theta-1}{ 4\cos ^2 \theta }(2\cos \theta \;d \theta)$It looks like we can make a few cancellations.$\large \int\limits\limits\limits\frac{ \cancel2\sin \theta-1}{ \cancel4\cos^{\cancel2\;1} \theta }(\cancel2\cancel{\cos \theta} \;d \theta)$

48. escolas

the -1 is still messing with it though, isn't it?

49. zepdrix

$\large \int\limits \frac{\sin \theta-1}{\cos \theta}d \theta$ Leaving us with this I believe.

50. zepdrix

Yes it is! But notice that the -1 is now on TOP!

51. escolas

haha is that better?

52. zepdrix

When it's in the bottom, that causes a real problem. When it's in the TOP, we can just split it up into a couple of fractions! :)

53. escolas

that makes sense...so you'd end up with the integral of tanx and the integral of secx? Well not exactly but pretty much, right?

54. zepdrix

Yes good, tan - sec i think.

55. escolas

But we're now in terms of theta rather than x, will it be hard to change back?

56. zepdrix

Which are actually... both... really terrible terms to integrate, you want to memorize both of these :) lol

57. zepdrix

Yes it will be a little bit tricky to change back, it will require us to setup a triangle and do some quick side work. It's not too bad though.

58. escolas

secx is secxtanx i think? but i can't remember tanx...

59. zepdrix

No, Integrating, secxtanx gives secx. Not the other way around :) We're going to get a couple of logs from both of these terms.

60. escolas

crap haha how do you integrate them then? are they just formulas?

61. escolas

Ah I found them in the back of my book

62. zepdrix

I don't really wanna go through the steps of integrating them right now XD It'll take too much time lol. So yes, for now let's just refer to the formulas.$\large \int\limits \sec \theta d \theta \quad = \quad \ln|\sec \theta+\tan \theta|$$\large \int\limits \tan \theta d \theta \quad = \quad -\ln|\cos \theta|$

63. zepdrix

Oh ok cool c:

64. zepdrix

the tangent can also be written as $\large \ln|\sec \theta|$By bringing the negative in as a power. Depending on which way you want to write it.

65. escolas

Are the absolute values gonna make things even more difficult?

66. zepdrix

No, I don't think we need to worry about that. We'll include the bars in our final answer but that's the jist of it. If we had a definite integral, and were plugging values in, we might want to be extra careful, but not in this case.

67. escolas

Ok cool, so now i solve for theta right?

68. escolas

$\theta=\sin^{-1} \frac{ x+1 }{2 }$

69. zepdrix

$\int\limits \tan \theta - \sec \theta \; d \theta$ $= \ln|\sec \theta|-\ln|\sec \theta+ \tan \theta|+C$ So this is what we came up with so far right?

70. escolas

Right! and does that make sense?

71. zepdrix

Let's not do that, if we had a lonesome $$\theta$$ somewhere in our solution, then we would have to include the arcsine function. But since we have only trig functions in our solution, we'll do some triangle math.

72. escolas

Ah ok, I just figured we could get the angles theta was with triangles and then take the tan and sec of those! What do we need to do?

73. zepdrix

|dw:1359837750633:dw|$x+1=2\sin \theta \qquad \rightarrow \qquad \sin \theta=\frac{x+1}{2} \qquad \rightarrow \qquad \sin \theta=\frac{opposite}{hypotenuse}$

74. escolas

then use pythagorean to find that that side is well i'm too dumb to do that in my head actually. haha i have to write it down..

75. zepdrix

I think we end with something likeeeeee$\large \sqrt{2^2-(x+1)^2} \qquad = \qquad \sqrt{4-(x+1)^2}$

76. escolas

Yep just wrote it out! So then I find the secant and tangent of that triangle?

77. zepdrix

Notice how that value under the square root actually matches the denominator we started with? That will always happen.. If I'm remembering correctly. You should always see your initial substitution.. thing, in the triangle somewhere.

78. zepdrix

Yes good :)

79. escolas

wow thats interesting....and i can just leave the answer like that, right?

80. escolas

well the logs can simplify to one over the other actually right?

81. zepdrix

|dw:1359838191896:dw|

82. zepdrix

Hmm yah you could combine the logs i suppose, but not much simplification is needed after you've put it back in x.

83. zepdrix

Just don't forget that +C! lol

84. escolas

Yea it'll probably make it more messy if anything

85. escolas

ah thank you so much!

86. zepdrix

No prob \c:/ hopefully this all makes a bit more sense now!

87. escolas

it makes a ton more sense haha, sadly i never learned that so I was very confused when i saw those directions..