# Ode substitution method

1. Feb 3, 2009

### tony873004

1. The problem statement, all variables and given/known data
$$\left( {x + y} \right)y' = x - y$$

2. Relevant equations
Back of book:
$$x^2 - 2xy - y^2 = C$$

3. The attempt at a solution
I'm not sure how to start this problem. In the examples in the book, they make a substitution, v=something, and all that was left were v's and x's, or v's and y's. Usually it was an expression that appeared twice, so making a substution made sense. But if I set v=x+y, or v=x-y, I'm still left with v's, x's & y's. How do I start this one?

2. Feb 3, 2009

### Dick

You are giving up too fast. v=x+y will work. Just try harder. Notice e.g. y=v-x, so x-y=2x-v.

3. Feb 3, 2009

### tony873004

Thanks, I think I'm on a better path now. I get this far:
$$\begin{array}{l} \left( {x + y} \right)y' = x - y,\,\,\,\,\,\,\,\,\,v = x + y\,\,\,\, \Rightarrow \,\,\,\,y = v - x \\ \\ vy' = x - y\,\,\,\, \Rightarrow \,\,\,\,v\frac{{dy}}{{dx}} = x - v - x\,\,\,\, \Rightarrow \,\,\,\,v\frac{{d\left( {v - x} \right)}}{{dx}} = - v \\ \end{array}$$

This is where the example in the book just skips a step, so I don't know what to do next.

edit*** don't respond yet, let me try what u suggested

4. Feb 3, 2009

### Dick

Be careful. On the second line you should have x-(v-x). That doesn't simplify to -v. Just a warning.

5. Feb 3, 2009

### tony873004

