Deriving Q (t)=Qmax (1-e^(-t/tau)). Stuck. Please help.

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
14 replies · 6K views
kamhogo
Messages
86
Reaction score
6

Homework Statement


I am trying to derive the equation for the charge of a capacitor as a function of time: Q (t) = Qmax (1-e^(-t/tau).

Homework Equations


Kirchhoff's loop law
I (t) = dQ(t)/dt
Delta Vbat= Epsilon
Delta Vresistor= -I*R = [-dQ(t)/dt]*R
Delta Vcapacitor= Q/C
Qmax = C*Epsilon
Tau = R*C

The Attempt at a Solution


Kirchhoff's loop law
Epsilon - I*R - (Q/C) = 0
Epsilon - [dQ(t)/dt]*R -(Q/C) =0
[dQ(t)/dt] = [Epsilon -(Q/C) ]/R
= (C*Epsilon -Q)/RC
= (Qmax -Q) / tau

Multiply both sides by dt and divide by Q
dQ(t)/Q = [{(Qmax/Q) - 1}*{1/tau}]dt

Integrate both sides
lnQ(t) ={(Qmax/Q) - 1}*{1/tau}

Take the inverse natural logarithm on both sides
Q(t) = e^[(Qmax/Q) - 1}*{1/tau}]

Voilà. What am I doing wrong. I've been trying to get the right equation for hours. Is what I found equivalent to the equation in the post title? Thanks in advance for any help.
 
Physics news on Phys.org
kamhogo said:
Multiply both sides by dt and divide by Q
dQ(t)/Q = [{(Qmax/Q) - 1}*{1/tau}]dt

Integrate both sides
lnQ(t) ={(Qmax/Q) - 1}*{1/tau}
You didn't integrate the right side correctly. Note that Q on the right hand side is a function of t.

Hint: Go back where you divided both sides by Q and divide both sides by Qmax - Q instead.
 
Si I did as you suggested and got:

[dQ(t)]/(Qmax - Q(t)) = (1/tau)dt
([dQ(t)]/Qmax) - ([dQ(t)]/Q(t)) = (1/tau)dt

Integrate both sides
(Q(t)/Qmax) - lnQ(t) = 1/tau
Q(t) = [lnQ(t) + (1/tau)]*Qmax

And then I'm stuck again...:(
 
kamhogo said:
[dQ(t)]/(Qmax - Q(t)) = (1/tau)dt
([dQ(t)]/Qmax) - ([dQ(t)]/Q(t)) = (1/tau)dt
The second line does not follow from the first line.
Note that ##\frac{a}{b-c} \neq \frac{a}{b} - \frac{a}{c}##. For example ##\frac{1}{3-1} \neq \frac{1}{3} - \frac{1}{1}##

You should be able to integrate dQ(t)]/(Qmax - Q(t)) directly. If you need to, make the substitution u = Qmax - Q(t)
 
I see. Sorry, my math skills are lacking...
So the integral of dx/(a-x) is ln (a-x), hence the integral of dQ(t) / (Qmax - Q(t)) is ln ( Qmax - Q(t). (Right?)

Thus Qmax - Q(t) = e^(1/tau)
Q(t)= Qmax - e^(1/tau) --- which is incorrect...another hint please?
 
kamhogo said:
dx/(a-x) is ln (a-x),
It is -ln(a-x)..
KVL equation becomes
R(dq/dt)+q/C=V
∴Rdq/dt=(CV-q)/C
dq/(Qmax-q)=dt/RC
(CV=Qmax)..
Integrate this equation using proper limits and you'll get the answer.
 
kamhogo said:
I see. Sorry, my math skills are lacking...
So the integral of dx/(a-x) is ln (a-x), hence the integral of dQ(t) / (Qmax - Q(t)) is ln ( Qmax - Q(t). (Right?)

As cnh1995 pointed out, when you integrated the left side of your equation, you missed a negative sign.

Also, ##\int \frac{dt}{\tau} \neq \frac{1}{\tau}##. Recall that ##\int dx = x + k##, where ##k## is an arbitrary constant of integration. The constant of integration will be important.
 
Almost there...

dQ(t) /( Qmax - Q(t)) = (1/tau) dt

Integrate both sides ( indefinite integral for the right side; upper limit = Q ( t ) & lower limit = 0 for the left side )

This gives:
-ln (|Q(t) - Qmax | ) + ln ( | 0 - Qmax | ) = t / tau

Multiply both sides by -1
ln (Q(t) - Qmax ) - ln ( Qmax ) = -t/tau

ln(a) - ln(b) = ln(a/b) so...
ln [{Q(t) -Qmax }/Qmax ] = -t/tau

ln(x) = y ==> x = e^y
(Q(t)/Qmax) - (Qmax/Qmax) = e^(-t/tau)
Q(t) = [(e^(-t/tau)) + 1]*Qmax

Still not correct. I don't know why I get +1 instead of -1 in the equation. ...
 
TSny said:
Careful with removing the absolute value. Recall |x| = x if x ≥ 0 and |x| = -x if x < 0.
Really? I thought an absolute value is always positive...
 
kamhogo said:
I thought an absolute value is always positive...
Yes, that's absolutely :oldsmile: true, except for |0|.

So, consider |x| when x = -2. Does |x| = x or does |x| = -x?
 
Last edited:
TSny said:
Yes, that's absolutely :oldsmile: true, except for |0|.

So, consider |x| when x = -2. Does |x| = x or does |x| = -x?
Ok, I shall not give up!

-ln (|Q(t) - Qmax | ) + ln ( | 0 - Qmax | ) = t / tau
-ln ( | -(-Q (t) + Qmax) |) + ln ( Qmax ) = t/tau
ln ( Qmax ) - ln ( Qmax -Q (t)) = t/tau
Qmax/(Qmax - Q (t)) = e^(1/tau)
Qmax - Q (t) = Qmax/(e^(1/tau))
- Q (t) = Qmax*(e^(-1/tau)) - Qmax

Multiply both sides by -1
Q(t) = Qmax -Qmax*(e^(-1/tau))

Q (t) = Qmax * ( 1 - e^(-1/tau))

Is it too soon to celebrate?
 
TSny said:
I believe that's correct. Good work!
Thank you all so much! Hard, collaborative work does pay off!
 
kamhogo said:
Ok, I shall not give up!

-ln (|Q(t) - Qmax | ) + ln ( | 0 - Qmax | ) = t / tau
-ln ( | -(-Q (t) + Qmax) |) + ln ( Qmax ) = t/tau
ln ( Qmax ) - ln ( Qmax -Q (t)) = t/tau
Qmax/(Qmax - Q (t)) = e^(1/tau)
Qmax - Q (t) = Qmax/(e^(1/tau))
- Q (t) = Qmax*(e^(-1/tau)) - Qmax

Multiply both sides by -1
Q(t) = Qmax -Qmax*(e^(-1/tau))

Q (t) = Qmax * ( 1 - e^(-1/tau))

Is it too soon to celebrate?
Sorry, distraction error. Please replace all e^(-1/tau) with e^(-t/tau).