# Solve the differential equation

Gold Member

## 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:

Related Calculus and Beyond Homework Help News on Phys.org
fresh_42
Mentor
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?

Mark44
Mentor
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.

Gold Member
You have $-2xyy'$ added on the left and only $-2xy$ on the right.
yes, is that fine?

Gold Member
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...

Mark44
Mentor
yes, is that fine?
No. You can't add different quantities to the two sides.

Mark44
Mentor
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$

• chwala
Gold Member
$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:
Gold Member
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...

Gold Member
The textbook answer is $y=x ln \frac {x}{(x-y)^{2}}$

Last edited:
Gold Member
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:
Gold Member
You have $-2xyy'$ added on the left and only $-2xy$ on the right.
i see implying my working is wrong, your input Fresh...guess am tired....

Gold Member
No. You can't add different quantities to the two sides.
i need your input am stuck.

fresh_42
Mentor
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?

• chwala
Gold Member
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?

fresh_42
Mentor
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.

• chwala
fresh_42
Mentor
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:
Gold Member
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:
Gold Member
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 )...

fresh_42
Mentor
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.

Gold Member
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:
fresh_42
Mentor
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$.

Gold Member
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...

Gold Member
ok, let me take a small break, i am doing all this in a rush hence the mistakes, we chat later...

Mark44
Mentor
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.

• chwala