If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

# LC natural response - derivation

Formal derivation of the LC natural response, where we discover the frequency of oscillation. Written by Willy McAllister.
We derive the natural response of the inductor-capacitor, $\text{LC}$, circuit.
This is where sine waves are born.

### Background

This article walks you step-by-step through the solution to a $2$nd-order differential equation. I don't assume you have previous experience with this type of equation. Sal has videos on 2nd-order equations, too. $1$st-order differential equations are solved step-by-step in the articles on $\underset{―}{\text{RC}}$ and $\underset{―}{\text{RL}}$ natural response. You can also check out Sal's videos on 1st-order differential equations.

### What we're building to

The natural response of an $\text{LC}$ circuit is described by this homogeneous second-order differential equation:
$\text{L}\phantom{\rule{0.167em}{0ex}}\frac{{d}^{2}\phantom{\rule{0.167em}{0ex}}i}{d\phantom{\rule{0.167em}{0ex}}{t}^{2}}+\frac{1}{\text{C}}i=0$
The solution for the current is:
$i\left(t\right)=\sqrt{\frac{\text{C}}{\text{L}}}\phantom{\rule{0.167em}{0ex}}{\text{V}}_{0}\mathrm{sin}{\omega }_{\circ }t$
Where ${\omega }_{\circ }=\sqrt{\frac{1}{\text{LC}}}$ is the natural frequency of the $\text{LC}$ circuit and ${\text{V}}_{0}$ is the starting voltage on the capacitor.
In electrical engineering, we use the letter $j$ as the $\sqrt{-1}$.
(The letter $i$ is already taken for current.)

## Introduction

### First-order systems

Up to now we've looked at first-order circuits, $\underset{―}{\text{RC}}$ and $\underset{―}{\text{RL}}$, that have one energy-storage element, $\text{C}$ or $\text{L}$. The natural response of first-order circuits has an exponential shape that "slumps" to its final value. The energy in its storage element is dissipated by the resistor.

### Second-order systems

Now we look at a circuit with two energy-storage elements and no resistor. Circuits with two storage elements are second-order systems, because they produce equations with second derivatives.
This article covers the $\text{LC}$ circuit, one of the last two circuits we will solve with full differential equation treatment. The last circuit to get this treatment is the $\text{RLC}$ (in the next article). The mathematics of differential equations keeps getting harder. Fortunately, after we are done with the $\text{LC}$ and $\text{RLC}$, we learn a really nice shortcut to make our lives simpler.
We stick with differential equations instead of going straight to the shortcut because I want to show you where sine waves come from in electronics. Sine waves emerge from the solution to second-order equations. Sine waves are important. They are the building block for all other types of signals.
Second-order systems are the first systems that rock back and forth in time, or oscillate. The classic example of a mechanical second-order system is a clock with a pendulum. In electronics, the classic second-order system is the $\text{LC}$ circuit.

## Natural response

We want to find the natural response of the $\text{LC}$ circuit. The natural response is what a circuit does when there is no external driving force. Natural response is always an important part of the total response of a circuit.

## Natural response of a $2$‍ nd-order circuit

To get going on a precise answer for the natural response, let's set up the circuit with some initial energy. The components are labeled with careful attention to the sign convention for passive components. The inductor has an initial current of $0\phantom{\rule{0.167em}{0ex}}\text{A}$ because the switch starts in the open position. We assume the capacitor has an initial voltage before the switch closes, ${v}_{\text{C}}=-{\text{V}}_{0}$. ( Notice how ${v}_{\text{C}}$ has its $+$ sign at the bottom.) We let the switch close at $t=0$.
As with every circuit analysis, we begin by writing one of Kirchhoff's Laws. In this case, we'll go with Kirchhoff's Voltage Law (KVL) around the loop, starting at the lower left and going around clockwise.
${v}_{\text{L}}+{v}_{\text{C}}=0$
$\text{L}\phantom{\rule{0.167em}{0ex}}\frac{di}{dt}+\frac{1}{\text{C}}\phantom{\rule{0.167em}{0ex}}\int i\phantom{\rule{0.167em}{0ex}}dt=0$
This KVL equation contains an integral, which is awkward to deal with. The way to get rid of an integral (also known as an anti-derivative) is to take its derivative. We take the derivative of every term in the equation.
$\frac{d}{dt}\left(\phantom{\rule{0.167em}{0ex}}\text{L}\phantom{\rule{0.167em}{0ex}}\frac{di}{dt}+\frac{1}{\text{C}}\phantom{\rule{0.167em}{0ex}}\int i\phantom{\rule{0.167em}{0ex}}dt\phantom{\rule{0.167em}{0ex}}\right)=\frac{d}{dt}\phantom{\rule{0.167em}{0ex}}0$
This gives us the second derivative of the $\text{L}$ term, gets rid of the integral in the $1/\text{C}$ term, and still leaves us with $0$ on the right side.
$\text{L}\phantom{\rule{0.167em}{0ex}}\frac{{d}^{2}i}{d{t}^{2}}+\frac{1}{\text{C}}\phantom{\rule{0.167em}{0ex}}i=0$
The equation is tidier if the first term has no coefficient, so we divide through by $\text{L}$. This second-order differential equation captures the essence of our circuit.
$\frac{{d}^{2}i}{d{t}^{2}}+\frac{1}{\text{LC}}\phantom{\rule{0.167em}{0ex}}i=0$

