Integration - Indefinite - By Parts and U-Sub

In summary, the student attempted to solve two indefinite integrals, but made mistakes with the notation and integration calculator.
  • #1
FaraDazed
347
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 \\
let \, dv=e^x \,\, ∴ \, v=e^x \\
\\
∴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 \\
let \, dv=e^x \,\, ∴ \, v=e^x \\
\\
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
  • #2
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 1 person
  • #3
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 :)
 
  • #4
Watch your pluses and minuses!
 
  • Like
Likes 1 person
  • #5
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 \\
let \, dv=e^x \,\, ∴ \, v=e^x \\
\\
∴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 \\
let \, dv=e^x \,\, ∴ \, v=e^x \\
\\
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].
[tex]\int e^xsin(3x+ 2)dx= -(1/3)e^xcos(3x+2)+ (1/3)\int e^x cos(3x+ 2) dx[/tex]

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
[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]
[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]

Now, don't 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.
 
  • Like
Likes 1 person
  • #6
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.
 
  • #7
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 1 person
  • #8
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 1 person
  • #9
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.
 

FAQ: Integration - Indefinite - By Parts and U-Sub

1. What is the purpose of integration by parts and u-substitution?

Integration by parts and u-substitution are techniques used to evaluate integrals that cannot be easily solved by the basic integration rules. They allow us to break down complex integrals into simpler ones that can be solved using known methods.

2. How do I know when to use integration by parts versus u-substitution?

The choice between integration by parts and u-substitution depends on the form of the integral. Integration by parts is used when the integral can be expressed as the product of two functions, while u-substitution is used when the integral contains a composite function.

3. What is the general formula for integration by parts?

The general formula for integration by parts is ∫udv = uv - ∫vdu, where u and v are functions and du and dv are their differentials. This formula can be derived from the product rule of differentiation.

4. How do I choose u and dv in integration by parts?

The choice of u and dv depends on the integral. In general, u should be a function that becomes simpler after differentiating and dv should be a function that becomes simpler after integrating. A common mnemonic to remember the order is LIATE (Logarithmic, Inverse trigonometric, Algebraic, Trigonometric, Exponential).

5. What is the process for u-substitution?

The process for u-substitution involves substituting a variable in the integral with a new variable, u, and then rewriting the integral in terms of u. This allows us to convert the integral into a simpler form that can be solved using known integration rules. After solving, we can convert back to the original variable.

Similar threads

Replies
15
Views
1K
Replies
4
Views
1K
Replies
22
Views
2K
Replies
14
Views
1K
Replies
1
Views
994
Replies
5
Views
977
Replies
7
Views
1K
Replies
8
Views
1K
Replies
21
Views
2K
Back
Top