# Calculating current through an inductor

I am working on my Circuits Analysis class and I came across an interesting problem. I will put it below along with my work and then explain the problem. The current through the $L=100\,mH$ inductor in the following figure is $i=2(2−e^{−\frac{t}{100}}) \, mA$. Use the integral of the power to find the initial energy stored in the inductor at $t=0$.

Using the formula $W = \dfrac{1}{2}L\,i^2$, you get $W = 0.5 \times 0.1 \times (0.002)^2 = 200\,nJ$ of energy. This turns out to be the correct answer, but for fun I decided to do it the long way.

\begin{align*} P &= L \dfrac{di}{dt} i \\[1 em] i &= 0.004 - 0.002 \, e^{-\frac{t}{100}} \\[1 em] \dfrac{di}{dt} &= 2 \times 10^{-5} \, e^{-\frac{t}{100}} \\[1 em] L &= 0.1 \\[1em] \end{align*}

Simplifying, you get:

\begin{align*} P &= 8 \times 10^{-9} e^{-\frac{t}{100}} - 4 \times 10^{-9} e^{-\frac{t}{50}} \\[1em] \end{align*}

By integrating P with respect to t, you can get the total work:

\begin{align*} W &= -8 \times 10^{-7} e^{-\frac{t}{100}} + 2 \times 10^{-7} e^{-\frac{t}{50}} \\ \end{align*}

Plugging in $t=0$, you get $-600\,nJ$ instead of $200\,nJ$.

Why does the longer method yield a different answer? Am I neglecting something?

You are not calculating what you think you are. You would normally use definite integrals to see the work done over a time period. An indefinite integral doesn't really make much physical sense.

The original equation of the energy in an inductor can be derived as the integral of the power needed to go from a 0 current to the final current I in some time T:

$Energy Stored = \int^T_0{P\cdot dt} = \int^I_0{L i'di'} = \frac{1}{2}LI^2$

There is an important lesson here. This is solvable with general variables. This is possible because it doesn't matter how you get to a current of I, the same energy must be invested to get there.

If you go from 0A to 3A to 2A to 5A in some crazy complicated fashion, the expended energy will be the same as if you went linearly from 0A to 5A in 1 second.

If this weren't true, then it wouldn't make sense to talk about the energy stored in an inductor "at a particular current." You would have to know how you got there to know the answer.

• I considered the fact that the integral is indefinite and that it isn't useful. But, when the t=0, you get the top and bottom parameter to be equal which should be zero. How does that work out? Obviously in your equation it's di instead of dt on the right side, but the left side is power calculated from 0 to 0, which should be 0 correct? Feb 1, 2015 at 1:17
• The definite integral tells you the change in energy between the top and bottom times. If the top and bottom are equal, then you will get an answer of 0, which make sense because you haven't done anything to change the energy. Feb 1, 2015 at 1:21

To expand on what had been said already. One proper way is to use definite integral but it will only give you the change in energy. You can use indefinite integral properly too, that you must put in an integration constant. The integration still does not give you the absolute values for the post-integrated function. That is the nature of integration.

So how does one find the exact function that yields absolute values -- one way is to apply an initial condition to fix the constant. For example, $E(t=0) = 200nJ$ would be a perfectly good initial condition. But obviously, this is not going to help for double checking itself.

Alternatively, you can apply a different boundary condition. For example, at $t = \infty$ to fix the integration constant. $E(t = \infty)$ is quite easy to figure out, but you would be using the same equation $E = \frac12LI^2$.

Furthermore, notice that $E_{coil}(0) + E_{change}\biggr |_0^\infty = E_{coil}(\infty)$. The second term would be the definite integral. So everything do tie in together with no conflict.

You calculate the indefinite integral while you have to calculate the the definite integral. As you pointed out in your comment this would result in 0J. The missing part is the constant in the calculation of the integral which is precisely the energy stored at t(0) due to the 2mA flowing through the coil. This got lost during differentiation in your second line.