# First-Order ODE

1. Jul 6, 2013

### wozzers

i am having issues solving an ODE it is given as

y'= (1-2y-4x)/(1+y+2x)

I've been told to find the particular solution when y(0)=1

Last edited: Jul 6, 2013
2. Jul 6, 2013

### Mandelbroth

So, let's look at this.

We have that $\frac{dy}{dx} = \frac{1-2y-4x}{1+y+2x}$. We need to reduce this to something we know how to solve. Do you see any useful substitutions?

3. Jul 7, 2013

### wozzers

at the moment none i thought about doing something with the y+2x and using a u substitution but noticed the signs were different so i am just lost currently and i wasn't sure if that is even applicable in this situation

4. Jul 7, 2013

### lurflurf

^That is good

u=y+2x+1 is even better

5. Jul 7, 2013

### wozzers

okay i took the derivative of y+2x+1 and got 3dydx is that right or a little off with the dydx from there i am lost once again

Last edited: Jul 7, 2013
6. Jul 7, 2013

### lurflurf

^
d(y+2x+1)=dy+2dx
or
(y+2x+1)'=y'+2

try to write the equation in terms of y+2x+1

7. Jul 10, 2013

### Ackbeet

In general, if you have $y'=L_{1}(x,y)/L_{2}(x,y),$ where $L_{1},L_{2}$ are linear functions of $x$ and $y$, then your substitution depends on how the two lines relate to each other. Tenenbaum and Pollard have a great section in their book Ordinary Differential Equations, where they show you exactly which substitution to use for the following three cases:

Case 1: They are the same line.
Case 2: The two lines intersect at one point.
Case 3: The two lines are parallel.

8. Jul 11, 2013

### wozzers

i will take a look at the book ackbeet as i know this is something i am going to have to apply consistently to completely comprehend this type of problem

9. Jul 12, 2013

### HallsofIvy

Staff Emeritus
There is no real need to look for substitutions- it's pretty simple as is. This is an "exact" equation.

$$\frac{dy}{dx}= \frac{1- 2y- 4x}{1+ y+ 2x}$$

$$(1+ y+ 2x)dy= (1- 2y- 4x)dx$$

$$(1+ y+ 2x)dy+ (4x+ 2y- 1)dx= 0$$

Now we see that $(1+ y+ 2x)_x= 2= (4x+ 2y- 1)_y$ so this is an "exact differential"- there exist a function F(x,y) such that $dF= F_xdx+ F_ydy= (4x+2y- 1)dx+ (1+ y+ 2x)dx$.

From $F_x= 4x+ 2y- 1$ so that $F= 2x^2+ 2xy- g(y)$.
(Since F_x is a differentiation with respect to x, treating y as a constant, when we "reverse" that the "constant of integration" may be a function of y.)

From that, $F_y= 2x- g'(y)= 1+ y+ 2x$ so that $-g'(y)= 1+ y$ and $g'(y)= -1- y$. $g(y)= -y- \frac{1}{2}y^2+ C$.

So $F(x,y)= 2x^2+ 2xy- (-y- \frac{1}{2}y^2+ C)= 2x^2+ 2xy+ y+ \frac{1}{2}y^2+ c$.

Saying that "dF= 0" gives $F(x, y)= 2x^2+ 2xy- (-y- \frac{1}{2}y^2+ C)= 2x^2+ 2xy+ y+ \frac{1}{2}y^2+ c$ equals a constant. Including the "c" in that constant,
$2x^2+ 2xy+ y+ \frac{1}{2}y^2= C$.

Last edited: Jul 12, 2013
10. Jul 13, 2013

### wozzers

thank you all for your help i finally worked it out, i have a better understanding using the substitution method hallsofivy i still need to practice a few more problems to be confident in my ability to solve the type of DE using the Intial condition i got y= sqrt (6x+4) -2x-1 quite happy although the question is very tedious was required utilizing the completing the square technique to completely solve it if anyone knows where i can find more problems like this with solutions please assist

11. Jul 13, 2013

### Ackbeet

The ODE's book I mentioned has loads of these problems. You could also make up your own. I haven't tried Mathematica recently to see if it can solve these. WolframAlpha can't, and Sage (Maxima) can't.

12. Jul 13, 2013

### wozzers

i've looked in the book i am struggling to find these type of problems in the book do you know where exactly in the book these problems are?

13. Jul 13, 2013

### Ackbeet

The section in the book dealing with these kinds of equations is Lesson 8, starting on Page 62. The exercises are on page 69, with answers immediately following. Incidentally, this entire section of the book is available on Google Books.

14. Jul 14, 2013

### Bill Simpson

15. Jul 15, 2013

### Ackbeet

16. Jul 16, 2013

### epenguin

This looks to me like just a warming up excercise preparatory to treating the more general case called the 1st order linear homogeneous equation I think. They are hoping you'd notice that the RHS is a function of (y + 2x). Call this Y, ask yourself (e.g.) what dY/dx is and it all works out nice and simple I think.

Edit. I see you did notice this, #3. Maybe another look?

Last edited: Jul 16, 2013
17. Jul 17, 2013

### epenguin

Since solutions have been given, with my version with the substitution I mentioned we have y' = Y' - 2 and get

$$Y' = \frac{3}{1+Y}$$

We can easily solve and incorporate the initital condition to give I think

y2 + 4xy + 4x2 + 2y - 2x - 3 = 0

And we could leave it like that.

But if it is wanted factorised, snce it was mentioned doing this is a bore, it appears easier to start from the form in which this is first solved:

Y2 + 2Y = 6x + 3

(initial condition incorporated here). Write this

Y2 + 2Y +1 - 6x - 4 = 0

then proceed

(Y + 1)2 = 6x + 4

(y + 2x + 1)2 = 6x + 4

(y + 2x + 1) = ± √(6x + 4)

y = -(2x + 1) ± √(6x + 4)

which appears the same as answers given.

18. Jul 17, 2013

### Ray Vickson

Maple finds a solution with no trouble.