- #1

askor

- 166

- 9

**Mentor note: Moved from technical section, so missing the homework template.**

How do you integrate this?

$$\int \frac{1}{x^2 + 2} dx$$

My attempt is $$\ln |x^2 + 2| + C$$

Last edited by a moderator:

You are using an out of date browser. It may not display this or other websites correctly.

You should upgrade or use an alternative browser.

You should upgrade or use an alternative browser.

- Thread starter askor
- Start date

- #1

askor

- 166

- 9

How do you integrate this?

$$\int \frac{1}{x^2 + 2} dx$$

My attempt is $$\ln |x^2 + 2| + C$$

Last edited by a moderator:

- #2

- 23,186

- 14,689

Did you try differentiating your answer to see whether you get the integrand?

- #3

Mark44

Mentor

- 36,424

- 8,403

At least this time you showed an attempt. You can always check your work with an indefinite integral by differentiating your answer. If you do this and get the original integrand, your work is correct.How do you integrate this?

$$\int \frac{1}{x^2 + 2} dx$$

My attempt is $$\ln |x^2 + 2| + C$$

Note that ##\ln|x^2 + 2| = \ln(x^2 + 2)##, so the absolute value isn't needed.

$$\frac d {dx} \left( \ln(x^2 + 2)\right) = \frac 1 {x^2 + 2} \cdot \frac d {dx} (x^2 + 2)$$

Does that work out to your integrand?

Last edited:

- #4

Tapias5000

- 46

- 10

<Post edited by a mentor, to place more of the burden on the thread starter.>

Your answer is incorrect, for your answer to be valid you would have to alter the original problem in this way.

##

\begin{array}{l}\int _{ }^{ }\frac{2x}{x^2+2}dx\ \left(u=x^2+2,\ dx=\frac{du}{2x}\right)\\

\ln \left|x^2+2\right|+C\\\end{array}

##

obviously modifying the exercise is not valid.

Instead what you have to do is a trigonometric substitution.

Your answer is incorrect, for your answer to be valid you would have to alter the original problem in this way.

##

\begin{array}{l}\int _{ }^{ }\frac{2x}{x^2+2}dx\ \left(u=x^2+2,\ dx=\frac{du}{2x}\right)\\

\ln \left|x^2+2\right|+C\\\end{array}

##

obviously modifying the exercise is not valid.

Instead what you have to do is a trigonometric substitution.

Last edited by a moderator:

- #5

askor

- 166

- 9

<Post edited by a mentor, to place more of the burden on the thread starter.>

Your answer is incorrect, for your answer to be valid you would have to alter the original problem in this way.

##

\begin{array}{l}\int _{ }^{ }\frac{2x}{x^2+2}dx\ \left(u=x^2+2,\ dx=\frac{du}{2x}\right)\\

\ln \left|x^2+2\right|+C\\\end{array}

##

obviously modifying the exercise is not valid.

Instead what you have to do is atrigonometric substitution.

This is what I am looking for. Before my question is deleted, I asked for clues and hints. But my question is deleted because I don't write my attempt. I thought trigonometric substitution only work if there is available a square root such as ##\sqrt{x^2 + 2}##.

- #6

Tapias5000

- 46

- 10

You don't have to have a root to do it, you could even do a trigonometric substitution in this integralThis is what I am looking for. Before my question is deleted, I asked for clues and hints. But my question is deleted because I don't write my attempt. I thought trigonometric substitution only work if there is available a square root such as ##\sqrt{x^2 + 2}##.

## \int _{ }^{ }\left(x^2+2\right)dx ## and would get the same response as doing it the quickest way.

- #7

mathman

Science Advisor

- 8,077

- 547

.answer is of the form ##Aarctan(Bx)+C##. Work out the constants

- #8

mitochan

- 294

- 133

If you can integrate

[tex]\int \frac{1}{x^2+1} dx[/tex]

you are not far from the answer.

[tex]\int \frac{1}{x^2+1} dx[/tex]

you are not far from the answer.

- #9

- 5,695

- 2,473

- #10

Mark44

Mentor

- 36,424

- 8,403

No. Trig substitution is helpful if you have the sum or difference of squared terms - they don't need to be inside a square root.I thought trigonometric substitution only work if there is available a square root such as ##\sqrt{x^2 + 2}##.

- #11

bob012345

Gold Member

- 1,757

- 744

- #12

vela

Staff Emeritus

Science Advisor

Homework Helper

Education Advisor

- 15,671

- 2,310

The thread probably should have been in the homework forum.

- #13

Mark44

Mentor

- 36,424

- 8,403

Belatedly moved...The thread probably should have been in the homework forum.

- #14

Mayhem

- 254

- 139

Why not let ##u = x/\sqrt{2}##?

- #15

bob012345

Gold Member

