# Finding q(t) (charge) given i(t) (current).

1. Aug 31, 2013

### Flinchy

1. The problem statement, all variables and given/known data

Find q(t) for the following function.
http://imgur.com/gTtYRd0

We are also given that q(0) = -6 nC.

2. Relevant equations

$$q(t) = \int \mathrm{i(t)}\, \mathrm{d}t$$

3. The attempt at a solution

This is more of a question about why the steps to the solution are correct, as opposed to how to get to the solution, so I apologize if I posted this in the wrong section.

I would have thought that to find q(t) from x = 0 to x = 5 you would just find i(t) on that interval and integrate it. My teacher, however, showed us the following as the solution.

$$q(t) = \int_{-\infty}^0 \mathrm{i(t)}\, \mathrm{d}t + \int_0^t \mathrm{i(t)}\, \mathrm{d}t \\ \int_{-\infty}^0 \mathrm{i(t)}\, \mathrm{d}t = q(0) \\ q(t) = q(0) + \int_0^t \mathrm{i(t)}\, \mathrm{d}t$$

I do not understand why he is including the integral with the lower limit of negative infinity. He does the same for the interval x = 5 to x = 14.

$$q(t) = \int_{-\infty}^{5e-6} \mathrm{i(t)}\, \mathrm{d}t + \int_{5e-6}^t \mathrm{i(t)}\, \mathrm{d}t \\ \int_{-\infty}^{5e-6} \mathrm{i(t)}\, \mathrm{d}t = q(5e-6) \\ q(t) = q(5e-6) + \int_{5e-6}^t \mathrm{i(t)}\, \mathrm{d}t$$

My guess would be that he is treating i(t) = 0, when t < 0 (although he never explicitly said this), and then doing this.
$$\int_{-\infty}^0 \mathrm{i(t)}\, \mathrm{d}t = q(0) - q({-\infty})$$
And since i(t) is zero at negative infinity, the integral would just equal q(0). I just can't seem to understand why this is necessary, and why I could not just ignore q(0) and q(5e-6) while integrating. Any help would be much appreciated.

EDIT: I think I figured out what I was doing wrong! Since q(t) gives you the total charge at a given time, you need to add the total charge from to the previous interval to the equation of the next, otherwise it is assuming the charge starts from zero? Maybe I'm just grasping at straws...

Last edited: Aug 31, 2013
2. Aug 31, 2013

### Staff: Mentor

That approach with an integral starting at -∞ looks more complicated than necessary.

The basic issue is this formula:
The integral is indefinite, so you can always add a constant to it. To determine a charge, you need to know this constant.

If you know the charge at some point in time, you can start your integral there, and add the charge at that point. t=0 would be an obvious choice, but t=-∞ with q-∞ is possible as well (together with the assumption that q0 flow towards the object between -∞ and 0).

t=5*10-6 is a good choice to determine q(t) for t after that point.

3. Aug 31, 2013

### rude man

If q(0-) = 6e-6 C then the total charge at the end of t sec. is just 6e-6 C + the area under the curve from t=0 to t.

There is no need to invoke a weird number like 5e-6 s or any other number.

What your instructor wrote is exactly correct.

Given q(0) = 6e-6 C you don't care what happened for t < 0.

4. Aug 31, 2013

### rude man

That is correct. The "charge from the previous interval" is 6e-6 C.

Total q(t) = 6e-6 C + ∫0t i(t')dt'