# Using the same substitution for integration twice

## Main Question or Discussion Point

When you have to integrate a function that requires substitution and you integrate it again, why is it wrong to keep the initial substitution?

e.g. y''=2x/(1+x^2)^2

If you let u=1+x^2 then y'=-(1/u)+C. Why is it wrong to integrate that again with respect to u and then change back to x at the end? I know it's not right but I can't see why

Because of the Jacobian (or how is it called in 1 dimension?), I mean the factor between du and dx.
You want to integrate with respect to x, but when you keep the substitution, what you will do is integrate with respect to u.

Simon Bridge
Homework Helper
That y' is dy/dx = c-1/u

you need dy/du on the LHS to integrate wrt u as the next step.

You'll end up with$$\int \frac{du}{dx}dy = \int \left ( c-\frac{1}{u} \right )du$$... but du/dx=2x ... and x depends on y.

Last edited:
So since we're integrating with respect to u on the right hand side, we have to do the same thing to the left?

In your equation, on the left hand side, did you just switch the places of du and dy so that it becomes with respect to dy? Is this always allowed?

Then du/dx=2x, and you said x depends on y...so we have to write x in terms of y? How would we do that?

Simon Bridge
Homework Helper
No no no no no!

What you asked in your first post amounted to: "why is it wrong to do this:": $$y=\int\left ( c-\frac{1}{u} \right )du$$... the reason is because the LHS does not match the RHS ... you made a mistake evaluating the LHS.

If you want to do the RHS integration wrt u, you have more work ahead of you: I'll take it slowly this time...

Starting with:$$\frac{dy}{dx}=c-\frac{1}{u}$$ I could rearrange that to be:$$dy = \left ( c-\frac{1}{u} \right )dx$$ and then integrate:$$\int dy = \int \left ( c-\frac{1}{u} \right )dx$$... but how are you going to be able to do the integration on the RHS?

Well you could just put $u=1+x^2$ back!

But it looks like it is easier to integrate wrt u instead ...

What I did before was start at the beginning and use the chain rule:$$\frac{dy}{dx} = \frac{du}{dx}\frac{dy}{du} = c-\frac{1}{u}$$... now I can multiply both sides by du to give: $$\frac{du}{dx}dy = \left ( c-\frac{1}{u}\right ) du$$ ... which is where I left you.

since we know that u=1+x2, we can find du/dx thus: $$\frac{du}{dx}=2x=2\sqrt{u-1}$$ ... substitute it in:$$2\sqrt{u-1}dy = \left ( c-\frac{1}{u}\right ) du$$... I need all the expressions involving u in the RHS:$$dy = \left ( c-\frac{1}{u}\right ) \frac{du}{\sqrt{u-1}}$$... now you get to integrate:
$$y = \int \left ( c-\frac{1}{u}\right ) \frac{du}{\sqrt{u-1}}$$... which is left as an exercize for the student :)

Aside
... one of the powers of Liebnitz notation is that you can manipulate all the dx's and dy's and so on like fractions ... they obey the same rules. So, the chain rule amounts to saying:$$\frac{dy}{dx}=\frac{du}{du}\frac{dy}{dx}=\frac{du}{dx}\frac{dy}{du}$$... handy if you know u(x) but don't know y(x): it turns the problem of finding y(x) into that of finding y(u) ... which we hope will turn out to be easier.

You asked if we can always treat the du's and so on like this and the answer is "yes" ... if you are careful. eg.$$\int \frac{dy}{dx}dx = \int dy = y$$

Starting from $$\frac{dy}{dx}=c-\frac{1}{u}$$ ... in order to be allowed to write an integration sign in front of an expression, the expression has to end in a d-something. eg. It makes no sense to write: $y=\int x^2$ ... it has to be $y=\int x^2 dx$ and this had to start out as something like $dy = x^2dx$...

So lets apply that to the problem in hand ... we want to integrate the RHS with respect to u, but there is no du there. Solution: multiply the RHS by du. Whatever you do the the RHS you have to do to the LHS to balance the equation so:
$$\frac{dy}{dx}du=\left ( c-\frac{1}{u}\right ) du$$... that is all square for the RHS ... but what about the LHS? None of the dy, dx, du cancel out - but I notice that$$\frac{dy}{dx}du = \frac{dydu}{dx} = \frac{du}{dx}dy$$... you asked "can we always do that?" And there is your answer!

Excellent, thanks a lot Simon!

Simon Bridge
Homework Helper
<whew> no worries qye?!

One last thing - is that really what we're doing when we integrate (in Leibniz notation) - multiply both sides by dx? It makes sense now but I've never seen it mentioned in any calculus text (perhaps I might've missed it?)

Simon Bridge
Homework Helper
That's very close ... the dx is to continuous sums what Δx is to discrete sums.
A continuous sum is written: S=∫f(x)dx and a discrete sum is S=Ʃf(xi)Δx

What you are doing is finding the area between the x-axis and f(x) for every value of x, and then adding them up ... so, for a particular value of x, the area is f(x)dx ... the integration sign tells you to add them up for a range of values of x.

In this way, an integration is a kind of continuous version of the sigma notation.
http://en.wikipedia.org/wiki/Integral_symbol

Does a continuous sum just mean the limit as Δx->0?

So if you had dx, that would mean a very small change in x? Then integrating would give x and you'd evaluate it between some limit of integration...it would just be a rectangle cause the original function was really 1..that makes sense