# Thread: differential equations

1. ## differential equations

Hi, I'm having a little trouble with this question:
(x + y)dy/dx = y^2/(x + 4y)

2. ## Re: differential equations

Originally Posted by qwerty31
Hi, I'm having a little trouble with this question:
(x + y)dy/dx = y^2/(x + 4y)
\displaystyle \displaystyle \begin{align*} \left(x + y\right)\frac{dy}{dx} &= \frac{y^2}{x + 4y} \\ \frac{dy}{dx} &= \frac{y^2}{(x + y)(x + 4y)} \\ \frac{dy}{dx} &= \frac{y^2}{x^2 + 5x\,y + 4y^2} \\ \frac{dy}{dx} &= \frac{\left(\frac{y}{x}\right)^2}{1 + 5\left(\frac{y}{x}\right) + 4\left(\frac{y}{x}\right)^2} \end{align*}

Let \displaystyle \displaystyle \begin{align*} u = \frac{y}{x} \implies y = u\,x \implies \frac{dy}{dx} = u + x\,\frac{du}{dx} \end{align*} and the DE becomes

\displaystyle \displaystyle \begin{align*} u + x\,\frac{du}{dx} &= \frac{u^2}{1 + 5u + 4u^2} \\ x\,\frac{du}{dx} &= \frac{u^2}{1 + 5u + 4u^2} - u \\ x\,\frac{du}{dx} &= \frac{u^2}{1 + 5u + 4u^2} - \frac{u\left(1 + 5u + 4u^2\right)}{1 + 5u + 4u^2} \\ x\,\frac{du}{dx} &= \frac{u^2 - u\left(1 + 5u + 4u^2\right)}{1 + 5u + 4u^2} \\ x\,\frac{du}{dx} &= \frac{u^2 - u - 5u^2 - 4u^3}{1 + 5u + 4u^2} \\ x\,\frac{du}{dx} &= -\frac{4u^3 + 4u^2 + u}{4u^2 + 5u + 1} \\ \left(\frac{4u^2 + 5u + 1}{4u^3 + 4u^2 + u}\right)\frac{du}{dx} &= -\frac{1}{x} \end{align*}

You should be able to solve this now.

3. ## Re: differential equations

Originally Posted by Prove It
\displaystyle \displaystyle \begin{align*} \left(x + y\right)\frac{dy}{dx} &= \frac{y^2}{x + 4y} \\ \frac{dy}{dx} &= \frac{y^2}{(x + y)(x + 4y)} \\ \frac{dy}{dx} &= \frac{y^2}{x^2 + 5x\,y + 4y^2} \\ \frac{dy}{dx} &= \frac{\left(\frac{y}{x}\right)^2}{1 + 5\left(\frac{y}{x}\right) + 4\left(\frac{y}{x}\right)^2} \end{align*}

Let \displaystyle \displaystyle \begin{align*} u = \frac{y}{x} \implies y = u\,x \implies \frac{dy}{dx} = u + x\,\frac{du}{dx} \end{align*} and the DE becomes

\displaystyle \displaystyle \begin{align*} u + x\,\frac{du}{dx} &= \frac{u^2}{1 + 5u + 4u^2} \\ x\,\frac{du}{dx} &= \frac{u^2}{1 + 5u + 4u^2} - u \\ x\,\frac{du}{dx} &= \frac{u^2}{1 + 5u + 4u^2} - \frac{u\left(1 + 5u + 4u^2\right)}{1 + 5u + 4u^2} \\ x\,\frac{du}{dx} &= \frac{u^2 - u\left(1 + 5u + 4u^2\right)}{1 + 5u + 4u^2} \\ x\,\frac{du}{dx} &= \frac{u^2 - u - 5u^2 - 4u^3}{1 + 5u + 4u^2} \\ x\,\frac{du}{dx} &= -\frac{4u^3 + 4u^2 + u}{4u^2 + 5u + 1} \\ \left(\frac{4u^2 + 5u + 1}{4u^3 + 4u^2 + u}\right)\frac{du}{dx} &= -\frac{1}{x} \end{align*}

You should be able to solve this now.
Thank you

Another quick question, if the particular solution of a second order differential equation is a combination of two functions, e.g. 3x + sinx...what do i do?

4. ## Re: differential equations

Originally Posted by qwerty31
Thank you

Another quick question, if the particular solution of a second order differential equation is a combination of two functions, e.g. 3x + sinx...what do i do?
I assume you're asking what should you "guess" for the particular solution? If the RHS is say 3x + sin(x), then you should guess something like

ax^3 + bx^2 + cx + d sin(x) + e cos(x), unless these appeared in your homogeneous solution, in which case you should multiply the repeated term by x.