Evaluating the integral, correct?

  • Thread starter Thread starter Zack88
  • Start date Start date
  • Tags Tags
    Integral
Zack88
Messages
62
Reaction score
0

Homework Statement



Evaluate the integral

\int x^2 \cos mx dx

Homework Equations

Evaluating the integral, correct?

The Attempt at a Solution



u = x^2
du = 2x
dv = \cos mx
v= \frac {\sin mx }{m}

(x^2)(sin mx / m) - [integral] (sin mx / m)(2x)

(x^2)(sin mx / m) - 2 [integral] (sin mx / m) (x)

[My final answer:] (x^2)(sin mx / m) + 2 (cos mx / m) + c
 
Last edited:
Physics news on Phys.org
I believe you lost a term in evaluating the second term integral in this:

(x^2)(sin mx / m) - 2 [integral] (sin mx / m) (x) .

If you differentiate your final result,

(x^2)(sin mx / m) + 2 (cos mx / m) + c ,

you don't cancel out the additional terms beyond the original integrand...
 
i heard that i should do parts with xsinmx / m, should i do that?
 
Zack88 said:
i heard that i should do parts with xsinmx / m, should i do that?

Yes, you'll need to do that. In general, integration of functions defined by polynomials times sin kx, cos kx, or e^kx need multiple stages of integration by parts.
 
ok with doing parts again confuses me since i have xsinmx /m. The u should it be m? but then what is the derivative of m?
 
Zack88 said:
ok with doing parts again confuses me since i have xsinmx /m. The u should it be m? but then what is the derivative of m?

The 'm' is a constant, so that will not be involved in the integration. Make the integral
(1/m) · integral[ x sin(mx) ] dx . Now u = x and dv = sin(mx) dx . You can append the multiplicative constant (1/m) afterwards...
 
ok so now I have

x^2/m sinmx + 2/m [integral] xsinmx

u = x
du = dx

dv = sin mx
v = 1/m cos mx

and now I am lost
 
Ok let's start from scratch.

I=\int x^2\cos{mx}dx

u=x^2
du=2xdx

dV=\cos{mx}dx
V=\frac{1}{m}\sin{mx}

I=\frac{x^2}{m}\sin{mx}-\frac{2}{m}\int x\sin{mx}dx

Now we have to do Parts again.

u=x
du=dx

dV=\sin{mx}dx
V=\frac{-1}{m}\cos{mx}

I=\frac{x^2}{m}\sin{mx}-\frac{2}{m}\left(\frac{-x}{m}\cos{mx}+\frac{1}{m}\int\cos{mx}dx\right)

Now you can easily evaluate this Integral!
 
Last edited:
  • #10
Ok, I'm officially done typing! Sorry about that, had too many typographical errors.
 
  • #11
I=\frac{x^2}{m}\sin{mx}-\frac{2}{m}\left(\frac{-x}{m}\cos{mx}+\int\cos{mx}dx\right)
ok where did the last \int\cos{mx}dx\right) come from
 
  • #12
Zack88 said:
I=\frac{x^2}{m}\sin{mx}-\frac{2}{m}\left(\frac{-x}{m}\cos{mx}+\int\cos{mx}dx\right)
ok where did the last \int\cos{mx}dx\right) come from
By doing Parts again to evaluate ...

\int x\sin{mx}dx
 
  • #13
