# Having problems understanding differential equations

• Jan 21st 2014, 04:49 AM
jezb5
Having problems understanding differential equations
Hi there (Bow),

I'm looking for a worked example of the below question. Or for someone to walk me through what to do and what is going on please.

Attachment 30050

I can't seem to find anything online that helps me and I don't seem to have much on the topic in my books.

I've got a fair few to work through but just need to see one in action as I don't know what I'm doing (Headbang).

Thanks
• Jan 21st 2014, 05:03 AM
HallsofIvy
Re: Having problems understanding differential equations
What exactly do you want to know? The first thing the problem says is "in the absence of species Y (i.e. y= 0)" so the two equations become
$\frac{dx}{dt}= x\left(1- \frac{x}{12}\right)$
and 0= 0. (The right side of the second equation is 0 because it is 0 times something. The left hand is 0 because y is a constant, 0, and the derivative of a constant function is 0.)

That equation is a "separable first order equation" which is typically the first thing you study in differential equations. You can "separate" it as
$\frac{dx}{x\left(1- \frac{x}{12}\right)}= dt$

Integrate on the left using "partial fractions".
• Jan 21st 2014, 09:06 AM
jezb5
Re: Having problems understanding differential equations
Quote:

Originally Posted by HallsofIvy
What exactly do you want to know? The first thing the problem says is "in the absence of species Y (i.e. y= 0)" so the two equations become
$\frac{dx}{dt}= x\left(1- \frac{x}{12}\right)$
and 0= 0. (The right side of the second equation is 0 because it is 0 times something. The left hand is 0 because y is a constant, 0, and the derivative of a constant function is 0.)

That equation is a "separable first order equation" which is typically the first thing you study in differential equations. You can "separate" it as
$\frac{dx}{x\left(1- \frac{x}{12}\right)}= dt$

Integrate on the left using "partial fractions".

Sorry for the late reply but it has taken me a while to figure it out.

I rearrange $\frac{dx}{dt}= x\left(1- \frac{x}{12}\right)$ to get

$\frac{dx}{x\left(1- \frac{x}{12}\right)}= dt$

From here I get the partial fractions

$\frac{1}{x(1-\frac{x}{12})} =\frac{A}{x} + \frac{B}{1- \frac{x}{12}}$

After multiplying both sides by the denominator, and collecting like terms, I get

$1 = (B - \frac{A}{12})x + A$

Equating coefficients gives

$B-\frac{A}{12} = 0$

and
$A = 1$

So
$B =\frac{1}{12}$

With knowing A and B I can integrate them now.

$\ln \left |\frac{x}{12-x}\right |=t+C$

$\frac{x}{12-x}=c\cdot e^{t}$

Does that look about right? Also, how do I go about using
$x_0 =3, and, x_0 = 18$ for the end part?

Thanks
• Jan 21st 2014, 10:17 AM
romsek
Re: Having problems understanding differential equations
Quote:

Originally Posted by jezb5

Sorry for the late reply but it has taken me a while to figure it out.

I rearrange $\frac{dx}{dt}= x\left(1- \frac{x}{12}\right)$ to get

$\frac{dx}{x\left(1- \frac{x}{12}\right)}= dt$

From here I get the partial fractions

$\frac{1}{x(1-\frac{x}{12})} =\frac{A}{x} + \frac{B}{1- \frac{x}{12}}$

After multiplying both sides by the denominator, and collecting like terms, I get

$1 = (B - \frac{A}{12})x + A$

Equating coefficients gives

$B-\frac{A}{12} = 0$

and
$A = 1$

So
$B =\frac{1}{12}$

With knowing A and B I can integrate them now.

$\ln \left |\frac{x}{12-x}\right |=t+C$

$\frac{x}{12-x}=c\cdot e^{t}$

Does that look about right? Also, how do I go about using
$x_0 =3, and, x_0 = 18$ for the end part?

Thanks

that looks correct but you should finish by solving for x to get x = f(t,c).

Then you can use x0 = f(0,c) to solve for c for each of your two initial conditions.
• Jan 21st 2014, 02:22 PM
jezb5
Re: Having problems understanding differential equations
Quote:

Originally Posted by romsek
that looks correct but you should finish by solving for x to get x = f(t,c).

Then you can use x0 = f(0,c) to solve for c for each of your two initial conditions.

Thanks :)

I'm not sure how to do this bit as I don't fully understand the notation used. Could you talk me through it please?
• Jan 21st 2014, 06:30 PM
romsek
Re: Having problems understanding differential equations
Quote:

Originally Posted by jezb5
Thanks :)

I'm not sure how to do this bit as I don't fully understand the notation used. Could you talk me through it please?

were you able to solve for x?
• Jan 22nd 2014, 02:03 AM
jezb5
Re: Having problems understanding differential equations
Quote:

Originally Posted by romsek
were you able to solve for x?

Is this correct?

$x = Ce^t(12 -x)$

Then for
$x_0 = 3$, I change x to 3 and t to zero?

Which gives me

$3 = C(12 -3)$

$C = \frac{1}{3}$

Then do the same for
$x_0 = 18$
• Jan 22nd 2014, 02:45 AM
romsek
Re: Having problems understanding differential equations
Quote:

Originally Posted by jezb5
Is this correct?

$x = Ce^t(12 -x)$

Then for
$x_0 = 3$, I change x to 3 and t to zero?

Which gives me

$3 = C(12 -3)$

$C = \frac{1}{3}$

Then do the same for
$x_0 = 18$

While what you've done is correct it's not exactly right. You want to solve for x as a function of c and t.

You have

$\frac{x}{12-x}=c e^t \Rightarrow$

$x=\frac{12 c e^t}{1+c e^t}$

In the first case

$x_0=3 so 3=\frac{12c}{1+c}\Rightarrow c=\frac{1}{3}$

just repeat this for $x_0=18$
• Jan 22nd 2014, 02:54 AM
jezb5
Re: Having problems understanding differential equations
Quote:

Originally Posted by romsek
While what you've done is correct it's not exactly right. You want to solve for x as a function of c and t.

You have

$\frac{x}{12-x}=c e^t \Rightarrow$

$x=\frac{12 c e^t}{1+c e^t}$

In the first case

$x_0=3 so 3=\frac{12c}{1+c}\Rightarrow c=\frac{1}{3}$

just repeat this for $x_0=18$

Thanks :)

I've nearly got this finished as a worked example.

When looking at the results for the below

$When, x_0 = 3, C = \frac{1}{3}$ Does this mean the population is growing?

and

$When, x_0 = 18, C = -3$ So the population is declining?
• Jan 22nd 2014, 03:34 AM
romsek
Re: Having problems understanding differential equations
Quote:

Originally Posted by jezb5
Thanks :)

I've nearly got this finished as a worked example.

When looking at the results for the below

$When, x_0 = 3, C = \frac{1}{3}$ Does this mean the population is growing?

and

$When, x_0 = 18, C = -3$ So the population is declining?

that's basically correct though you really need to look at the whole function. In this case though it does turn out that negative C corresponds to a decline in population while positive C corresponds to growth in population.

To see if you really understand what's going on see if you can determine what the population stabilizes at for any choice of C other than 0.