Integration - Indefinite - By Parts and U-Sub

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
8 replies · 2K views
FaraDazed
Messages
347
Reaction score
2

Homework Statement


Integrate the following indefinite integrals

A:[itex]\int e^x (x^2+1) dx[/itex]

B:[itex]\int e^x cos(3x+2) dx[/itex]

Homework Equations


[itex]\int u dv = uv - \int v du[/itex]

The Attempt at a Solution


Part A: I have done the following but when I use an integration calculator online its not what I have (although I suppose there's a few ways of doing it)

[tex] let \, u=x^2 +1 \,\, ∴ \, du=2x \\<br /> let \, dv=e^x \,\, ∴ \, v=e^x \\<br /> \\<br /> ∴e^x(x^2+1)-\int e^x 2x \, dx \\[/tex]
Then doing another by parts on that integral
[tex] let \, u=2x \,\, ∴ \, du=2 \\<br /> let \, dv=e^x \,\, ∴ \, v=e^x \\<br /> \\<br /> 2xe^x-2\int e^x \, dx = 2xe^x-2e^x + C[/tex]
Then plugging that into the first bit I get
[tex] e^x(x^2+1)-2xe^x-2e^x + C[/tex]For Part B:
I am really confused as it doesn't look like a u-sub problem and no matter which way around I set the variables to do a by parts problem, the resulting integral is no easier to solve than the original so any hints on where to start with that one would be much appreciated.

Thanks :)
 
Last edited:
Physics news on Phys.org
For part a), you've been a bit sloppy: omitted the dx on the integral, omitted the constant of integration and made a simple mistake on the second parts. I'd try again and be more careful.

For part b): maybe things will work out if you just keep going.
 
  • Like
Likes   Reactions: 1 person
PeroK said:
For part a), you've been a bit sloppy: omitted the dx on the integral, omitted the constant of integration and made a simple mistake on the second parts. I'd try again and be more careful.

For part b): maybe things will work out if you just keep going.

I can assure you that whilst I did my problem on paper, and in doing so did not forget the dx's and constant, when I came to type it into here using latex it was something I forgot to add yes sorry. I have now corrected the sloppyness, I am very new to integration by parts and well integration as a whole really. I would appreciate it if you could let me know where my error is on the second bit as I have gone through it several times and I might be blind to it by now. Thanks :)
 
FaraDazed said:

Homework Statement


Integrate the following indefinite integrals

A:[itex]\int e^x (x^2+1) dx[/itex]

B:[itex]\int e^x cos(3x+2) dx[/itex]


Homework Equations


[itex]\int u dv = uv - \int v du[/itex]


The Attempt at a Solution


Part A: I have done the following but when I use an integration calculator online its not what I have (although I suppose there's a few ways of doing it)

[tex] let \, u=x^2 +1 \,\, ∴ \, du=2x \\<br /> let \, dv=e^x \,\, ∴ \, v=e^x \\<br /> \\<br /> ∴e^x(x^2+1)-\int e^x 2x \, dx \\[/tex]
Then doing another by parts on that integral
[tex] let \, u=2x \,\, ∴ \, du=2 \\<br /> let \, dv=e^x \,\, ∴ \, v=e^x \\<br /> \\<br /> 2xe^x-2\int e^x \, dx = 2xe^x-2e^x + C[/tex]
Then plugging that into the first bit I get
[tex] e^x(x^2+1)-2xe^x-2e^x + C[/tex]
You have a sign error here. (-)(-)= +.


For Part B:
I am really confused as it doesn't look like a u-sub problem and no matter which way around I set the variables to do a by parts problem, the resulting integral is no easier to solve than the original so any hints on where to start with that one would be much appreciated.

Thanks :)
Yes, use integration by parts.
To start, let [itex]u= e^x[itex], [itex]dv= sin(3x+ 2)dx[/itex] so that [itex]du= e^xdx[/itex] and [itex]v= -(1/3)cos(3x+ 2)[/itex]. <br /> [tex]\int e^xsin(3x+ 2)dx= -(1/3)e^xcos(3x+2)+ (1/3)\int e^x cos(3x+ 2) dx[/tex]<br /> <br /> Now do pretty much the same thing: let [itex]u= e^x[/itex], [itex]dv= cos(3x+ 2)dx[/itex] so that [itex]du= e^xdx[/itex] and [itex]v= (1/3)sin(3x+ 2)[/itex]. That gives<br /> [tex]\int e^x sin(3x+ 2)dx= -(1/3)e^x cos(3x+2)+ (1/3)[(1/3)e^xsin(3x+2)- (1/3)\int e^x sin(3x+ 2)dx[/tex]<br /> [tex]\int e^x sin(3x+ 2)dx= -(1/3)e^x cos(3x+2)+ (1/9)e^xsin(3x+2)- (1/9)\int e^x sin(3x+ 2)dx[/tex]<br /> <br /> Now, <b>don't</b> try to integrate that last integral on the right- it is the same as on the left. Just add [itex](1/9)\int e^x sin(3x+ 2)dx[/itex] to both sides and divide by 2.[/itex][/itex]
 
  • Like
Likes   Reactions: 1 person
PeroK said:
Watch your pluses and minuses!

Ah right, yeah now after checking one of the integration calculators I can see that there should be a +2e^x term in it whereas I have a -2e^x term but still going through my calculation step by step I can't see how it becomes positive. I am sure there must be a negative times a negative somewhere but I cannot see it. It may be something to do with my understanding on how you do integration by parts when you have to do it twice by parts.
 
For part 2, my personal preference is to substitute for everything in the cos() term. So for me I'd just say 3x+2 = s and then you have 3dx = ds and the ex becomes e(s-2)/3. Then when I have a solution as a function of s I plug 3x+2 back in. I just think that doing the by parts with multiple variables in the exponent is easier. Just my preference.
 
  • Like
Likes   Reactions: 1 person
FaraDazed said:
[tex] 2xe^x-2\int e^x \, dx = 2xe^x-2e^x + C[/tex]
Then plugging that into the first bit I get
[tex] e^x(x^2+1)-2xe^x-2e^x + C[/tex]

Your mistake is nothing to do with parts, it's to do with -(-2) = 2:

[tex] e^x(x^2+1)-(2xe^x-2e^x) + C = e^x(x^2+1)-2xe^x+2e^x + C[/tex]
 
  • Like
Likes   Reactions: 1 person
PeroK said:
Your mistake is nothing to do with parts, it's to do with -(-2) = 2:

[tex] e^x(x^2+1)-(2xe^x-2e^x) + C = e^x(x^2+1)-2xe^x+2e^x + C[/tex]

Ah right yeah I can see it now. Sounds stupid but I couldn't see it as when I scan it and visualized it in my head, I was visualizing the end result with the parentheses around it like (2xe^x-2e^x) and therefore couldn't see as my answer is correct if I had the parentheses around that bit.I can see now though (thanks to you :) ) that that means without them I have to flip the signs.

Thanks :) I am off to bed for the night and have the next two days to go through part B. Thanks.