Solve the differential equation

In summary: You are right, i think am tired. i am getting##\frac {1+v} {1+v^2}## dv= ##\frac {dx} {x}##i think i should have taken the negative sign with the ##ln##...##ln [1+v^2] -ln [1+v] =ln x####ln \frac {1+v^2} {1+v} =ln x####\frac {1+v^2} {1+v} = x####v^2 +v = x-1####(v+\frac {1}{2})^2 =x-1 +\frac
  • #1
chwala
Gold Member
2,571
343
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
  • #2
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?
 
  • #3
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.
 
  • #4
fresh_42 said:
You have ##-2xyy'## added on the left and only ##-2xy## on the right.

yes, is that fine?
 
  • #5
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...
 
  • #6
chwala said:
yes, is that fine?
No. You can't add different quantities to the two sides.
 
  • #7
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 chwala
  • #8
##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
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...
 
  • #10
The textbook answer is ##y=x ln \frac {x}{(x-y)^{2}}##
 
Last edited:
  • #11
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
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...
 
  • #13
Mark44 said:
No. You can't add different quantities to the two sides.

i need your input am stuck.
 
  • #14
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 chwala
  • #15
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
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.
 
  • Like
Likes chwala
  • #17
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
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
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:)...
 
  • #20
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.
 
  • #21
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:
  • #22
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##.
 
  • #23
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...
 
  • #24
ok, let me take a small break, i am doing all this in a rush hence the mistakes, we chat later...
 
  • #25
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 chwala
  • #26
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##
 
  • #27
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##?
 
  • #28
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.
 
  • #29
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 chwala
  • #30
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...
 
  • #31
chwala said:
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...
Close but wrong. We have ##\displaystyle{\int} \dfrac{dx}{x}= \ln x ## which you got right. But the other one is
$$
\int \dfrac{1+v}{1-v} \,dv = \int \dfrac{dv}{1-v} + \int \dfrac{v}{1-v}\,dv = - \ln |1-v| +\, ?
$$
The second integral doesn't result in a summand ##1-v##, which is what you got wrong. You can either solve ##\displaystyle{\int \dfrac{v}{1-v}\,dv}## by hand (integration by parts) or look it up in a table, e.g. Wikipedia, or check it with WolframAlpha.
 
  • Like
Likes Delta2
  • #32
fresh_42 said:
Close but wrong. We have ##\displaystyle{\int} \dfrac{dx}{x}= \ln x ## which you got right. But the other one is
$$
\int \dfrac{1+v}{1-v} \,dv = \int \dfrac{dv}{1-v} + \int \dfrac{v}{1-v}\,dv = - \ln |1-v| +\, ?
$$
The second integral doesn't result in a summand ##1-v##, which is what you got wrong. You can either solve ##\displaystyle{\int \dfrac{v}{1-v}\,dv}## by hand (integration by parts) or look it up in a table, e.g. Wikipedia, or check it with WolframAlpha.

therefore, are you implying that if i use substitution,
##u=1-v, v= 1-u, dv=-du, y(1)=0##
##-∫\frac {2-u}{u} du##=∫##\frac {dx} {x}##
##-2ln u+u-ln x=k##
using the initial condition ##y(1)=0, k=1##
therefore,
##-2ln (1-v)+(1-v)-ln x=1##
##1-\frac {y}{x}##=##1+ln x+ln (1-\frac {y}{x})^2##
:wink: ok...i will look at this again...i always learn math by making mistakes..
 
  • #33
chwala said:
therefore, are you implying that if i use substitution,
##u=1-v, v= 1-u, dv=-du, y(1)=0##
The initial condition is completely irrelevant here. It shouldn't play a role until after you have solved the differential equation in v and x, and then replaced v with y/x.
chwala said:
##-∫\frac {2-u}{u} du##=∫##\frac {dx} {x}##
##-2ln u+u-ln x=k##
using the initial condition ##y(1)=0, k=1##
therefore,
##-2ln (1-v)+(1-v)-ln x=1##
##1-\frac {y}{x}##=##1+ln x+ln (1-\frac {y}{x})^2##
:wink: ok...i will look at this again...i always learn math by making mistakes..
Several posts back you gave the book's solution. Does your solution here match that one? You can always verify that a solution you find is actually a solution by 1) confirming that your solution matches the initial condition, and 2) by confirming that you can differentiate your solution to get back to the given differential equation.
 
  • #34