It's starting to look like the back of the book! Am I making this harder than it needs to be?
$$\begin{array}{l} \left( {x + y} \right)y' = x - y,\,\,\,\,\,\,\,\,\,v = x + y\,\,\,\, \Rightarrow \,\,\,\,y = v - x\,\,\,\, \Rightarrow \,\,\,\,x - y = 2x - v \\ \\ vy' = 2x - v \\ \\ vy' + v = 2x\,\,\,\, \Rightarrow \,\,\,\,v\left( {y' + 1} \right) = 2x\,\,\,\, \Rightarrow \,\,\,\,x = v\left( {y' + 1} \right)\,\,\,\, \Rightarrow \,\,\,\,x = v\left( {\frac{{d\left( {v - x} \right)}}{{dx}} + 1} \right) \\ \\ x = v\left( {\frac{{dv - dx}}{{dx}} + 1} \right)\,\,\,\, \Rightarrow \,\,\,\,x = v\left( {\frac{{dv}}{{dx}} - \frac{{dx}}{{dx}} + 1} \right)\,\,\,\, \Rightarrow \,\,\,\,x = v\left( {\frac{{dv}}{{dx}} - 1 + 1} \right)\,\,\,\, \Rightarrow \,\,\,\, \\ \\ x = v\left( {\frac{{dv}}{{dx}}} \right)\,\,\,\, \Rightarrow \,\,\,\,vdv = xdx \\ \\ \int_{}^{} {v\,dv} = \int_{}^{} {x\,dx} \\ \\ \frac{{v^2 }}{2} + C_1 = \frac{{x^2 }}{2} + C_2 \\ \\ \frac{{\left( {x + y} \right)^2 }}{2} = \frac{{x^2 }}{2} + C_2 - C_1 ,\,\,\,\,\,\,\,C = \,C_2 - C_1 \\ \\ \frac{{\left( {x + y} \right)^2 }}{2} = \frac{{x^2 }}{2} + C\,\,\,\, \Rightarrow \,\,\,\,\frac{{x^2 + 2xy + y^2 }}{2} = \frac{{x^2 }}{2} + \frac{C}{2}\,\,\,\, \Rightarrow \,\,\,\,x^2 + 2xy + y^2 = x^2 + C\,\,\,\, \Rightarrow \,\, \\ \\ \frac{{x^2 + 2xy + y^2 }}{{x^2 }} = x^2 + C\,\,\,\,\,\, \Rightarrow \,\,\,\,\frac{{2xy + y^2 }}{{x^2 }} + 1 = x^2 + C \\ \end{array}$$

$$\begin{array}{l} \frac{{\left( {x + y} \right)^2 }}{2} = \frac{{x^2 }}{2} + C\,\,\,\, \Rightarrow \,\,\,\,\frac{{x^2 + 2xy + y^2 }}{2} = \frac{{x^2 }}{2} + \frac{C}{2}\,\,\,\, \Rightarrow \,\,\,\,x^2 + 2xy + y^2 = x^2 + C\,\,\,\, \Rightarrow \,\, \\ \\ \frac{{x^2 + 2xy + y^2 }}{{x^2 }} = x^2 + C\,\,\,\,\,\, \Rightarrow \,\,\,\,\frac{{2xy + y^2 }}{{x^2 }} + 1 = x^2 + C\,\, \\ \end{array}$$

6. Feb 3, 2009

### tony873004

That might be where my mistake lies. Gotta run to class now. I'll try that in a few hours. Thanks!!

7. Feb 3, 2009

### Dick

Wow. So many steps! But you dropped a 2 on the third line.

8. Feb 3, 2009

### tony873004

That 2 turned out to be important :)

$$\begin{array}{l} \left( {x + y} \right)y' = x - y,\,\,\,\,\,\,\,\,\,v = x + y,\,\,\,\,\,\,\,y = v - x,\,\,\,\,\,\,\,\,x - y = x - \left( {v - x} \right) = \,\,\,\, \Rightarrow \,\,\,\,x - y = x - v + x\,\,\,\, \Rightarrow \,\,\,\,x - y = 2x - v \\ \\ v\left( {v - x} \right)^\prime = 2x - y\,\,\,\, \Rightarrow \,\,\,\,v\frac{{d\left( {v - x} \right)}}{{dx}} = 2x - v\,\,\,\, \Rightarrow \,\,\,\,v\frac{{d\left( {v - x} \right)}}{{dx}} + v = 2x\,\,\,\, \Rightarrow \,\,\,\,v\left( {\frac{{d\left( {v - x} \right)}}{{dx}} + 1} \right) = 2x\,\,\,\, \Rightarrow \,\,\,\, \\ \\ v\left( {\frac{{dv - dx}}{{dx}} + 1} \right) = 2x\,\,\,\, \Rightarrow \,\,\,\,v\left( {\frac{{dv}}{{dx}} - \frac{{dx}}{{dx}} + 1} \right) = 2x\,\,\,\, \Rightarrow \,\,\,\,v\left( {\frac{{dv}}{{dx}} - 1 + 1} \right) = 2x\,\,\,\, \Rightarrow \,\,\,\, \\ \\ v\left( {\frac{{dv}}{{dx}}} \right) = 2x\,\,\,\, \Rightarrow \,\,\,\,v\,\,dv = 2x\,\,dx \\ \\ \int_{}^{} {v\,\,dv} = \int_{}^{} {2x\,\,dx} \\ \\ \frac{{v^2 }}{2} + C_1 = \frac{{2x^2 }}{2} + C_2 \\ \end{array} \$$

$$\begin{array}{l} \frac{{v^2 }}{2} = x^2 + C_2 - C_1 ,\,\,\,\,\,\,\,C_3 = C_2 - C_1 \\ \\ \frac{{v^2 }}{2} = x^2 + C_3 \,\,\,\, \Rightarrow \,\,\,\,\frac{{\left( {x + y} \right)^2 }}{2} - x^2 = C_3 \,\,\,\, \Rightarrow \,\,\,\,\frac{{x^2 + 2xy + y^2 }}{2} - x^2 = C_3 \,\,\,\, \Rightarrow \,\,\,\, \\ \\ x^2 + 2xy + y^2 - 2x^2 = 2C_3 \\ \\ - x^2 + 2xy + y^2 = 2C_3 ,\,\,\,\,\,\,\,\,\,\,\,\,\, - C = 2C_3 \, \\ \\ - x^2 + 2xy + y^2 = - C \\ \\ x^2 - 2xy - y^2 = C \\ \end{array} \$$

Same as the back of the book. Thanks!