Solve the differential equation

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
44 replies · 5K views
chwala
Gold Member
Messages
2,843
Reaction score
428
Homework Statement
solve the differential ##x(x+y)y^{'}=x^2+y^2## given initial conditions ##y=0, x=1##
Relevant 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:
Physics news on Phys.org
chwala said:
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?
 
chwala said:
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.
 
fresh_42 said:
You have ##-2xyy'## added on the left and only ##-2xy## on the right.

yes, is that fine?
 
Mark44 said:
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 that's what i did! ok, let me continue solving then you may countercheck me...
 
chwala said:
but that's 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##
 
  • Like
Likes   Reactions: chwala
##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:
Mark44 said:
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...
 
The textbook answer is ##y=x ln \frac {x}{(x-y)^{2}}##
 
Last edited:
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:
fresh_42 said:
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...
 
Mark44 said:
No. You can't add different quantities to the two sides.

i need your input am stuck.
 
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?
 
  • Like
Likes   Reactions: chwala
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?
 
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:
fresh_42 said:
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:)...
 
chwala said:
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.
 
fresh_42 said:
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:
chwala said:
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##.
 
fresh_42 said:
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...
 
ok, let me take a small break, i am doing all this in a rush hence the mistakes, we chat later...
 
chwala said:
ok let me solve it, am now getting after simplification,
##\frac {1+v} {1-v^2}## dv= ##\frac {dx} {x}##
fresh_42 said:
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.
 
  • Like
Likes   Reactions: chwala
fresh_42 said:
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##.
It's simpler to write the first equation as ##y = vx##, and then use the product rule rather than the quotient rule to get ##y' = v'x + v##
 
Mark44 said:
It's simpler to write the first equation as ##y = vx##, and then use the product rule rather than the quotient rule to get ##y' = v'x + v##
Yes, but you already did this earlier, so I gave the alternative. I thought it is less confusing: We substitute ##v## but differentiate ##vx##?
 
fresh_42 said:
I thought it is less confusing: We substitute v but differentiate vx.
I don't see any part of it that is confusing. We have v in terms of x and y (i.e., v = y/x). We can instead work with the equivalent* equation y = vx, and from it take derivatives, as I described.
* - equivalent in any interval for x that doesn't include 0

Both of us ended up with the same equation for y'. All I was saying that, all things being equal, using the product rule is to be preferred over using the quotient rule, as the latter is more involved and easier to get wrong.
 
Mark44 said:
I don't see any part of it that is confusing.
It's not confusing me.
Mark44 said:
Both of us ended up with the same equation for y'. All I was saying that, all things being equal, using the product rule is to be preferred over using the quotient rule, as the latter is more involved and easier to get wrong.
Funny thing is that it is upside down. While you can memorize the quotient rule, I always need to go with the product rule. Here we changed the parts.
 
  • Like
Likes   Reactions: chwala
kindly check my post 18...i think it was just fine i have seen the error in typing ##(1-v^2)## in post 15... instead of ##(1-v)##...corrected in post 18...