First order DE with integrating factor

Click For Summary

Homework Help Overview

The discussion revolves around solving a first-order differential equation using an integrating factor. The equation presented is (x+y^2)-2xyy'=0, and participants are exploring the appropriate methods to find an integrating factor and solve the equation.

Discussion Character

  • Exploratory, Assumption checking, Mathematical reasoning

Approaches and Questions Raised

  • Participants discuss the assumption that y does not depend on x, which leads to confusion regarding the nature of the differential equation. There are attempts to derive the integrating factor and questions about the validity of the methods used. Some participants suggest recalling the standard form for applying integrating factors and consider substitutions to simplify the problem.

Discussion Status

The discussion is ongoing, with various approaches being explored. Some participants have provided guidance on how to correctly set up the differential equation and the implications of treating variables as independent. There is no explicit consensus on the best method, but several productive lines of reasoning are being examined.

Contextual Notes

Participants note the importance of understanding the reasoning behind their methods, as well as the potential pitfalls of making assumptions about variable dependencies. The discussion highlights the complexity of finding suitable substitutions and integrating factors in differential equations.

fluidistic
Gold Member
Messages
3,932
Reaction score
283

Homework Statement


I'm having a hard time to solve the following DE using an integrating factor, I'm asked to find one and solve the DE.
(x+y^2)-2xyy'=0.

Homework Equations


The Attempt at a Solution


If I call u=u(x) (I assume the integrating factor depends only on x, not on y), the following must hold: \frac{\partial}{\partial y} [u\cdot (x+y^2)]= \frac{\partial}{\partial x} (-2xyu). This lead me to 2yu=-2(y'ux+yu'x+yu). I tried to find u(x) but this lead me nowhere. Any idea on how to proceed?

Edit: Nevermind guys I got it! I had to assume that y didn't depend on x. I reached the result that wolfram alpha gives so problem solved!
 
Last edited:
Physics news on Phys.org
fluidistic said:
Edit: Nevermind guys I got it! I had to assume that y didn't depend on x. I reached the result that wolfram alpha gives so problem solved!

Sounds like you lucked into the correct final answer. y(x) is clearly a function of x, so assuming that it isn't is a bad idea.

Instead, start by recalling what form your differential equation must be into use an integrating factor: is your DE in that form? If not, is there a substitution you can use to get it into that form?
 
Not only that but if y does not depend on x then y' = dy/dx = 0 right?
Which makes nonsense of the question!

If this is a long-answer question, the marks will not depend so much on the answer but on the method used. This is a good example of why that is: you can just luck-out.
 
Here is my work, it's not graded by the way.
\frac{\partial}{\partial y} [u\cdot (x+y^2)]= \frac{\partial}{\partial x} (-2xyu) \Rightarrow 2uy=-2y(u'x+u)\Rightarrow 2u =-u'x \Rightarrow \ln u = -2 \ln x (I omitted the constant of integration but it's fine in this case), thus u=x^{-2} which is the integrating factor. It works, I've checked that it indeed makes the DE as a perfect differential.
So that there exist a function F(x,y) such that \frac{\partial F}{\partial x} = \frac{x+y^2}{x^2} and \frac{\partial F}{\partial y}=-\frac{2xy}{x^2}. After integrating twice; once for each case, I reached that F(x,y)=\ln x - \frac{y^2}{x}.
Therefore the general solution to the DE under the implicit form is \ln x - \frac{y^2}{x}=c but I notice it's easy to get the explicit form for y(x), namely y(x)=\pm \sqrt {x(c+\ln x)}.
A guy in a go server told me that in general for these kind of DE's: P(x,y)dx+Q(x,y)dy=0 one consider x and y as independent variables for P and Q. I said ok thank you I'm going to try out... turns out that it worked well.
Is that just luck?!
Because if I consider that y depends on x, as I wrote in my first post I reach a nightmare of an equation.
In any case, I'm looking forward your substitution way gabbahey. I've no idea how to guess a good one.
 
Well: I'm not convinced you understand why what you did worked - in which case it was luck yes.

Formally, you'd put the DE in the form $$\frac{dy}{dx}+py = q$$... where everything is a function of x.

The integrating factor is $$f=e^{v(x)} : \frac{dv}{dx}=p$$

Starting with: $$\frac{dy}{dx}=\frac{x+y^2}{2xy}$$

I'd have substituted ##z=y^2## [1] to give:$$\frac{dz}{dx}-\frac{z}{x}=1$$suggesting that ##p=-1/x##, ##q=1## and ##v=\ln|1/x|## for an integrating factor: ##f=1/x## and $$z=x\int\frac{dx}{x} = x(\ln|x|+c)$$ $$\Rightarrow y = \pm\sqrt{x\ln|kx|}$$... which is what you have except I have brought the constant inside the natural logarithm - but that's a matter of taste if there is nothing else to go on.

Probably the takeaway lesson here is to make your reasoning as well as your calculation clear when you answer these things. Otherwise it all looks like happenstance ;)

-------------------

[1] Since you mentioned it:
I'm looking forward your substitution way gabbahey. I've no idea how to guess a good one.
I chose it because of the ##2yy^\prime## in the DE - if it was ##y^2+2yy^\prime## instead of ##y^2-2yy^\prime## I'd have gone for ##z=xy^2##.
You get used to it - the idea is to look for things that look like derivatives of another term in the DE.
 
Simon Bridge said:
Well: I'm not convinced you understand why what you did worked - in which case it was luck yes.

Formally, you'd put the DE in the form $$\frac{dy}{dx}+py = q$$... where everything is a function of x.

The integrating factor is $$f=e^{v(x)} : \frac{dv}{dx}=p$$

Starting with: $$\frac{dy}{dx}=\frac{x+y^2}{2xy}$$

I'd have substituted ##z=y^2## [1] to give:$$\frac{dz}{dx}-\frac{z}{x}=1$$suggesting that ##p=-1/x##, ##q=1## and ##v=\ln|1/x|## for an integrating factor: ##f=1/x## and $$z=x\int\frac{dx}{x} = x(\ln|x|+c)$$ $$\Rightarrow y = \pm\sqrt{x\ln|kx|}$$... which is what you have except I have brought the constant inside the natural logarithm - but that's a matter of taste if there is nothing else to go on.

Probably the takeaway lesson here is to make your reasoning as well as your calculation clear when you answer these things. Otherwise it all looks like happenstance ;)

