# Finding charge as a function of time

1. Nov 2, 2011

### P-Jay1

1- A series electric circuit contains a resistance R, capacitance C and power source
supplying a time-dependent electromotive force V (t). The charge q on the capacitor obeys

R dq/dt + q/C = V (t)

Assuming that initially, at time t = 0, there is no charge on the capacitor, and given that
V (t) = V0 sin ωt, find the charge on the capacitor as a function of time.

2- Hey, so I want to know if i'm doing this right.

I rearranged and substituted V (t) = V0 sin ωt to get: dq/dt = VoSinωt/R - q/RC

Next I move dt to the right hand side of the equation and integrated to get:

q(t) = - VoCosωt/ωR - qt/RC + const.

For q as a function of t is this the right answer?

Thanks

2. Nov 2, 2011

### Clever-Name

Ok so after lots of algebra and rearranging I found the solution.

You need to treat this as an ODE and not just a simple integration problem.

Solving the homogeneous form of the equation:

$$Rq' + \frac{q}{C} = 0$$

yields

$$q(t) = De^{-t/RC}$$

There is also the non-homogeneous solution which can be solved a few different ways, I did it using an integrating factor followed by lots of integration by parts and some rearranging. I'm not going to write it all out here, but to get you started you have:

$$\frac{dq}{dt} + \frac{q}{RC} = \frac{V_{o}}{R}sin({\omega}t)$$

let ${\mu} = e^{t/RC}$

$$\frac{d}{dt}(qe^{t/RC}) = e^{t/RC} \frac{V_{o}}{R}sin({\omega}t)$$

I'm not going to give you the final solution but it's much more complicated than what you initially have. If you post your work I will help you through it.

Last edited: Nov 2, 2011