## Trending News

# How to solve this logistic function?

Consider the logistic function:

dN/dt = 0.2N - 0.0004N^2 where N(0) = 100

a) Solve using the logistic equation directly [dy/dx = ky * (M - y)]

b) Verify this solution using differential calculus

### 1 Answer

- 11 months agoFavorite Answer
dN / dt = 0.2N - 0.0004N^2

10000 * dN/dt = 2000 * N - 4 * N^2

2500 * dN/dt = 500N - N^2

2500 * dN / (500N - N^2) = dt

2500 * dN / (N * (500 - N)) = dt

A/N + B/(500 - N) = 2500 / (N * (500 - N))

A * (500 - N) + B * N = 2500 + 0N

500A - AN + BN = 2500 + 0N

500A = 2500

A = 5

B - A = 0

B = A

B = 5

5 * dN / N - 5 * dN / (500 - N) = dt

Integrate

5 * ln|N| - 5 * ln|500 - N| = t + C

5 * ln|N / (500 - N)| = t + C

N = 100 when t = 0

5 * ln|100 / (500 - 100)| = 0 + C

5 * ln|100/400| = C

5 * ln(1/4) = C

-5 * 2 * ln(2) = C

-10 * ln(2) = C

5 * ln|N / (500 - N)| = t - 10 * ln(2)

ln|N / (500 - N)| = (1/5) * t - 2 * ln(2)

N / (500 - N) = e^(t/5 - 2 * ln(2))

Let e^(t/5 - 2 * ln(2)) = p for now, just for the sake of simplicity

N / (500 - N) = p

N = 500p - Np

N + Np = 500p

N * (1 + p) = 500 * p

N = 500 * p / (1 + p)

N = 500 * e^(t/5 - ln(4)) / (1 + e^(t/5 - ln(4)))

N = 500 * (1/4) * e^(t/5) / (1 + (1/4) * e^(t/5))

N = 500 * (1/4) * e^(t/5) / ((1/4) * (4 + e^(t/5)))

N = 500 * e^(t/5) / (4 + e^(t/5))

N(t) = 500 * e^(t/5) / (4 + e^(t/5))

dy/dx = ky * (M - y)

dy / (y * (M - y)) = k * dx

a/y + b/(M - y) = 1 / (y * (M - y))

a * (M - y) + by = 0y + 1

aM - ay + by = 0y + 1

aM = 1

by - ay = 0y

b - a = 0

b = a

a = 1/M

b = 1/M

(1/M) * dy / y + (1/M) * dy / (M - y) = k * dx

(1/M) * ln|y| - (1/M) * ln|M - y| = kx + C

(1/M) * ln|y / (M - y)| = kx + C

ln|y / (M - y)| = M * (kx + C)

y / (M - y) = e^(M * (kx + C))

e^(M * (kx + C)) = p

y / (M - y) = p

y = Mp - yp

y + yp = Mp

y * (1 + p) = Mp

y = Mp / (1 + p)

y = M * e^(M * (kx + C)) / (1 + e^(M * (kx + C)))

e^(MC) is just some constant, so we can simplify this a bit

y = M * C[a] * e^(Mkx) / (1 + C[a] * e^(Mkx))

y = M * e^(Mkx) / ((1/C[a]) + e^(Mkx))

C[a] is just some constant that we can describe as another constant. We'll call it C again

y = M * e^(Mkx) / (C + e^(Mkx))

If we look at our problem: dN/dt = 0.2N - 0.0004N^2 and get it into the form of dy/dx = ky * (M - y), we should be able to just plug-and-chug our general solution into a specific one

0.2N - 0.0004N^2 =>> ky * (M - y)

0.0004 * N * (500 - N) =>> 0.0004 * y * (500 - y)

y = M * e^(Mkx) / (C + e^(Mkx))

M = 500 , k = 0.0004

y = 500 * e^(500 * 0.0004 * x) / (C + e^(500 * 0.0004 * x))

y = 500 * e^((1/5) * x) / (C + e^((1/5) * x))

y = 100 when x = 0

100 = 500 * e^(0) / (C + e^(0))

1 = 5 * 1 / (C + 1)

1 = 5/(C + 1)

C + 1 = 5

C = 4

y = 500 * e^(x/5) / (4 + e^(x/5))

N(t) = 500 * e^(t/5) / (4 + e^(t/5))

So at least this confirms 1 of 2 things: Either both methods are wrong in the same way or they're right.

y = 500 * e^(x/5) / (4 + e^(x/5))

y * (4 + e^(x/5)) = 500 * e^(x/5)

4y + y * e^(x/5) = 500 * e^(x/5)

4y = (500 - y) * e^(x/5)

4y / (500 - y) = e^(x/5)

((500 - y) * 4 * dy - 4y * (-dy)) / (500 - y)^2 = (1/5) * e^(x/5) * dx

(2000 - 4y + 4y) * dy / (500 - y)^2 = (1/5) * e^(x/5) * dx

2000 * dy / (500 - y)^2 = (1/5) * e^(x/5) * dx

dy / dx = (1/5) * e^(x/5) * (500 - y)^2 / 2000

dy/dx = e^(x/5) * (500 - y)^2 / 10000

dy/dx = (4y/(500 - y)) * (500 - y)^2 / 10000

dy/dx = 4y * (500 - y) / 10000

dy/dx = (2000y - 4y^2) / 10000

dy/dx = 0.2 * y - 0.0004 * y^2

Looks good to me.

- Login to reply the answers