### Propose a solution

When we solved the first-order $\text{RC}$ and $\text{RL}$ circuits, we guessed at an exponential solution for $i\left(t\right)$. Guessing works with second-order equations, too. Our second-order equation has similar requirements: we want the function and its derivatives to look like each other so they can all add up to $0$. The exponential function fits the description. We propose an exponential function with some adjustable parameters:
$i\left(t\right)=K{e}^{st}$
$K$ is an amplitude factor that scales the current big or small.
$s$ is up in the exponent sitting next to time $t$. Since exponents don't have dimensions, $s$ has to have units of $1/t$, which is also known as frequency. Since we are solving a natural response, $s$ is called the natural frequency.
Now we substitute our proposed function into the differential equation and check to see if it makes the equation true.
$\frac{{d}^{2}\phantom{\rule{0.167em}{0ex}}i}{d\phantom{\rule{0.167em}{0ex}}{t}^{2}}+\frac{1}{\text{LC}}i=0$
$\frac{{d}^{2}}{d\phantom{\rule{0.167em}{0ex}}{t}^{2}}\left(K{e}^{st}\right)+\frac{1}{\text{LC}}\left(K{e}^{st}\right)=0$
Let's work on the first term by taking two derivatives. The first derivative is:
$\frac{d}{dt}\left(K{e}^{st}\right)=sK{e}^{st}$
And now the second derivative:
$\frac{{d}^{2}}{d\phantom{\rule{0.167em}{0ex}}{t}^{2}}\left(K{e}^{st}\right)=\frac{d}{dt}\left(sK{e}^{st}\right)={s}^{2}K{e}^{st}$
We plug our new second derivative back into the equation:
${s}^{2}K{e}^{st}+\frac{1}{\text{LC}}K{e}^{st}=0$
And do some factoring to pull $K{e}^{st}$ to the side:
$K{e}^{st}\left({s}^{2}+\frac{1}{\text{LC}}\right)=0$
How many ways can we make this equation true?
$K=0$ is pretty boring. $0=0$, who cares?
${e}^{st}$ never becomes zero for a finite amount of time.
That leaves the interesting solution when the ($s+1/\text{LC)}$ term equals $0$:
${s}^{2}+\frac{1}{\text{LC}}=0$
This equation is called the characteristic equation of our circuit. We want to find the roots of the characteristic equation (the value(s) of $s$ that make left side equal zero).
${s}^{2}=-\frac{1}{\text{LC}}$
Whoa, look what's about to happen. We're about to take the square root of a negative number. We are about to generate an imaginary number.
$s$ has two possible values:
${s}_{1}=+j\phantom{\rule{0.167em}{0ex}}\sqrt{\frac{1}{\text{LC}}}$
${s}_{2}=-j\phantom{\rule{0.167em}{0ex}}\sqrt{\frac{1}{\text{LC}}}$
Electrical engineers use the letter $j$ to indicate the imaginary unit, $\sqrt{-1}$, since we already use $i$ for current.
As a shorthand, we give a name to the square root term:
${\omega }_{\circ }=\sqrt{\frac{1}{\text{LC}}}$
The roots of the characteristic equation can be expressed in terms of ${\omega }_{\text{o}}$ as:
${s}_{1}=+j\phantom{\rule{0.167em}{0ex}}{\omega }_{\circ }$
${s}_{2}=-j\phantom{\rule{0.167em}{0ex}}{\omega }_{\circ }$
How about that! The $\text{LC}$ circuit produces two complex natural frequencies, ${s}_{1}$ and ${s}_{2}$. And one of the natural frequencies is negative. So curious. This will turn out to be very interesting.
Either ${s}_{1}$ or ${s}_{2}$ by itself is a root of the equation. For our proposed solution we allow the possibility of both natural frequencies, ${s}_{1}$ and ${s}_{2}$. So we write a general solution as a linear combination of two terms, with two adjustable $K$ constants.
$i\left(t\right)={K}_{1}{e}^{+j{\omega }_{\circ }t}+{K}_{2}{e}^{-j{\omega }_{\circ }t}$
At this point you might be thinking, "Complex exponents? Negative frequency? Is this really happening?" The answer is, yes. So please hang in there while we work with these expressions.

