# Quick integral

1. Mar 13, 2012

### arl146

1. The problem statement, all variables and given/known data
what is e^(∫tan(x)dx) ?

2. Relevant equations

3. The attempt at a solution

my answer that i got was -cos(x) because the integral of tan(x) is -ln(cos(x))+C so e^ln(something) would just equal (something). which in this case that something is cos(x)

right?

2. Mar 13, 2012

### scurty

Almost! Remember this property of logs: $aln(x) = ln(x^{a})$. Can you see where your mistake is?

3. Mar 13, 2012

### arl146

hmm well im thinking about .. a*ln(x) .. would be (-1)*ln(cos x) for me. so that would really equal ln(arc cos(x)). so my answer is really inverse cos(x) ? lol

4. Mar 13, 2012

### scurty

Don't confuse inverse with reciprocal! You are raising $cos(x)+C$ to a power, what do you get then?

5. Mar 13, 2012

### arl146

ok i wasnt sure about that. 1/cos(x) or just sec(x)

6. Mar 13, 2012

### scurty

Only if $C = 0$, since you don't know that, you need the more general form: $\displaystyle\frac{1}{cos(x) + C}$. You have the correct idea though. Just remember if a term is being multiplied by natural log, you must bring it into the natural log before you can cancel $e^{ln(x)}$.

7. Mar 13, 2012

### arl146

8. Mar 13, 2012

### scurty

Hmm, I'm not sure exactly why they drop the C. I haven't taken DE in three years so I'm a bit rusty on it and forget why (I'm curious to know why they drop the C, hopefully someone else can explain it). For now just follow your book and your answer will be sec(x).

9. Mar 13, 2012

### arl146

ok thats fine .. would you maybe be able to explain what happens to right after it says in example 1 "Multiplying both sides of the differential equation by e^(x^3), we get"

how does the first expression equal the second? right before the part where they integrate both sides.. im confused on what happened to the 3x^2 and just in general what they did to get the 'or' part

10. Mar 13, 2012

### scurty

Sorry for the late reply, my internet went down and I only had my phone.

Try working backwards to see how they arrived at that equation:

$\frac{d}{dx}(e^{x^{3}}y) = 6x^{2}e^{x^{3}}$

Differentiate the left side to get:

$e^{x^{3}}\frac{dy}{dx} + 3x^{2}e^{x^{3}}y = 6x^{2}e^{x^{3}}$

Is that what was confusing you?

To get $e^{x^{3}}\frac{dy}{dx} + 3x^{2}e^{x^{3}}y = 6x^{2}e^{x^{3}}$, they multiplied $e^{x^{3}}$ on both sides of the expression $\frac{dy}{dx} + 3x^{2}y = 6x^{2}$.

Does that help clear it up? Sorry again for the late response. :(

11. Mar 13, 2012

### arl146

its cool, no big deal .. but ok i see how that works backwards .. i just dont see it the normal way through. im ok with how they got ex3$\frac{dy}{dx}$ + 3x2ex3y = 6x2ex3 that was just multiplying the integrating factor by both sides. but how the left side turns into $\frac{d}{dx}$(ex3y) is just confusing. is that something you work through or am i supposed to just see that it equals that?

12. Mar 13, 2012

### scurty

Okay, I see why now. Look at the line of text right before equation 3 on the first page:

We try to find I so that the left side of Equation 1, when multiplied by I(x), becomes the derivative of the product $I(x)y$.

So, basically, you multiply through by I(x) for the sole reason of simplifying the left hand side of the equation.

13. Mar 13, 2012

### arl146

yea thats understandable .. then later they said I(x)= e^(integral(P(x))dx). but i guess its something ill have to kind of work out then. like for my example i had (dy/dx)*sec(x) - y*tan(x)*sec(x) and i see that the left side equals (d/dx)(sec(x)*y) just by thinking about it like ok sec(x)*(dy/dx) that would have to be sec(x)*y because i do it "first times derivative of the second + second times derivative of the first" for the chain rule. and the second part y*tan(x)*sec(x) confirms that im right

14. Mar 13, 2012

### scurty

Hmm, I think you made a mistake with your choice of I(x). What was your differential equation? Because $\frac{d}{dx} (sec(x)y) = \frac{dy}{dx} sec(x) + y \cdot sec(x)tan(x) \neq \frac{dy}{dx} sec(x) - y \cdot sec(x)tan(x)$. Or did you typo that minus sign in there?

15. Mar 13, 2012

### arl146

the equation is y' = 2sin(2x) + y*tan(x)

16. Mar 13, 2012

### scurty

Okay, yeah, you made a sign error. Your P(x) = -tan(x) because the general form is $\frac{dy}{dx} + P(x)y = Q(x)$. Try the problem again and see what you come up with! The final answer is a nice simple answer.

17. Mar 13, 2012

### NewtonianAlch

18. Mar 13, 2012

### arl146

ok so if P(x) = -tan(x) then I(x) = e^(∫(-tan(x))dx) = e^(ln(cos(x))) = cos(x) which was my first answer by error *facepalm* lol

multiply I(x) by both sides of the equation...

cos(x) * (dy/dx - ytan(x)) = cos(x) * (2sin(2x))
$\frac{dy}{dx}$cos(x) - ycos(x)tan(x) = 2sin(2x)cos(x)
$\frac{dy}{dx}$cos(x) - ysin(x) = 2sin(2x)cos(x)
$\frac{d}{dx}$(ycos(x)) = 2sin(2x)cos(x)

integrate both sides...

ycos(x) = (-4/3)*(cos(x))^3 + C ----- i just put the right side integral into wolfram, not sure how that was done

y = (-4/3)*(cos(x))^2 + C/cos(x)

19. Mar 13, 2012

### scurty

That's what I got!

For a hint how to solve that integral, $sin(2x) = 2sin(x)cos(x)$. Then you do a u-substitution (remember how to do that?).

20. Mar 13, 2012

### arl146

ohhhh okay. i got it now. thanks a ton!