- 1,757

- 744

Is there some simple easy trick I am missing that makes thisIf you can integrate

[tex]\int \frac{1}{x^2+1} dx[/tex]

you are not far from the answer.

- #16

Mayhem

- 254

- 139

Do you watch blackpenredpen ever? His strategy to integrals is sometimes "wouldn't it be nice if we could take [annoyingly difficult integral] and convert it into [something easy] to integrate. A simple, but hard to spot substitution can actually convert that integral into something that looks A LOT like the quoted integral.Is there some simple easy trick I am missing that makes thismucheasier than ##\int \frac{1}{x^2+2} dx##? You can tell me privately if you wish.

Also the integral of 1/x^2+1 is a standard integral, evaluating to arctan(x) + C.

- #17

bob012345

Gold Member

- 1,757

- 744

I know you can make it look like ##\int \frac{dx}{x^2+1}##with a trivial substitution which was already given in this thread but the question is then is there a clever trick that makes itDo you watch blackpenredpen ever? His strategy to integrals is sometimes "wouldn't it be nice if we could take [annoyingly difficult integral] and convert it into [something easy] to integrate. A simple, but hard to spot substitution can actually convert that integral into something that looks A LOT like the quoted integral.

Also the integral of 1/x^2+1 is a standard integral, evaluating to arctan(x) + C.

I think the issue is for the OP to do the integration and not just look it up as a 'standard' integral. My point is if you do the integration on both, they are the same difficulty are they not?

- #18

Mayhem

- 254

- 139

Why would you need a trig substitution? Once you do the clever substitution, the answer practically gives itself.I know you can make it look like ##\int \frac{dx}{x^2+1}##with a trivial substitution which was already given in this thread but the question is then is there a clever trick that makes itmucheasier to integrate than ##\int \frac{dx}{x^2+2}##using other substitutions after that?

I think the issue is for the OP to do the integration and not just look it up as a 'standard' integral. My point is if you do the integration on both, they are the same difficulty are they not?

I have no idea how to arrive at arctan(x) by integrating that. But it is actually fairly easy to prove that (arctan(x))' = 1/x

- #19

bob012345

Gold Member

- 1,757

- 744

My table of Integrals has the general case ##\int \frac{dx}{x^2+a^2}## as a 'standard' integral too, not just the case where ##a=1##. But I think this being a Calculus homework problem it is expected of the OP to figure out how to do it. Hints were given above.Why would you need a trig substitution? Once you do the clever substitution, the answer practically gives itself.

I have no idea how to arrive at arctan(x) by integrating that. But it is actually fairly easy to prove that (arctan(x))' = 1/x^{2}+2. Thus, using F'(x)=f(x), you can argue your case easily. Maybe you can find a trick to rewrite the integral such that you can do a partial fraction decomposition, but that just seems like a lot of work.

- #20

- 23,186

- 14,689

I'm intrigued. If the answer is an inverse trig function, then how can trig functions be avoided?Why would you need a trig substitution? Once you do the clever substitution, the answer practically gives itself.

- #21

Mayhem

- 254

- 139

Perhaps the confusion lies in me not evaluating 1/x^2+1 manually but simply using the standard integral. Thinking about it, that integral could probably be solved with trig substitution.I'm intrigued. If the answer is an inverse trig function, then how can trig functions be avoided?

- #22

Mark44

Mentor

- 36,424

- 8,403

See below.Why would you need a trig substitution?

It can be done very easily by using a trig substitution; namely ##x = \tan(\theta)##. With this substitution, the integration becomes trivial.I have no idea how to arrive at arctan(x) by integrating that.

You need more parentheses. Taken literally, what you have written (twice) would be interpreted to mean this:But it is actually fairly easy to prove that (arctan(x))' = 1/x^{2}+2

$$\frac 1 {x^2} + 2$$

Without LaTeX, the above should be written as 1/(x^2 + 2).

- #23

Tapias5000

- 46

- 10

You could use imaginary numbers then partial fractions and you will get 2 logarithms, so you can skip the trigonometric substitution in this case.I'm intrigued. If the answer is an inverse trig function, then how can trig functions be avoided?

- #24

bob012345

Gold Member

- 1,757

- 744

How about an unrelated example so as not to directly solve this integral but to illustrate the principle?You could use imaginary numbers then partial fractions and you will get 2 logarithms, so you can skip the trigonometric substitution in this case.

- #25

Mark44

Mentor

- 36,424

- 8,403

The main part is the algebra involved. Suppose we have ##\frac 1 {x^2 + 9}##.How about an unrelated example so as not to directly solve this integral but to illustrate the principle?

$$\frac 1 {x^2 + 9} = \frac 1 {(x + 3i)(x - 3i)} = \frac A {x + 3i} + \frac B {x - 3i}$$

