How do I rearrange and integrate dx/dt=k(a-x)(b-x) in order to graph x and t?

In summary, jhast1 attempted to solve for x using integrals and partial fractions, but made a mistake in the argument of the log and ended up with an incorrect answer. After fixing the argument of the log, he got the correct answer x=-e^((b-a)(kt+c))x/(e^((b-a)(kt+c))-1), where c is the inverse of ln(a/b).
  • #1
jhast1
6
0

Homework Statement



I need to integrate dx/dt=k(a-x)(b-x) and then rearrange to find x

The Attempt at a Solution



1/((a-x)(b-x))dx = k dt

Integrating dx using partial fractions:
1/(b-a)×(ln((a-x)/(b-x))=kt+c

when t=0 x=0
∴c=(ln(a/b))/(b-a)

then when I rearrange I get:
x=(e^((b-a)(kt+c))×(a-b))/((e^((b-a)(kt+c))-1)

Then I change the x to y and t to x so that I can graph it, but it doesn't give me the curve that I want, I have attached the graph. I am was assuming that it would give something like the black curve rather than the red one that it gave. Am I doing something wrong?
 
Last edited:
Physics news on Phys.org
  • #2
What are the values of a,b, and k?
 
  • #3
positive integers
 
  • #4
Hey jhast1,

I tried solving your equation, and when you say
"Integrating dx using partial fractions: 1/(b-a)×(ln((a-x)/(b-x))=kt+c"

I've got something which looks more like:

[itex]\frac{ln(x-a)-ln(x-b)}{(a-b)}=kt[/itex]

But maybe I just made a mistake..
 
  • #5
Here is my working.
 
Last edited:
  • #6
jhast1 said:


Integrating dx using partial fractions:
1/(b-a)×(ln((a-x)/(b-x))=kt+c


This is nearly correct, but you have the argument of the log flipped. From looking at your attached work, it appears you integrated dx/(a-x) and dx/(b-x) incorrectly and this will be the source of your error.

Your work assumes a≠b and this is not stated, however, given the set up of the question (i.e it is not written as k(a-x)2) then I suppose you can assume this is not the case. Were there any conditions on a and b given after the question?
 
  • #7
ok so I did that part again and i got:
ln((b-x)/(a-x))/(b-a)=kt+bThen I made x the subject and got this but I'm still not sure if it is right.

x=(e(b-a)(kt+c)-b)/(-e((b-a)(kt+c))-1)

where c=ln(a/b)/(b-a)

Edit: a and b are not equal
 
Last edited:
  • #8
Looks like I get [tex]x=\frac { a{ e }^{ r }-b }{ { e }^{ r }-1 } \\ r=(b-a)(kt+c)[/tex]
 
  • #9
jhast1 said:


when t=0 x=0
∴c=(ln(a/b))/(b-a)


Where is this initial condition specified?

jhast1 said:
Then I made x the subject and got this but I'm still not sure if it is right.

x=([]e(b-a)(kt+c)-b)/(-e((b-a)(kt+c))-1)

where c=ln(a/b)/(b-a)

Edit: a and b are not equal
I think there are two small errors above - you missed a coefficient in front of the exp term and there is a stray minus.
 
  • #10
CAF123 said:
Where is this initial condition specified?

In the original post. t=0 when x=0.
 
  • #11
The conditions are given in the question I have:
a is the amount of substance A and b is the amount of substance B, at t=0. x is the amount of product that these substances have produced at time t.

I see where I missed those things, however this does still not give me the curve that I'm expecting. Unless it's supposed to give me this curve.
 
  • #12
davidchen9568 said:
In the original post. t=0 when x=0.

The statement 't=0 when x=0' appeared in the attempt at a solution section. Since it did not appear in the Problem statement section, I wondered where that initial condition came from.
 
  • #13
jhast1 said:
x=(e(b-a)(kt+c)-b)/(-e((b-a)(kt+c))-1)
I think you have a sign wrong.
where c=ln(a/b)/(b-a)
Shouldn't that be c=ln(b/a)/(b-a)? Substituting that in the (corrected) previous equation allows a lot of simplification.
Btw, a check you can do on the answer is to let b tend to a and see if you get the right answer for the case b = a.
 
  • #14
Integrating dx using partial fractions:
1/(b-a)×(ln((a-x)/(b-x))=kt+c

it should be 1/(a-b)×(ln((a-x)/(b-x))=kt+c

ehild
 

1. What does dx/dt=k(a-x)(b-x) represent?

This equation represents a mathematical model known as the logistic differential equation, which is commonly used to describe population growth or decay.

2. What do the variables in the equation stand for?

The variable x represents the population size, t represents time, and k, a, and b are constants that affect the rate of population growth or decay.

3. How do you solve this differential equation?

There are several methods for solving this equation, including separation of variables, the substitution method, and using an integrating factor. The specific method used will depend on the initial conditions and the desired form of the solution.

4. What does the solution to this equation tell us?

The solution will give us the population size at any given time t, and can also provide information on the rate of population growth or decay. It can also be used to make predictions about future population trends.

5. What are some real-world applications of this equation?

This equation has many real-world applications, including describing the spread of diseases, predicting population growth in biological and human populations, and modeling chemical reactions and enzyme kinetics.

Similar threads

  • Calculus and Beyond Homework Help
Replies
15
Views
787
  • Calculus and Beyond Homework Help
Replies
2
Views
578
  • Calculus and Beyond Homework Help
Replies
8
Views
763
  • Calculus and Beyond Homework Help
Replies
14
Views
249
  • Calculus and Beyond Homework Help
Replies
2
Views
160
  • Calculus and Beyond Homework Help
Replies
7
Views
707
  • Calculus and Beyond Homework Help
2
Replies
54
Views
8K
  • Calculus and Beyond Homework Help
Replies
8
Views
763
  • Calculus and Beyond Homework Help
Replies
12
Views
991
  • Calculus and Beyond Homework Help
Replies
9
Views
726
Back
Top