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

• Flinchy
In summary, to find q(t) for the given function, we need to integrate i(t) from negative infinity to 0 and add it to the integral of i(t) from 0 to t. This is necessary in order to determine the total charge at a given time, as the integral is indefinite and requires a constant. If we are given q(0), we can start the integral at that point and add the charge at that point. The same applies for any other given point, such as t=5*10-6.

## Homework Statement

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

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

## Homework Equations

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

## 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:
That approach with an integral starting at -∞ looks more complicated than necessary.

The basic issue is this formula:
Flinchy said:
$$q(t) = \int \mathrm{i(t)}\, \mathrm{d}t$$
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.

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.

Flinchy said:
1. 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...

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

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