Confused about holding variables constant during integration

Click For Summary

Discussion Overview

The discussion revolves around the treatment of variables during integration, specifically in the context of double integrals and differential equations. Participants explore when it is valid to hold certain variables constant while integrating and the implications of variable dependencies in these scenarios.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • Some participants propose that in a double integral, one can treat the inner integral separately by holding a variable constant, as in ##\int_{x_1}^{x_2} f(x,y) dx##.
  • Others argue that this approach is not universally valid, citing examples like the equation ##4x - 3y = \frac{dy}{dx}##, where holding ##y## constant leads to incorrect results.
  • A participant suggests that the inner integral can be viewed as a function of ##x## alone, reducing the function to one variable during that specific integration.
  • Another participant emphasizes that when integrating, the dependencies of the variables must be explicitly noted, particularly when one variable is a function of another.
  • Some participants discuss the importance of recognizing when a variable can be treated as a constant, noting that this is typically valid when the variable does not depend on the variable of integration.
  • There is a mention of the implicit function theorem as a way to handle cases where variables are interdependent.

Areas of Agreement / Disagreement

Participants express differing views on the validity of holding variables constant during integration. While some agree on the conditions under which this is permissible, others highlight the complexities and potential pitfalls, indicating that the discussion remains unresolved.

Contextual Notes

Participants note that the treatment of variables as constants depends on their relationships and dependencies, particularly in cases involving differential equations. The discussion reveals a need for careful consideration of variable roles in integration.

Who May Find This Useful

This discussion may be useful for students and practitioners dealing with calculus, particularly in understanding the nuances of integration involving multiple variables and the implications of variable dependencies.

etotheipi
For a double integral, we might treat the "inner integral" separately and be able to compute something like ##\int_{x_1}^{x_2} f(x,y) dx## by holding ##y## constant during the integration. The same technique is applied in other places too, like for solving exact differential equations. I haven't come across a proper name for this (partial antiderivatives?).

However, in general this doesn't appear to be a valid strategy. If I have the equation ##4x - 3y = \frac{dy}{dx}##, and rewrite this as ##\int (4x - 3y) dx = \int dy##, I can't then just hold ##y## constant on the left when I integrate both sides since evidently I'll get the wrong answer. Some other strategy needs to be used.

So why is it only permitted in some instances to hold certain variables constant? Thanks for your help!
 
Physics news on Phys.org
The best way to see it, is to write the functions as what they are. If we have ##\int \int f(x,y)\,dx\,dy## then we only consider the inner integral first, and that is only a function in ##x##: ##\int f(x,y)\,dx = \int \phi(x) \,dx##.

In case of the differential equation, we have ##f(x,y)=\dfrac{dy}{dx}=\dfrac{d}{dx}(y)=(D(x))(y)## and there is no separation of the variables. You cannot write ##f(x,y)=\phi(x)## if ##y## is still a variable on both sides. It would work if it was ##f(x,y)=\dfrac{dz}{dx}##.
 
  • Like
Likes   Reactions: QuantumQuest and etotheipi
fresh_42 said:
The best way to see it, is to write the functions as what they are. If we have ##\int \int f(x,y)\,dx\,dy## then we only consider the inner integral first, and that is only a function in ##x##: ##\int f(x,y)\,dx = \int \phi(x) \,dx##.

I think I can understand what you are saying from an operational perspective, but I'm still struggling on the rationale.

Why in the first instance does the function reduce to only one in ##x##; surely it's still dependent on ##y##?
 
etotheipi said:
For a double integral, we might treat the "inner integral" separately and be able to compute something like ##\int_{x_1}^{x_2} f(x,y) dx## by holding ##y## constant during the integration. The same technique is applied in other places too, like for solving exact differential equations. I haven't come across a proper name for this (partial antiderivatives?).

However, in general this doesn't appear to be a valid strategy. If I have the equation ##4x - 3y = \frac{dy}{dx}##, and rewrite this as ##\int (4x - 3y) dx = \int dy##, I can't then just hold ##y## constant on the left when I integrate both sides since evidently I'll get the wrong answer. Some other strategy needs to be used.