ok i see now, thank you, sad part is I am not done with this question and i have one more just like it :(
 
Last edited:
  • #14
Zack88 said:
ok i see now, thank you, sad part is I am not done with this question and i have one more just like it :(
Post it and we'll work on it step by step.
 
  • #15
[integral] e^-x cos 2x dx

u = e^-x
du = -e^-x

dv = cos 2x
v = sin 2x / 2
 
  • #17
I=\int e^{-x}\cos{2x}dx

u=e^{-x}
du=-e^{-x}dx

dV=\cos{2x}dx
V=\frac{1}{2}\sin{2x}

I=\frac{1}{2}e^{-x}\sin{2x}+\frac{1}{2}\int e^{-x}\sin{2x}dx

Ok done typing. Evaluate your current Integral, notice that your Original Integral reappears? Just move it to the left then divide by the constant and you're done!
 
Last edited:
  • #18
ok so \frac{1}{2}\int e^{-x}\sin{2x}dx turns into -1/2e^-xcos2x + c?
 
Last edited:
  • #19
You're supposed to have "2" Parts just like any Integration by Parts.

What is the other term?
 
  • #20
so i don't take the integral just yet? i do another integration by parts?
 
  • #21
Zack88 said:
so i don't take the integral just yet? i do another integration by parts?
Evaluate \frac{1}{2}\int e^{-x}\sin{2x}dx how you normally would.
 
  • #22
u = e^-x
du = -e^-x

dv = sin 2x
v= -1/2 cos 2x
 
  • #23
Yes, so now you've solved it?
 
  • #24
not quite, I am not sure how to put it all together I know i'll have 1/2e^-xsin2x but I am not sure how to put in the new u, du, dv, and v
 
  • #25
Zack88 said:
not quite, I am not sure how to put it all together I know i'll have 1/2e^-xsin2x but I am not sure how to put in the new u, du, dv, and v
Look at what I did in post 9.
 
  • #26
ok I am not done yet but have so far...

1/2e^-xsin2x + 1/2 (1/2 e^-x cos2 x

and that is where i stopped i didnt understand how you got + 1/m [integra] cosmx for post 9
 
  • #27
By Parts.

uV-\int Vdu
 
  • #28
lol sorry i saw (\frac{-x}{m}\cos{mx}+\frac{1}{m}\int\cos{mx}dx\right) as two different things
 
  • #29
so now i have 1/2 e^-x sin 2x + 1/2 (1/2 e^-x cos 2x + [integral] 1/2 e^-x cos 2x)
 
Last edited:
  • #30
so now do I finally take the integral (no more parts) to come out with the final answer?
 
  • #31
Do you notice that you get your original Integral back? Move it to the left side and add/subtract your Integral, then divide by the constant, and you're done.
 
  • #32
1/2 e^-x sin 2x + 1/2 (1/2 e^-x cos 2x + [integral] 1/2 e^-x cos 2x)

so take e^-x cos 2x from within the parenthesis and move it to the outside of the parenthesis leaving 1/2 [integral 1/2 x^-x cos 2x) in the parenthesis
 
  • #33
It's basically ...

a, b, c ... = terms from by doing Parts

I=a+b+c+\frac{1}{2}(d+I)

Now distribute your constant 1/2

I=a+b+c+\frac{1}{2}d+\frac{1}{2}I

Bring your Original Integral to the left side, and divide by the constant.

\frac{1}{2}I=a+b+c+\frac{1}{2}d

I=2a+2b+2c+d

Solved!
 
  • #34
ok i get the concept but now I am confused at what should be a, b, c, I know what d is and of course I. what I see is:

a = 1/2
b = e^-x
c = sin 2x
 
  • #35
a, b, c ... etc are just uV, they're solved and do not need to be integrated.
 
  • #36
now I am lost since its just uv do I just put in uv from the last u and v I got?
 
  • #37
I=\frac{1}{2}e^{-x}\sin{2x}+\frac{1}{2}\int e^{-x}\sin{2x}dx

u=e^{-x}
du=-e^{-x}dx

dV=\sin{2x}dx
V=-\frac{1}{2}\cos{2x}

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

I=\frac{1}{2}e^{-x}\sin{2x}-\frac{1}{4}e^{-x}\cos{2x}-\frac{1}{4}I

\left(1+\frac{1}{4}\right)I=\frac{1}{2}e^{-x}\sin{2x}-\frac{1}{4}e^{-x}\cos{2x}

Now just divide by the constant in front of I and it's solved!
 
Last edited:
  • #38
You should not have to "finally take the integral" at all! Please write out exactly what you have after the second integration by parts.
 
  • #39
1/2e^-x sin 2x + 1/2(1/2e^-x cos 2x + [integral] 1/2e^-x cos 2x)
 
  • #41
lol yes i did rocophysics, and before i forget I want to think you for all the help I am hoping i can apply this to the other problems i still have to do, I just reposted that because HallsofIvy asked and it never hurts to get more than one opinion.
 
  • #42
Oh sorry! Never hurts to get more opinions :-] Exactly why I have like 2 books per subject <3 Amazon and $5 books! If you need anymore help, just post your problems. I'm done doing my hw!
 
  • #43
cool i have one question how did you get a 1 + 1/4 in front of I, where did the 1 come from and why isn't 1/4 negative?
 
  • #44
Zack88 said:
cool i have one question how did you get a 1 + 1/4 in front of I, where did the 1 come from and why isn't 1/4 negative?
I=\frac{1}{2}e^{-x}\sin{2x}+\frac{1}{2}\int e^{-x}\sin{2x}dx

u=e^{-x}
du=-e^{-x}dx

dV=\sin{2x}dx
V=-\frac{1}{2}\cos{2x}

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

I=\frac{1}{2}e^{-x}\sin{2x}-\frac{1}{4}e^{-x}\cos{2x}-\frac{1}{4}I

\left(1+\frac{1}{4}\right)I=\frac{1}{2}e^{-x}\sin{2x}-\frac{1}{4}e^{-x}\cos{2x}

Now just divide by the constant in front of I and it's solved!
It is -\frac{1}{4}I I just edited my post to make it a little more clearer.

Also, it's 1+\frac{1}{4} b/c when I moved the I term from the right to the left, I basically factored out a common term of I rather than finding a common denominator and writing it as one term.

Left hand side I + \frac{1}{4}I=\left(1+\frac{1}{4}\right)I
 
Last edited:
  • #45
so if -\frac{1}{4}I was \frac{1}{4}I then it would be 1-\frac{1}{4}I ?
 
  • #46
Zack88 said:
so if -\frac{1}{4}I was \frac{1}{4}I then it would be 1-\frac{1}{4} ?
Yep, it's just all Algebra. That's why I started using I, makes it a little easier to see.

1\int \cos{2x}dx + \frac{1}{4}\int \cos{2x}dx

\left(1+\frac{1}{4}\right)\int\cos{2x}dx

\frac{5}{4}\int\cos{2x}dx
 
Last edited:
  • #47
ok then for


I=\frac{x^2}{m}\sin{mx}-\frac{2}{m}\left(\frac{-x}{m}\cos{mx}+\frac{1}{m}\int\cos{mx}dx\right)

how do I go about evaluting since I doesn't reappear. original problem \int x^2 \cos mx dxit was the first problem we did
 
  • #48
Zack88 said:
ok then for


I=\frac{x^2}{m}\sin{mx}-\frac{2}{m}\left(\frac{-x}{m}\cos{mx}+\frac{1}{m}\int\cos{mx}dx\right)

how do I go about evaluting since I doesn't reappear. original problem \int x^2 \cos mx dxit was the first problem we did
Your first problem is the simple, Integrate by Parts once, if that's not enough do it n many times as necessary till you reduce it. The 2nd one is special by the fact that it's "periodic" and your original Integral will reappear after nth time of doing Parts. Basically, just keep doing it till you see a pattern or that it's finally in a simple form that you can Integrate easily.

I=\frac{x^2}{m}\sin{mx}-\frac{2}{m}\left(\frac{-x}{m}\cos{mx}+\frac{1}{m}\int\cos{mx}dx\right)

This problem is practically solved now, just Integrate your last Integral. You only have cosine mx term, in which m is basically a constant.

\frac{1}{m^2}\sin{mx}+C

Solved!
 
Last edited:
  • #49
I=\frac{x^2}{m}\sin{mx}-\frac{2}{m}\left(\frac{-x}{m}\cos{mx}+\frac{1}{m}\int\cos{mx}dx\right)

so the -2/m distributes to both -x/m and 1/m so shouldn't \frac{1}{m^2}\sin{mx}+C be \frac{-2}{m^2}\sin{mx}+C
 
  • #50
Zack88 said:
I=\frac{x^2}{m}\sin{mx}-\frac{2}{m}\left(\frac{-x}{m}\cos{mx}+\frac{1}{m}\int\cos{mx}dx\right)

so the -2/m distributes to both -x/m and 1/m so shouldn't \frac{1}{m^2}\sin{mx}+C be \frac{-2}{m^2}\sin{mx}+C
Yes. Sorry I tend to group things, makes it easier to read and to keep track of things :-p
 
Back
Top