# Homework Help: Solving dy/dx=x-y

1. Mar 15, 2010

### computerex

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

$$\int (x-y)$$

What is $$\int y$$ ? I don't mean $$\int y dy$$.

3. The attempt at a solution

$$dy/dx = x-y$$
$$y + dy = x dx$$
$$\int y + \int dy = \int x dx$$
$$\int y + y = x^2/2 + c$$

I am stuck at this point because I don't know how to integrate y without respect to anything...If that even makes sense.

EDIT:

Nvm...I am stupid xD

$$\int x dx - \int y dx$$

Last edited: Mar 15, 2010
2. Mar 15, 2010

### gabbagabbahey

That still doesn't help you though. How exactly do you plan on integrating $\int y(x) dx$ when you don't know what $y(x)$ is?

You can't solve this differential equation just by integrating both sides. Instead, try using the substitution $u=x-y$ to rewrite the DE in terms of $u(x)$ and $u'(x)$.

3. Mar 15, 2010

### D H

Staff Emeritus
That will result in another nonhomogeneous ODE. A tiny bit simpler perhaps, but still nonhomogeneous.

computerex: What have you been taught regarding solving nonhomogeneous differential equations?

4. Mar 15, 2010

### gabbagabbahey

Something about separable ODE's appeals to me though

5. Mar 15, 2010

### D H

Staff Emeritus
Depends on the OP's background. The original problem can be rewritten as

$$\frac{dy}{dx} + y = x$$

The homogeneous and particular solutions can be read off just by inspection.