So why is it only permitted in some instances to hold certain variables constant? Thanks for your help!
Note that if we have a function of two variables ##f(x, y)##, we can define:
$$g(y) = \int_{x_1}^{x_2} f(x, y)dx$$
"Keeping ##y## constant" is no different from replacing ##y## with a "constant". Compare the above with:
$$b = \int_{x_1}^{x_2} f(x, a)dx$$
This is mathematically the same thing. Choose a real number ##a##, carry out the integral, get a real number ##b##. That's a function. You can just as well write:
$$g(a) = \int_{x_1}^{x_2} f(x, a)dx$$
 
  • Like
Likes   Reactions: QuantumQuest and etotheipi
etotheipi said:
I think I can understand what you are saying from an operational perspective, but I'm still struggling on the rationale.

Why in the first instance does the function reduce to only one in ##x##; surely it's still dependent on ##y##?
No, it is not within the limited context. The inner integral has ##y## only as dummy. We stripped the global context and considered only the local behavior of the inner integral. In case of ##3x-4y = y'## there is no way to separate ##y## and ## \;'\;##.

Another way to see it is the following:
From ##3x-4y=\dfrac{dy}{dx}## we get ## 3\int x\,dx - 4\int y(x)dx =\int 1\,dy## and we get the ##\int y(x)\,dx## term which doesn't vanish.
 
  • Like
Likes   Reactions: etotheipi
fresh_42 said:
No, it is not within the limited context. The inner integral has ##y## only as dummy.

Ah okay, that seems important. I think that makes sense, even if it is still a little hard for me to recognise!

PeroK said:
This is mathematically the same thing. Choose a real number ##a##, carry out the integral, get a real number ##b##. That's a function. You can just as well write:
$$g(a) = \int_{x_1}^{x_2} f(x, a)dx$$

The logic of this is clear, it's just the bit about deciding when it's safe (is that the right word...?) to hold it constant. It appears this is when the scope of that variable is limited to that one particular part. I'll need to think a little more about this to clear things up though!

Thanks for helping!
 
@etotheipi if you have doubts about these things, you can always go back to the formal statement of integration substituition:
$$\int_{x_1}^{x_2} y'(x) g(y(x)) dx = \int_{y(x_1)}^{y(x_2)} g(y) dy$$
In this case, if ##g## is the constant function we have:
$$\int_{x_1}^{x_2} y'(x) dx = \int_{y(x_1)}^{y(x_2)} dy$$
And the assumption on which this result is based and proved is that ##y(x)## is a single-variable function of ##x##. Your initial integral isn't of that form.
 
  • Love
Likes   Reactions: etotheipi
It is always a good strategy to note dependencies explicitly. E.g. in the definition of a limit we have: for every ##\varepsilon>0## there is a ##N## such that ... Better is to write: there is a ##N(\varepsilon)## such that ...

The same is true for functions. If ##f=f(x,y)## but the integral just ##\int f(x,y) dx## then the dependencies are only in the variable ##x##. The integral cannot know what you are doing with its constants elsewhere. And from the perspective of the integral, the ##dx## determines what to integrate.
 
  • Like
  • Love
Likes   Reactions: QuantumQuest and etotheipi
PeroK said:
@etotheipi if you have doubts about these things, you can always go back to the formal statement of integration substitution:

I quite like that, should be useful as a bit of a check!
fresh_42 said:
It is always a good strategy to note dependencies explicitly. E.g. in the definition of a limit we have: for every ##\varepsilon>0## there is a ##N## such that ... Better is to write: there is a ##N(\varepsilon)## such that ...

The same is true for functions. If ##f=f(x,y)## but the integral just ##\int f(x,y) dx## then the dependencies are only in the variable ##x##. The integral cannot know what you are doing with its constants elsewhere. And from the perspective of the integral, the ##dx## determines what to integrate.

Funnily enough I think @PeroK has actually also told me to do this before, so it seems like a pretty good idea! I seem to have a lot of issues similar to this when dealing with functions and derivatives and whatnot with more than one variable flying around...
 
Last edited by a moderator:
  • Like
Likes   Reactions: PeroK
  • #10
fresh_42 said:
If ##f=f(x,y)## but the integral just ##\int f(x,y) dx## then the dependencies are only in the variable ##x##.

Also, is this only true if ##y## is not a function of ##x##? Since otherwise I might just let ##f(x,y) = y## and we already established that ##\int y(x) dx## doesn't vanish.