After finding the constants A and B it's relatively simple to compute the integral ##\int \frac {dx}{x^2 + 9}## as it can now be written as two simpler integrals.

- #26

vela

Staff Emeritus

Science Advisor

Homework Helper

Education Advisor

- 15,671

- 2,310

And it's left as an exercise to the reader to show that one solution can be transformed into the other.You could use imaginary numbers then partial fractions and you will get 2 logarithms, so you can skip the trigonometric substitution in this case.

- #27

Tapias5000

- 46

- 10

That's the idea, it also works when x^2 is being multiplied by a number like for example:How about an unrelated example so as not to directly solve this integral but to illustrate the principle?

## \int _{ }^{ }\frac{1}{5x^2+9}dx ##

## 5x^2+9=0 ##

##x^2=-\frac{9}{5} ##

## x=\frac{3i}{\sqrt{5}},\ \ x=-\frac{3i}{\sqrt{5}}\ →\ \left(\sqrt{5}x-3i\right)\left(\sqrt{5}x+3i\right)##

##\frac{1}{\left(\sqrt{5}x-3i\right)\left(\sqrt{5}x+3i\right)}=\frac{A}{\left(\sqrt{5}x-3i\right)}+\frac{B}{\left(\sqrt{5}x+3i\right)} ##

Basically we can generalize this type of integral to:

## \int _{ }^{ }\frac{1}{nx^2+a}dx ## where n≠0 and a≠0 where a and n are a number with a positive sign

obtaining ##\int _{ }^{ }\frac{1}{\left(\sqrt{n}x-\sqrt{a}i\right)\left(\sqrt{n}x+\sqrt{a}i\right)}dx ##

- #28

bob012345

Gold Member

- 1,757

- 744

I assume the integration is just over real numbers and the ##i## is treated as a constant? Don't answer I'll figure that out...but frankly, this seems to be aThe main part is the algebra involved. Suppose we have ##\frac 1 {x^2 + 9}##.

$$\frac 1 {x^2 + 9} = \frac 1 {(x + 3i)(x - 3i)} = \frac A {x + 3i} + \frac B {x - 3i}$$

After finding the constants A and B it's relatively simple to compute the integral ##\int \frac {dx}{x^2 + 9}## as it can now be written as two simpler integrals.

Last edited:

- #29

bob012345

Gold Member

- 1,757

- 744

I tried but I cannot see how ##A,B## areThe main part is the algebra involved. Suppose we have ##\frac 1 {x^2 + 9}##.

$$\frac 1 {x^2 + 9} = \frac 1 {(x + 3i)(x - 3i)} = \frac A {x + 3i} + \frac B {x - 3i}$$

After finding the constants A and B it's relatively simple to compute the integral ##\int \frac {dx}{x^2 + 9}## as it can now be written as two simpler integrals.

- #30

ergospherical

- 876

- 1,211

- #31

bob012345

Gold Member

- 1,757

- 744

I originally assumed ##A,B## were real leading to trouble. That's when I made that comment. I realized later they might be complex but it was too late. Thanks!

- #32

Mark44

Mentor

- 36,424

- 8,403

Both are imaginary constants. I get A = i/6 and B = -i/6.I tried but I cannot see how ##A,B## areconstants?

- #33

bob012345

Gold Member

- 1,757

- 744

I got that too. Now for fun I'll try the original integral this way but quietly...Both are imaginary constants. I get A = i/6 and B = -i/6.

- #34

mathwonk

Science Advisor

Homework Helper

- 11,391

- 1,626

To integrate dx/(1+x^2), we put x = tan(t), and dx = sec^2(t)dt, and get the integral as t. and since x= tan(t), we have t = arctan(x).

in your case you have 2+x^2 which looks like 1+tan^2, except off by a constant. now constant multipliers do no harm so you could try setting 2+x^2 = c(1+tan^2(t)), and go from there.

complex methods are also fun and illuminating, but sometimes may give non real answers. of course if you know e^it = cos(t) + i sin (t), you can often find your way back.

In fact when you look at complex numbers and complex path integrals, log and arctan are somewhat the same, except for interchanging i and -i with 0 and infinity, since integration of 1/(1+z^2) behaves the same as you go around i and -i as integrating 1/z does as you go around 0 and infinity!

- #35

bob012345

Gold Member

- 1,757

- 744

Finished and got the same results but converting from the natural log form was not trivial unless one already knew about the relationship as mentioned by @mathwonk above, which I didn't but now I do. So, yes, it can be done without a trig substitution but to me, not as easily.I got that too. Now for fun I'll try the original integral this way but quietly...

But in a way both are doing similar things in that one is mapping the problem from a one dimensional space to a two dimensional space, the ##x,y## plane with an angle in one case and the complex plane in the other.

Share: