• Support PF! Buy your school textbooks, materials and every day products Here!

Solve the differential equation

  • Thread starter chwala
  • Start date
  • #1
chwala
Gold Member
613
41

Homework Statement:

solve the differential ##x(x+y)y^{'}=x^2+y^2## given initial conditions ##y=0, x=1##

Homework Equations:

differential equations
on introducing a term on both sides,
we have
##(x^2+xy-2xy)y^{'}=x^2+y^2-2xy##
##(x^2-xy)y^{'}=(x-y)^2##
##x(x-y)y^{'}=(x-y)^2##
##xy^{'}=(x-y)##
##y^{'}=1-y/x##
## v+x v^{'}=1-v## ...ok are the steps correct before i continue?
 
Last edited:

Answers and Replies

  • #2
12,338
8,727
Homework Statement:: solve the differential ##x(x+y)y^{'}=x^2+y^2##
Homework Equations:: differential equations

on introducing a term on both sides,
we have
##(x^2+xy-2xy)y^{'}=x^2+y^2-2xy##
You have ##-2xyy'## added on the left and only ##-2xy## on the right.
##(x^2-xy)y^{'}=(x-y)^2##
##x(x-y)y^{'}=(x-y)^2##
##xy^{'}=(x-y)##
##y^{'}=1-y/x##
## v+x v^{'}=1-v## ...ok are the steps correct before i continue?
 
  • #3
33,079
4,781
solve the differential ##x(x+y)y^{'}=x^2+y^2##
Should say "solve the differential equation..."
The substitution v = y/x will lead to a separable differential equation, assuming that I haven't made an error in the work I've done so far.
Keep in mind that v = y/x is equivalent to y = vx, so y' = v'x + vx' = v'x + v. Here y' means dy/dx and x' means dx/dx = 1.
 
  • #4
chwala
Gold Member
613
41
You have ##-2xyy'## added on the left and only ##-2xy## on the right.
yes, is that fine?
 
  • #5
chwala
Gold Member
613
41
Should say "solve the differential equation..."
The substitution v = y/x will lead to a separable differential equation, assuming that I haven't made an error in the work I've done so far.
Keep in mind that v = y/x is equivalent to y = vx, so y' = v'x + vx' = v'x + v. Here y' means dy/dx and x' means dx/dx = 1.
but thats what i did! ok, let me continue solving then you may countercheck me...
 
  • #6
33,079
4,781
yes, is that fine?
No. You can't add different quantities to the two sides.
 
  • #7
33,079
4,781
but thats what i did! ok, let me continue solving then you may countercheck me...
It's not at all obvious that this is what you did, plus, you started with an error on your first line.

If you use the substitution that I suggested, be sure to write something like "let v = y/x" so a reader can follow what you're doing. In your work, v and v' mysteriously appear, with no explanation of what they are, and since the preceding steps are incorrect, the substitution won't lead to a valid result.
##y^{'}=1-y/x##
## v+x v^{'}=1-v##
 
  • #8
chwala
Gold Member
613
41
##v+xv^{'}=1-v##
##xv^{'}=1-2v##
##\frac {dx} {x}= \frac {dv} {1-2v}##
letting ##u=1-2v## and integrating
## -\frac {1}{2} ln [1-2v]=ln x + ln k## where ##k## is a constant.
##-\frac {1}{2} ln [1-2v]=ln[xk]##
are the steps correct...
 
Last edited:
  • #9
chwala
Gold Member
613
41
It's not at all obvious that this is what you did, plus, you started with an error on your first line.

If you use the substitution that I suggested, be sure to write something like "let v = y/x" so a reader can follow what you're doing. In your work, v and v' mysteriously appear, with no explanation of what they are, and since the preceding steps are incorrect, the substitution won't lead to a valid result.
sorry, i assumed that you will know what i did...
 
  • #10
chwala
Gold Member
613
41
The textbook answer is ##y=x ln \frac {x}{(x-y)^{2}}##
 
Last edited:
  • #11
chwala
Gold Member
613
41
i am sorry i did not give the initial condition ## y(1)=0## that is ##y=0, x=1## i guess i am tired...time for the holidays...
 
Last edited:
  • #12
chwala
Gold Member
613
41
You have ##-2xyy'## added on the left and only ##-2xy## on the right.
i see:smile: implying my working is wrong, your input Fresh...guess am tired....
 
  • #13
chwala
Gold Member
613
41
No. You can't add different quantities to the two sides.
i need your input am stuck.
 
  • #14
12,338
8,727
Let's start from the beginning.
We have ##x(x+y)y^{'}=x^2+y^2## and ##y(1)=0##.
Then @Mark44 gave you the hint to substitute ##v=\dfrac{y}{x}##.

Now ##v'= \dfrac{y'x-y}{x^2} = \dfrac{y'}{x}-\dfrac{y}{x}\cdot \dfrac{1}{x}## or ##v'x=y'-v##.

