We solve as before, and then use the given information to find the value of the unknown K.

Separating variables:

`(dy)/(dx)+2y=6`

`(dy)/(dx)=6-2y`

`dy=(6-2y)dx`

`(dy)/(6-2y)=dx`

Integrating gives:

`int(dy)/(6-2y)=intdx`

`(-1)/2ln|6-2y|=x+K`

[For the integral involving `y`, we put `u = 6 - 2y` giving `du = - 2\ dy`. This means we'll replace `dy` with `(-1/2)du` and integrate `(1/u)du` giving `ln\ u`.]

Now, when `x = 0`, `y = 1`; so we have:

`(-1)/2ln|6-2(1)|=0+K`

`K=(-1)/2ln|4|`

So, on substituting this back into our previous equation and doing some algebra, we obtain:

`(-1)/2ln|6-2y|=x+(-1)/2ln|4|`

`(-1)/2[ln|6-2y|-ln 4]=x`

`ln (6-2y)/4=-2x`

Taking "`e` to both sides":

`(6-2y)/4=e^(-2x)`

`6-2y=4e^(-2x)`

`y=3-2e^(-2x)`

Checking our solution: `(dy)/(dx)=4e^(-2x)`and so

`"LHS"=(dy)/(dx)+2y`

`=4e^(-2x)+2(3-2e^(-2x))`

`=6`

`="RHS"`

Also, when `x = 0`, `y = 3 - 2e^0= 1`.

So the particular solution is given by: `y = 3 - 2e^(-2x)`

Easy to understand math videos:
MathTutorDVD.com