# Solving dy/dx=x-y

## Homework Statement

$$\int (x-y)$$

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

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

Related Calculus and Beyond Homework Help News on Phys.org
gabbagabbahey
Homework Helper
Gold Member
EDIT:

Nvm...I am stupid xD

$$\int x dx - \int y dx$$
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)$.

D H
Staff Emeritus
Instead, try using the substitution $u=x-y$ to rewrite the DE in terms of $u(x)$ and $u'(x)$.
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?

gabbagabbahey
Homework Helper
Gold Member
That will result in another nonhomogeneous ODE. A tiny bit simpler perhaps, but still nonhomogeneous.
Something about separable ODE's appeals to me though

D H
Staff Emeritus
$$\frac{dy}{dx} + y = x$$