Respuesta :

Separate the variables:

[tex]y' = \dfrac{dy}{dx} = (y+1)(y-2) \implies \dfrac1{(y+1)(y-2)} \, dy = dx[/tex]

Separate the left side into partial fractions. We want coefficients a and b such that

[tex]\dfrac1{(y+1)(y-2)} = \dfrac a{y+1} + \dfrac b{y-2}[/tex]

[tex]\implies \dfrac1{(y+1)(y-2)} = \dfrac{a(y-2)+b(y+1)}{(y+1)(y-2)}[/tex]

[tex]\implies 1 = a(y-2)+b(y+1)[/tex]

[tex]\implies 1 = (a+b)y - 2a+b[/tex]

[tex]\implies \begin{cases}a+b=0\\-2a+b=1\end{cases} \implies a = -\dfrac13 \text{ and } b = \dfrac13[/tex]

So we have

[tex]\dfrac13 \left(\dfrac1{y-2} - \dfrac1{y+1}\right) \, dy = dx[/tex]

Integrating both sides yields

[tex]\displaystyle \int \dfrac13 \left(\dfrac1{y-2} - \dfrac1{y+1}\right) \, dy = \int dx[/tex]

[tex]\dfrac13 \left(\ln|y-2| - \ln|y+1|\right) = x + C[/tex]

[tex]\dfrac13 \ln\left|\dfrac{y-2}{y+1}\right| = x + C[/tex]

[tex]\ln\left|\dfrac{y-2}{y+1}\right| = 3x + C[/tex]

[tex]\dfrac{y-2}{y+1} = e^{3x + C}[/tex]

[tex]\dfrac{y-2}{y+1} = Ce^{3x}[/tex]

With the initial condition y(0) = 1, we find

[tex]\dfrac{1-2}{1+1} = Ce^{0} \implies C = -\dfrac12[/tex]

so that the particular solution is

[tex]\boxed{\dfrac{y-2}{y+1} = -\dfrac12 e^{3x}}[/tex]

It's not too hard to solve explicitly for y; notice that

[tex]\dfrac{y-2}{y+1} = \dfrac{(y+1)-3}{y+1} = 1-\dfrac3{y+1}[/tex]

Then

[tex]1 - \dfrac3{y+1} = -\dfrac12 e^{3x}[/tex]

[tex]\dfrac3{y+1} = 1 + \dfrac12 e^{3x}[/tex]

[tex]\dfrac{y+1}3 = \dfrac1{1+\frac12 e^{3x}} = \dfrac2{2+e^{3x}}[/tex]

[tex]y+1 = \dfrac6{2+e^{3x}}[/tex]

[tex]y = \dfrac6{2+e^{3x}} - 1[/tex]

[tex]\boxed{y = \dfrac{4-e^{3x}}{2+e^{3x}}}[/tex]