## Euler's identities

To work with these complex exponents, we resort to an important identity.
Using Maclaurin series expansions for ${e}^{jx}$, $\mathrm{sin}jx$, and $\mathrm{cos}jx$, it is possible to derive these Euler identities:
${e}^{+jx}=\mathrm{cos}x+j\mathrm{sin}x$
${e}^{-jx}=\mathrm{cos}x-j\mathrm{sin}x$
In the linked video, anytime Sal says $i$, we will say $j$.
These identities let us turn the strange ${e}^{imaginary}$ thing to a normal complex number. The real and imaginary parts come from a cosine or sine function, so both the real and imaginary components are somewhere in the range $-1$ to $+1$.

## Use Euler's identities

We can use Euler's identities in our proposed solution.
$i\left(t\right)={K}_{1}{e}^{+j{\omega }_{\circ }t}+{K}_{2}{e}^{-j{\omega }_{\circ }t}$
$i\left(t\right)={K}_{1}\left(\mathrm{cos}{\omega }_{\circ }t+j\mathrm{sin}{\omega }_{\circ }t\right)+{K}_{2}\left(\mathrm{cos}{\omega }_{\circ }t-j\mathrm{sin}{\omega }_{\circ }t\right)$
Multiply through the constants:
$i\left(t\right)={K}_{1}\mathrm{cos}{\omega }_{\circ }t+j{K}_{1}\mathrm{sin}{\omega }_{\circ }t+{K}_{2}\mathrm{cos}{\omega }_{\circ }t-j{K}_{2}\mathrm{sin}{\omega }_{\circ }t\phantom{\rule{0.167em}{0ex}},$
and gather the cosine terms and sine terms together:
$i\left(t\right)=\left({K}_{1}+{K}_{2}\right)\mathrm{cos}{\omega }_{\circ }t+j\left({K}_{1}-{K}_{2}\right)\mathrm{sin}{\omega }_{\circ }t$
We don't know ${K}_{1}$ or ${K}_{2}$, or their sum or difference. It seems perfectly ok to replace the unknown $K$'s with different unknown $A$'s, just to make things appear a bit simpler.
If we let ${A}_{1}=\left({K}_{1}+{K}_{2}\right)$, and ${A}_{2}=j\left({K}_{1}-{K}_{2}$), then $i\left(t\right)$ is:
$i\left(t\right)={A}_{1}\mathrm{cos}{\omega }_{\circ }t+{A}_{2}\mathrm{sin}{\omega }_{\circ }t$
We used Euler's identities to rearrange the complex exponentials into a sum of trig functions. This equation is the very first time in electronics we see a sine or cosine as a function of time (a sinusoidal waveform).
(Notice how we defined ${A}_{2}$ to include $j\left({K}_{1}-{K}_{2}\right)$, so $j$ no longer directly appears in the proposed solution.)

## Test the proposed solution

Next, we check our proposed solution by plugging it into the second-order differential equation. If we can come up with values for the constants that make the differential equation true, the proposed solution is a winner.

### Figure out the initial conditions