I wonder if this is the key part. If ##y## is just another variable with no dependence on ##x## then I can see why we can pull it out and treat it as a constant, for reasons given in the above posts; whilst if ##y## does have a dependence on ##x##, i.e. in a differential equation, we have to be a bit more careful.
 
  • #11
etotheipi said:
Also, is this only true if ##y## is not a function of ##x##? Since otherwise I might just let ##f(x,y) = y## and we already established that ##\int y(x) dx## doesn't vanish.
Right. If ##y=y(x)## then it is no longer a constant in the integral, which is a function in ##x##. Cases ##f(y(x),x))## are dealt with in the implicit function theorem, although this lays the focus on derivatives and how to separate them.
I wonder if this is the key part. If ##y## is just another variable with no dependence on ##x## then I can see why we can pull it out and treat it as a constant, for reasons given in the above posts; whilst if ##y## does have a dependence on ##x##, i.e. in a differential equation, we have to be a bit more careful.
Yes. In this case it is no longer a constant for the integral, but part of the "integration command".
 
  • Like
Likes   Reactions: etotheipi
  • #12
etotheipi said:
If I have the equation ##4x - 3y = \frac{dy}{dx}##, and rewrite this as ##\int (4x - 3y) dx = \int dy##,

Why would taking an antiderivative with respect to x on the left side of an equation and taking an antiderivative with respect to y on the the right side produce an equivalent equation? It doesn't work for ##x^2 = 1##.
 
  • #13
etotheipi said:
For a double integral, we might treat the "inner integral" separately and be able to compute something like ##\int_{x_1}^{x_2} f(x,y) dx## by holding ##y## constant during the integration. The same technique is applied in other places too, like for solving exact differential equations. I haven't come across a proper name for this (partial antiderivatives?).

However, in general this doesn't appear to be a valid strategy. If I have the equation ##4x - 3y = \frac{dy}{dx}##, and rewrite this as ##\int (4x - 3y) dx = \int dy##, I can't then just hold ##y## constant on the left when I integrate both sides since evidently I'll get the wrong answer. Some other strategy needs to be used.

So why is it only permitted in some instances to hold certain variables constant? Thanks for your help!

If we have:
$$y(x) = e^{-3x} + \frac 4 3 x - \frac 4 9$$
Then:
$$4x - 3y = -3e^{-3x} + \frac 4 3$$
And:
$$\int(4x - 3y) dx = e^{-3x} + \frac 4 3 x + C = y(x) + C$$
Moreover:
$$\frac{dy}{dx} = 4x - 3y$$
Hence:
$$\int(4x - 3y) dx = \int \frac{dy}{dx} dx = \int dy = y(x) + C$$
So, as long as you are careful to treat ##y## as a function of ##x## properly this all works out.
 
Last edited:
  • #14
Stephen Tashi said:
Why would taking an antiderivative with respect to x on the left side of an equation and taking an antiderivative with respect to y on the the right side produce an equivalent equation? It doesn't work for ##x^2 = 1##.

I'm not too sure what you are saying; I integrated both sides with respect to ##x##.
PeroK said:
So, as long as you are careful to treat ##y## as a function of ##x## properly this all works out.

Thanks for this, it confirms what I suspected about the distinction.

One more thing; @fresh_42 said earlier that for ##f(x,y) = \frac{dz}{dx}##, the function ##f(x,y)## becomes essentially only a function of ##x##. How is it possible to tell in this case that ##y## is not a function of ##x##? If we were to solve it we'd get a relation between ##x,y,z## and surely that would make ##y## of the form ##y(x,z)##.
 
  • #15
etotheipi said:
One more thing; @fresh_42 said earlier that for ##f(x,y) = \frac{dz}{dx},## the function ##f(x,y)## becomes essentially only a function of ##x##. How is it possible to tell in this case that ##y## is not a function of ##x##?
It isn't. The situation ##y=y(x)## has been brought into discussion by you later IIRC. What I have said there was meant for a ##y## which doesn't depend on ##x##.
 
  • Like
Likes   Reactions: etotheipi
  • #16
fresh_42 said:
It isn't. The situation ##y=y(x)## has been brought into discussion by you later IIRC. What I have said there was meant for a ##y## which doesn't depend on ##x##.

Ah right, sorry! I see. I think that clears everything up that I had doubts about. Thanks everyone for your help!
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 29 ·
Replies
29
Views
5K
  • · Replies 20 ·
Replies
20
Views
4K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 29 ·
Replies
29
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K