Solving differential equation(separable)

  • Thread starter Thread starter aerograce
  • Start date Start date
  • Tags Tags
    Differential
aerograce
Messages
63
Reaction score
1
Let y be a solution of the di®erential equation,
\frac{dy}{dx}=\frac{y-1}{x+1}

such that

y(0)=0;

Then y(1) is:

My attempt:

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

ln|y-1|= ln |x+1| +C

Problems start to occur from here:

My method:

When x=0, y=0. Hence ln0=ln0+C C=0;
When x=1, ln|y-1|= ln2 + 0;
Hence |y-1| = 2
y=3 or y=-1.

My teacher's method
\frac{1}{y-1}dy=\frac{1}{x+1}dx

ln|y-1|= ln |x+1| +C

(y-1)=A(x+1)

Because y(0)=0 Hence A=-1

And when x=1, y-1=-2 y=-1



I am quite confused. My method seems to be legit also, but why I got different answer.
 
Physics news on Phys.org
aerograce said:
Let y be a solution of the di®erential equation,
\frac{dy}{dx}=\frac{y-1}{x+1}

such that

y(0)=0;

Then y(1) is:

My attempt:

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

ln|y-1|= ln |x+1| +C

Problems start to occur from here:

My method:

When x=0, y=0. Hence ln0=ln0+C C=0;

You of course mean \ln 1 = \ln 1 + C so that 0 = 0 + C.

When x=1, ln|y-1|= ln2 + 0;
Hence |y-1| = 2
y=3 or y=-1.

If you look at the ODE you'll see that if y < 1 then dy/dx < 0 and if y > 1 then dy/dx > 0 (in both cases this assumes x \geq 0). Thus if y(0) < 1 then y(x) < 1 for all x \geq 0, so you must take |y - 1| = 1 - y.
 
Back
Top