Which equation do you get, if you divide the given one by ##x^2## and express the result in terms of ##x,v,v'##? And is this substitution allowed in the domain we are interested in? Why?
 
  • #15
chwala
Gold Member
613
41
ok i have followed your steps and it's interesting, i hadn't seen it that way! i did not expect to start with ##v=yx##...
ok dividing the equation by ##x^2##
am getting,
##(1+v)y^{'}=1+v^2##
therefore,
##v+x \frac {dv}{dx}= \frac {1+v^2} {1+v}## correct?
 
  • #16
12,338
8,727
Yes that's correct. I would also replace ##y'## by ##v'## and ##x## terms. You have now three variables (##x,y,v##), but we want only two (##x,v##). I haven't solved it yet, so I don't know the best way. But let's see what we get.
 
  • #17
12,338
8,727
Mark mentioned separation of the variables, too. (See post #3.) This means, we try to get all terms with an ##x## and one side and all terms with a ##v## on the other, preferably ##dx## and ##dv## in the numerators.
 
Last edited:
  • #18
chwala
Gold Member
613
41
ok let me solve it, am now getting after simplification,
##\frac {1+v} {1−v}## dv= ##\frac {dx} {x}##
on integration i am getting;
##2ln(1−v)−(1−v)=lnx##
→ ##2ln(1−v)− ln x= (1-v)##
 
Last edited:
  • #19
chwala
Gold Member
613
41
Mark mentioned separation of the variables, too. (See post #3.) This means, we try to get all terms with an ##x## and one side and all terms with a ##v## on the other, preferably ##dx## and ##dv## in the numerators.
thanks to you and Mark (i've known him for quite sometime :wink:)...
 
  • #20
12,338
8,727
ok let me solve it, am now getting after simplification,
##\frac {1+v} {1-v^2}## dv= ##\frac {dx} {x}##
I think this is wrong. I get from your ##v+ x\dfrac{dv}{dx}=\dfrac{1+v^2}{1+v}##
$$
\dfrac{dx}{x} = \dfrac{1}{\dfrac{1+v^2}{1+v}-v} \,dv= \dfrac{1+v}{1+v^2-v(1+v)} \,dv = \cdots
$$
and now you can integrate both sides.

Edit: I got the impression that you do too many steps in mind instead of writing them. To write is not only faster than to think, it helps to avoid mistakes, too.
 
  • #21
chwala
Gold Member
613
41
I think this is wrong. I get from your v+xdvdx=1+v21+vv+xdvdx=1+v21+v
$$
\dfrac{dx}{x} = \dfrac{1}{\dfrac{1+v^2}{1+v}-v} \,dv= \dfrac{1+v}{1+v^2-v(1+v)} \,dv = \cdots
$$
and now you can integrate both sides.

Edit: I got the impression that you do too many steps in mind instead of writing them. To write is not only faster than to think, it helps to avoid mistakes, too.
fresh i do not see how my step is wrong...i took
##\frac {1+v^2} {1+v} - v##= ##\frac {1+v^2-v-v^2} {1+v}##= ##\frac {1-v}{1+v}##
 
Last edited:
  • #22
12,338
8,727
i took, ## \frac {1+v^2}{1+v}## - ##v##=x##\frac {dv}{dx}##
You forgot the single ##v##. It is ##v + \ldots ##. And once you have the form ##\ldots dx = \ldots dv## you cannot simply drop the ##d-##terms. You have to integrate them: ##\int \ldots dx = \int \ldots dv##

The corrected version is ok, except for the integration part with the ##dx## and ##dv##.
 
  • #23
chwala
Gold Member
613
41
You forgot the single ##v##. It is ##v + \ldots ##. And once you have the form ##\ldots dx = \ldots dv## you cannot simply drop the ##d-##terms. You have to integrate them: ##\int \ldots dx = \int \ldots dv##

The corrected version is ok, except for the integration part with the ##dx## and ##dv##.
just check my previous comment, i took the ##v## to the rhs and solved algebraically...
 
  • #24
chwala
Gold Member
613
41
ok, let me take a small break, i am doing all this in a rush hence the mistakes, we chat later...
 
  • #25
33,079
4,781
ok let me solve it, am now getting after simplification,
##\frac {1+v} {1-v^2}## dv= ##\frac {dx} {x}##
I think this is wrong.
Yes. When you (@chwala) have the equation in x and v separated, you should be getting
$$\frac{1 + v}{1 - v}dv = \frac {dx}x$$
From there, integrate, and then undo the substitution.
 

Related Threads for: Solve the differential equation

  • Last Post
Replies
1
Views
756
  • Last Post
Replies
19
Views
2K
  • Last Post
Replies
5
Views
2K
  • Last Post
Replies
9
Views
1K
  • Last Post
Replies
1
Views
811
Replies
1
Views
1K
Replies
3
Views
1K
Replies
2
Views
464
Top