-------------------

[1] Since you mentioned it:I chose it because of the ##2yy^\prime## in the DE - if it was ##y^2+2yy^\prime## instead of ##y^2-2yy^\prime## I'd have gone for ##z=xy^2##.
You get used to it - the idea is to look for things that look like derivatives of another term in the DE.
First of all thanks a lot. I've found out that I'm not good at all when searching for substitutions. In fact I had tried "hard" to transform the DE into the form \frac{dy}{dx}+py = q but failed to do so. I did not find the substitution you found out.

I'm so perplexed that I got the result by luck that I'm reading about perfect differential, namely http://en.wikipedia.org/wiki/Exact_differential#Two_and_three_dimensions and apparently when they do the partial derivatives, they consider all the other variables as constant. They say that A(x,y)dx+B(x,y)dy is a perfect differential if and only if \left( \frac{\partial A}{\partial y} \right)_x = \left( \frac{\partial B}{\partial x} \right)_y holds.
So when I did \left ( \frac{\partial (-2xyu)}{\partial x} \right ) it was perfectly fine to take y as a constant instead of y(x). So that would justify that I did not get the result by luck. However I'm still unsure why I take u as u(x) and not u only.
I still can't swallow that I got the result by error! That would be too much of a coincidence.
 
fluidistic said:
First of all thanks a lot. I've found out that I'm not good at all when searching for substitutions. In fact I had tried "hard" to transform the DE into the form \frac{dy}{dx}+py = q but failed to do so. I did not find the substitution you found out.
It is practice ... nobody starts out good at it. I gave you the basic guideline: you end up making guesses from slight hints and trying them out to see if they work. Gaining this skill is the purpose for giving you these problems to do.

I'm so perplexed that I got the result by luck that I'm reading about perfect differential, namely http://en.wikipedia.org/wiki/Exact_differential#Two_and_three_dimensions and apparently when they do the partial derivatives, they consider all the other variables as constant. They say that A(x,y)dx+B(x,y)dy is a perfect differential if and only if \left( \frac{\partial A}{\partial y} \right)_x = \left( \frac{\partial B}{\partial x} \right)_y holds.
Yep - you treat x and y as independent variables in A and B even though you know y is a function of x. It is not the same as "not assuming y(x)".

So when I did \left ( \frac{\partial (-2xyu)}{\partial x} \right ) it was perfectly fine to take y as a constant instead of y(x). So that would justify that I did not get the result by luck.
Yep - though your statement that you did not assume y(x) gave the game away a bit because
I'm still unsure why I take u as u(x) and not u only
See? You don't know why you used the method you did. The method was a useful one ... but when do you use y(x) and when just plain y?

You could try other examples and see how the u pans out as u(x) and not.
Look to the derivation of the method to see why it is u(x) ...

(Hint: difference between partial and regular differentiation.)
 

Similar threads

Replies
7
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
Replies
19
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
Replies
4
Views
2K
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
21
Views
2K