The initial conditions needed for a second-order circuit are a little more involved than for a first-order circuit. When we did this for first-order circuits, $\text{RC}$ or $\text{RL}$, we had to know a single value, a starting current or voltage. With a second-order $\text{LC}$ circuit, we need to know two things: the current and the derivative of the current when the switch closes.
We write down everything we know about $t={0}^{-}$ (the moment just before the switch closes):
• The switch is open, so $i\left({0}^{-}\right)=0$
• The starting capacitor voltage is specified: ${v}_{\text{C}}\left({0}^{-}\right)=-{\text{V}}_{0}$.
If $t={0}^{+}$ is the moment just after the switch closes, our goal is to find $i\left({0}^{+}\right)$ and $di/dt\left({0}^{+}\right)$.
We know some properties of inductors and capacitors that will take us from $t={0}^{-}$ to $t={0}^{+}$:
• Inductor current cannot change instantly, so
$i\left({0}^{+}\right)=i\left({0}^{-}\right)=0$
• Capacitor voltage cannot change instantly, so
$v\left({0}^{+}\right)=v\left({0}^{-}\right)={\text{V}}_{0}$
(After the switch closes there is only one $v$, so we'll just call it $v$ from now on.)
Now we have $i\left({0}^{+}\right)$, but not $di/dt\left({0}^{+}\right)$, yet. Where can we get this derivative? How about from the inductor's $i$-$v$ equation?
$v=\text{L}\phantom{\rule{0.167em}{0ex}}\frac{di}{dt}$
$\frac{di}{dt}\left({0}^{+}\right)=\frac{1}{\text{L}}\phantom{\rule{0.167em}{0ex}}v\left({0}^{+}\right)$
$\frac{di}{dt}\left({0}^{+}\right)=\frac{1}{\text{L}}\phantom{\rule{0.167em}{0ex}}{\text{V}}_{0}$
Now we have our second initial condition. This says the moment just after the switch closes, the current in the inductor starts changing with a slope of ${\text{V}}_{0}/\text{L}$ amperes every second.

### Summary of the initial conditions

$i\left({0}^{+}\right)=0$
$\frac{di}{dt}\left({0}^{+}\right)=\frac{1}{\text{L}}\phantom{\rule{0.167em}{0ex}}{\text{V}}_{0}$

### Use the initial conditions to find ${A}_{1}$‍  and ${A}_{2}$‍

We use our initial conditions one at a time to solve for the constants. The first initial condition is $i=0$ at $t={0}^{+}$. Let's plug it into the proposed solution and see where it takes us:
$i\left(t\right)={A}_{1}\mathrm{cos}{\omega }_{\circ }t+{A}_{2}\mathrm{sin}{\omega }_{\circ }t$
$0={A}_{1}\mathrm{cos}\left({\omega }_{\circ }\cdot 0\right)+{A}_{2}\mathrm{sin}\left({\omega }_{\circ }\cdot 0\right)$
$0={A}_{1}\mathrm{cos}0+{A}_{2}\mathrm{sin}0$
$\begin{array}{r}1\\ 0={A}_{1}\overline{)\mathrm{cos}0}\end{array}\begin{array}{r}0\\ +\phantom{\rule{0.167em}{0ex}}{A}_{2}\overline{)\mathrm{sin}0}\end{array}$
$0={A}_{1}$
${A}_{1}$ is $0$, so the proposed cosine term drops out of the solution. Our proposed solution now looks like:
$i\left(t\right)={A}_{2}\mathrm{sin}{\omega }_{\circ }t$
Now we go after ${A}_{2}$ using the second initial condition. The derivative of $i$ at $t={0}^{+}$ is:
$\frac{di}{dt}\left({0}^{+}\right)=\frac{1}{\text{L}}\phantom{\rule{0.167em}{0ex}}{\text{V}}_{0}$
Take the derivative of the proposed $i\left(t\right)$:
$\frac{di}{dt}=\frac{d}{dt}\left({A}_{2}\mathrm{sin}{\omega }_{\circ }t\right)$
$\frac{di}{dt}={\omega }_{\circ }{A}_{2}\mathrm{cos}{\omega }_{\circ }t$
Evaluating this expression at $t=0$:
$\frac{1}{\text{L}}\phantom{\rule{0.167em}{0ex}}{\text{V}}_{0}={\omega }_{\circ }{A}_{2}\mathrm{cos}\left({\omega }_{\circ }\cdot 0\right)$
$\frac{1}{\text{L}}\phantom{\rule{0.167em}{0ex}}{\text{V}}_{0}={\omega }_{\circ }{A}_{2}\cdot 1$
${A}_{2}=\frac{1}{{\omega }_{\circ }\text{L}}\phantom{\rule{0.167em}{0ex}}{\text{V}}_{0}$
We can expand ${\omega }_{\circ }$ into $\text{L}$ and $\text{C}$ to get:
${A}_{2}=\sqrt{\frac{\text{C}}{\text{L}}}\phantom{\rule{0.167em}{0ex}}{\text{V}}_{0}$
And finally, after a lot of hard work, the solution for the current is:
$i\left(t\right)=\sqrt{\frac{\text{C}}{\text{L}}}\phantom{\rule{0.167em}{0ex}}{\text{V}}_{0}\mathrm{sin}{\omega }_{\circ }t$