Mark44 said:
The initial condition is completely irrelevant here. It shouldn't play a role until after you have solved the differential equation in v and x, and then replaced v with y/x.
Several posts back you gave the book's solution. Does your solution here match that one? You can always verify that a solution you find is actually a solution by 1) confirming that your solution matches the initial condition, and 2) by confirming that you can differentiate your solution to get back to the given differential equation.

i think the textbook answer might be wrong unless i am missing something, let me post all my steps now. Further, i think the initial condition is necessary so as to arrive at a solution. give me a moment i post all my steps...
 
  • #35
now we have,
∫##\frac {1+v}{1-v} dv = ∫\frac {dx}{x}##
Let ##u=1-v##, →##du= -dv## →##v=1-u##
-∫##\frac {2-u}{u} du= ∫\frac {dx}{x}##
∫##(1-2u^-{1}) du= ∫\frac {dx}{x}##
##u-2ln u-ln x=k##
on using ##y(1)=0, k=1##
##(1-v)-ln(u)^2-ln x=1##
1-##\frac {y}{x}-ln(1-yx^-1)^2-ln x=1##
-##\frac {y}{x}= ln (1-yx^-1)^2+ln x##
-##\frac {y}{x}=ln x [\frac {x^2-2xy+y^2}{x^2}##]
##-y=xln [\frac {x^2-2xy+y^2}{x}##]
##y=-xln [\frac {x^2-2xy+y^2}{x}##]
now the above is my steps...

the textbook solution is
##y=x ln [\frac {x}{x^2-2xy+y^2}]##
 
<h2>1. What is a differential equation?</h2><p>A differential equation is a mathematical equation that describes the relationship between a function and its derivatives. It involves variables, constants, and derivatives of the function, and is used to model various physical phenomena in fields such as physics, engineering, and economics.</p><h2>2. What is the purpose of solving a differential equation?</h2><p>The purpose of solving a differential equation is to find a function that satisfies the equation and describes the behavior of a system over time. This allows us to make predictions and understand the underlying principles of the system.</p><h2>3. How do you solve a differential equation?</h2><p>There are various methods for solving differential equations, depending on the type and complexity of the equation. Some common techniques include separation of variables, substitution, and using integrating factors. Advanced methods such as Laplace transforms and numerical methods may also be used for more complex equations.</p><h2>4. What are the applications of solving differential equations?</h2><p>Differential equations have numerous applications in science and engineering. They are used to model and understand the behavior of physical systems such as motion of objects, heat transfer, and population growth. They are also used in fields such as economics, biology, and chemistry to study complex systems and make predictions.</p><h2>5. What are the challenges of solving differential equations?</h2><p>Solving differential equations can be challenging due to the complexity and nonlinearity of the equations. It requires a good understanding of mathematical concepts and techniques, as well as knowledge of the specific application and physical principles involved. Additionally, some equations may not have analytical solutions and require numerical methods, which can be computationally intensive.</p>

1. What is a differential equation?

A differential equation is a mathematical equation that describes the relationship between a function and its derivatives. It involves variables, constants, and derivatives of the function, and is used to model various physical phenomena in fields such as physics, engineering, and economics.

2. What is the purpose of solving a differential equation?

The purpose of solving a differential equation is to find a function that satisfies the equation and describes the behavior of a system over time. This allows us to make predictions and understand the underlying principles of the system.

3. How do you solve a differential equation?

There are various methods for solving differential equations, depending on the type and complexity of the equation. Some common techniques include separation of variables, substitution, and using integrating factors. Advanced methods such as Laplace transforms and numerical methods may also be used for more complex equations.

4. What are the applications of solving differential equations?

Differential equations have numerous applications in science and engineering. They are used to model and understand the behavior of physical systems such as motion of objects, heat transfer, and population growth. They are also used in fields such as economics, biology, and chemistry to study complex systems and make predictions.

5. What are the challenges of solving differential equations?

Solving differential equations can be challenging due to the complexity and nonlinearity of the equations. It requires a good understanding of mathematical concepts and techniques, as well as knowledge of the specific application and physical principles involved. Additionally, some equations may not have analytical solutions and require numerical methods, which can be computationally intensive.

Similar threads

  • Calculus and Beyond Homework Help
Replies
1
Views
402
  • Calculus and Beyond Homework Help
Replies
6
Views
489
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
515
  • Calculus and Beyond Homework Help
Replies
2
Views
452
  • Calculus and Beyond Homework Help
Replies
5
Views
481
  • Calculus and Beyond Homework Help
Replies
1
Views
431
  • Calculus and Beyond Homework Help
Replies
27
Views
537
  • Calculus and Beyond Homework Help
Replies
6
Views
1K
Replies
7
Views
438
Back
Top