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

  • Thread starter Thread starter jhast1
  • Start date Start date
  • Tags Tags
    Integrating
jhast1
Messages
6
Reaction score
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
What are the values of a,b, and k?
 
positive integers
 
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:

\frac{ln(x-a)-ln(x-b)}{(a-b)}=kt

But maybe I just made a mistake..
 
Here is my working.
 
Last edited:
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?
 
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:
Looks like I get x=\frac { a{ e }^{ r }-b }{ { e }^{ r }-1 } \\ r=(b-a)(kt+c)
 
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
 
Back
Top