## Real component values

To demonstrate what the solution looks like, we assign component values $\text{L}=1$ henry and $\text{C}=1/4$ farad, and a starting voltage on the capacitor of $10\phantom{\rule{0.167em}{0ex}}\text{V}$.
The natural frequency, ${\omega }_{\circ }$ is:
${\omega }_{\circ }=\sqrt{\frac{1}{\text{LC}}}=\sqrt{\frac{1}{1\cdot 1/4}}=2\phantom{\rule{0.167em}{0ex}}\text{radians/second}$
The current as a function of time is:
$i\left(t\right)=\sqrt{\frac{\text{C}}{\text{L}}}\phantom{\rule{0.167em}{0ex}}{\text{V}}_{0}\mathrm{sin}{\omega }_{\circ }t=\sqrt{\frac{\text{1}/4}{1}}\phantom{\rule{0.167em}{0ex}}10\mathrm{sin}{\omega }_{\circ }t$
$i\left(t\right)=5\mathrm{sin}2t$
The current starts up the moment the switch closes:
The current takes off in a sine wave pattern that continues forever. (There is no resistor in this ideal circuit, so the energy never dissipates. In a real-world circuit there would be small resistances that eventually dissipate the energy.)
The natural frequency of the sine wave is ${\omega }_{\circ }=2\phantom{\rule{0.167em}{0ex}}\text{radians}/\text{sec}$. We can convert from radians per second to cycles per second, (also known as hertz, or $\text{Hz}$) knowing that $1$ full cycle of a sine function corresponds to $2\pi$ radians. We usually use the symbol $f$ for cycles per second. The conversion is:
$\omega =2\pi f$
The natural frequency of the circuit in cycles per second, hertz, $\text{Hz}$, is:
$f=\frac{2\phantom{\rule{0.167em}{0ex}}\text{radians/sec}}{2\pi }=\frac{1}{\pi }\phantom{\rule{0.167em}{0ex}}\text{Hz,}$
or equivalently, the current completes a full cycle every $\pi$ seconds.

### A quick look back at the initial conditions

We can look in close to the origin to see how the solution accounted for the initial conditions. The sine wave starts at the origin, $i=0$. And notice how the slope of the blue sine wave near the origin matches the slope of the straight black line, $i=10\phantom{\rule{0.167em}{0ex}}\text{A}/\text{sec}$.

## Voltage, $v\left(t\right)$‍

At this point we have solved the current. If you want to press on a little further, have a go at solving for the voltage, $v\left(t\right)$.
Find an expression for $v\left(t\right)$ after the switch closes.
Probably the quickest route is to use the inductor $i$-$v$ equation to solve for $v$ in terms of $di/dt$.
$v\left(t\right)=\phantom{\rule{1em}{0ex}}$

## Summary

We derived the natural response of an $\text{LC}$ circuit by first creating this homogeneous second-order differential equation:
$\frac{{d}^{2}\phantom{\rule{0.167em}{0ex}}i}{d\phantom{\rule{0.167em}{0ex}}{t}^{2}}+\frac{1}{\text{LC}}i=0$
Then we assumed a solution of the form $K{e}^{st}$, which gave us the characteristic equation for the circuit:
${s}^{2}+\frac{1}{\text{LC}}=0$
When computing the roots of the characteristic equation we ran head on into a very strange expression: ${e}^{j{\omega }_{\circ }t}$, an exponential with complex exponent. We reached deep into our bag of tricks and pulled out:
Euler's identities
${e}^{+jx}=\mathrm{cos}x+j\mathrm{sin}x$
${e}^{-jx}=\mathrm{cos}x-j\mathrm{sin}x$
These identities let us express the complex exponential as a combination of sine and cosine functions. (In electrical engineering, we use the letter $j$ as the name for $\sqrt{-1}.$)
Then we looked carefully at the circuit to find the initial conditions. For a second-order system, we found an initial $i$ and an initial $di/dt$.
We found a function for $i\left(t\right)$ that satisfied the differential equation:
$i\left(t\right)=\sqrt{\frac{\text{C}}{\text{L}}}\phantom{\rule{0.167em}{0ex}}{\text{V}}_{0}\mathrm{sin}{\omega }_{\circ }t$
${\omega }_{\circ }\equiv \sqrt{\frac{1}{\text{LC}}}$ is the natural frequency of the $\text{LC}$ circuit.
${\text{V}}_{0}$ is the starting voltage on the capacitor.
(This solution applies when the starting current in the inductor is $0$.)