# Differential equations

1. Jun 20, 2011

### Lindsayyyy

Hi

1. The problem statement, all variables and given/known data

$$y'=(y-x)^{2}$$

2. Relevant equations

3. The attempt at a solution

I have nearly no idea in order to solve this solution. One hint is given: We shall find a new variable which makes it possible to seperate the differential equation afterwards.
I'm not sure what's meant by "new variable". Shall I just find something cmpletly new, like let's call it z, or an addition like +x or *x etc.(just for example, I know this specific example doesn't work)?

1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution

2. Jun 20, 2011

### Clever-Name

First thing I can suggest is posting this in the right place. Differential equations are definitely NOT precalculus

3. Jun 20, 2011

### LCKurtz

Have you studied homogeneous functions? Your right side is homogeneous of degree 2 so try changing the dependent variable from y to u by y = ux.

[Edit:] Never mind this suggestion. When the equation is put in the form Mdx + Ndy = 0 not both M and N are homogeneous.

Last edited: Jun 20, 2011
4. Jun 20, 2011

### HallsofIvy

Staff Emeritus
Since it is the fact that it is y- x that is squared and not just x or y that is the problem, let z= y- x. Then z'= y'- 1 so that y'= z'+ 1= z^2. z'= z^2- 1.

Last edited: Jun 20, 2011
5. Jun 20, 2011

### Unit

When you get the answer, make sure you check it by taking the derivative - it's really cool how it works out! :)

6. Jun 20, 2011

### Dickfore

do the subst:
$$z(x) = y(x) - x$$
Then the variables in the new equation can be separated.

7. Jun 21, 2011

### Lindsayyyy

I'm still unsure.

I tried the following, I took the substition from HallsofIvy

$$y'=z^{2}-1$$

Shall I just integrate both sides now? I think this doesn't work, as I still have y and x after the integration on one side.

And I wonder about the following:

I have $$y'=z^{2}-1$$ but when I say I substitute $$x-y=z$$ and insert it in my given equation I have $$y'=z^{2}$$

8. Jun 21, 2011

### Char. Limit

I think you misunderstood. The equation HallsofIvy got to is

$$z' = z^2 - 1$$

Not y'.

9. Jun 21, 2011

### Unit

You performed the substitution incorrectly. If z = y - x, take d/dx of both sides: dz/dx = dy/dx - 1. Since dy/dx = (y - x)^2 = z^2, we have dz/dx = z^2 - 1.

Now, separate variables and use partial fractions. To separate variables, integrate both sides of f(z) dz = g(x) dx. :)

10. Jun 21, 2011

### Lindsayyyy

Thank you, just to make sure I didn't do any mistakes thus far. I have to do the partial fraction with the following:

$$x= \int \frac1 {z^{2}-1} dz$$

11. Jun 21, 2011

### Unit

Yes. For simplicity's sake, I'd put your constant of integration (+ C) on the x side.

12. Jun 21, 2011

### Lindsayyyy

Wow, it's really embarrassing right now.

My partial fraction looks like:

$$\frac 1 {z^{2}-1} = \frac A {z-1} + \frac B {z+1}$$
$$A= \frac 1 2$$
$$B= -\frac1 2$$

Now I tried to integrate

$$x=\frac1 2 \int{\frac 1 {z-1}}dz - \frac 1 2 \int{\frac 1 {z+1}}dz$$

getting:

$$2x+2c = ln(z-1)-ln(z+1)$$

but the z gets lost when I *exp on both sides. Where's my mistake. It's so frustrating

13. Jun 21, 2011

### Unit

Don't fret. Recall that ln(a) + ln(b) = ln(ab) and ln(a) - ln(b) = ln(a/b).

Also, when you take the exponential of 2x + 2C, let A = e^(2C) for simplicity. Your left side should be Ae^(2x).

14. Jun 21, 2011

### Lindsayyyy

Thanks for the help and patience

my solution looks like this:

I used the ln calculation rule:

whereas, as you said, my A=exp(2c)

$$z=\frac {1-A-e^{2x}} {-1+A+e^{2x}}$$

the only step I have to do now is to resubstitute z with $$z= x-y$$

and solve the equation, bringing y on one side, which would look like this:

$$y=\frac {-1+A+e^{2x}} {1-A-e^{2x}} +x$$

is this correct (and the final answer) ?

15. Jun 21, 2011

### Unit

No, but close. For any base k > 0, k^(a + b) does not equal k^a + k^b; it equals (k^a)(k^b).

Also, we set z = y - x, not z = x - y.

16. Jun 21, 2011

### Lindsayyyy

I should really try to concentrate some more

Another attempt, A=exp(2c) like before

final equation looks like:

$$y =\frac{-1-Ae^{2x}} {-1+Ae^{2x}}+x$$

17. Jun 21, 2011

### Unit

Yes! Well done. One more thing: you could decimate the abundance of minus signs (*shudder*) by multiplying with -1/-1 to get
$$y = \frac{1 + Ae^{2x}}{1 - Ae^{2x}} + x$$