- [Instructor] Let's wrap up boundary value problems
by exploring how Fourier Series show up in them.
You have probably noticed these series
show up along the way.
But let's take a moment to focus on them
and how they will become helpful
when solving partial differential equations
along with other boundary value problems.
Fourier Series are similar to Taylor series
where they help you express complicated functions
in simpler terms in the form of a series.
Fourier Series are different from Taylor series though
since they always converge on the same interval
if a function converges,
meaning the interval does not depend on the function.
They also don't have powers of the functions,
but instead are a series of different arguments
involving the series solution.
A Fourier Series represents a periodic function f of x
with a period of two capital L
as an infinite sum of sine and cosine values.
This allows you to express complex functions
as a summation of simple trigonometric terms
with sine and cosine.
Let's look at the formula for Fourier Series
for a periodic function f of x with a period
of two capital L.
So this gets you the Fourier Series of f of x
equals a of zero divided by two,
plus the sum of n equals one to infinity
of capital A of n multiplied by the cosine of n,
multiplied by pi, multiplied by x divided by capital L,
multiplied by capital B of n, multiplied by sine of n,
multiplied by pi, multiplied by x, divided by capital L.
And to get your two coefficients,
capital A of N and capital B of n,
you'll use the integrals for capital A of n
equal to one divided by capital L
with the integral of negative capital L,
two capital L of f of x,
multiplied by cosine of n, multiplied by pi,
multiplied by x, divided by capital L dx.
And then for coefficient capital Bn,
it'll be equal to one divided by capital L,
multiplied by the integral of negative capital L to L
of f of x multiplied by sine of n,
multiplied by pi, multiplied by x,
divided by capital L dx.
Note that there are two subtypes of Fourier Series.
If you're dealing with even functions
where f of x equals f of negative x,
then it's a Fourier cosine series.
If you're dealing with odd functions
where F of x equals negative f of negative x,
then you're dealing with a Fourier sine series.
Let's look at the corresponding equations
for these two Fourier Series subtypes.
For Fourier cosine series, you have f of x
equals the sum of n equals zero to infinity
of capital A of n, multiplied by cosine of n,
multiplied by pi, multiplied by x,
divided by capital L.
Next you have the Fourier sine series
of f of x equals the sum of n equals one to infinity,
F capital B of n, multiplied by sine of n,
multiplied by pi, multiplied by x, divided by capital L.
Their naming makes sense
since with the Fourier cosine series,
it just has the cosine term
and with the Fourier sine series,
it just has the sine term.
So how do Fourier Series work in the first place?
Fourier Series work because sine and cosine functions
form an orthogonal basis over an interval.
This causes each function to capture a unique component
of the original function to allow the sum of them
to reconstruct that original function.
If your function is continuous
and infinitely differentiable,
then the Fourier Series will quickly converge,
making it a great fit for this.
For discontinuous functions,
Fourier Series will still converge,
but they will have a small overshoot
near the discontinuity of the original function.
So why are these complicated Fourier Series
needed in the first place?
Fourier Series help make
solving differential equations easier in various scenarios,
especially with partial differential equations.
They allow you to decompose functions
into frequency components, making them easier to work with.
They're also great with approximating
discontinuous functions.
Let's look at a few examples of finding Fourier Series
for some simple boundary value problems.
Let's look at the Fourier Series
for f of x equals x over the range negative capital L,
less than or equal to x, less than or equal to capital L,
where you'll have a naught over two equal to zero.
So you have your formula for your Fourier Series,
f of x equals a zero divided by two,
plus the sum of n equals one to infinity
of capital A of n, multiplied by cosine of n,
multiplied by pi, multiplied by x, divided by capital L.
Multiply that by capital B of n, multiplied by sine of n,
multiplied by pi, multiplied by x, divided by capital L.
And let's find your coefficient, capital A of n first.
So this will be capital A of n
equals one divided by capital L,
multiplied by the integral
of negative capital L to capital L of f of x,
multiplied by cosine of n, multiplied by pi,
multiplied by x, divided by capital L dx.
Since you're working with an odd function,
capital A of n will actually equal zero,
so you won't necessarily need
to use the full formula to solve for it
since you'll know it automatically equals zero.
Now let's look at capital B of n,
which is equal to one divided by capital L,
multiplied by the integral
of negative capital L to capital L of f of x,
multiplied by sine of n, multiplied by pi,
multiplied by x, divided by capital L dx.
This will get you capital B of n
equals two divided by capital L,
multiplied by the integral of zero to L of x,
multiplied by sine of n, multiplied by pi,
multiplied by x, divided by capital L dx.
If you integrate this,
you'll then get two divided by capital L
multiplied by capital L, divided by n squared,
multiplied by pi squared.
Multiply that by capital L, multiplied by sine of n,
multiplied by pi, multiplied by x, divided by capital L.
Subtract that by n, multiplied by pi, multiplied by x,
multiplied by cosine of n, multiplied by pi,
multiplied by x, divided by capital L.
Let's evaluate this from the values of zero to capital L.
This gets you two divided by capital L
multiplied by capital L, divided by n squared,
multiplied by pi squared, multiplied by capital L,
multiplied by sine of n, multiplied by pi,
multiplied by capital L, divided by capital L.
Subtract that by n, multiplied by pi,
multiplied by capital L, multiplied by cosine of n,
multiplied by pi, multiplied by capital L,
divide all that by capital L.
And then you'll subtract this by two
divided by capital L, minus L divided by n squared,
multiplied by pi squared.
Multiply that by capital L, multiplied by sine of n,
multiplied by pi, multiplied by zero,
divided by capital L minus n, multiplied by pi,
multiplied by zero, multiplied by cosine of n,
multiplied by pi, multiplied by zero, divided by capital L.
Once you simplify this,
you'll get two divided by n squared,
multiplied by pi squared,
and then you'll multiply that by capital L
multiplied by sine of n, multiplied by pi minus n,
multiplied by pi, multiplied by capital L,
multiplied by cosine of n, multiplied by pi.
Since n multiplied by pi equals zero
and cosine of n multiplied by pi
will equal negative one to the n,
you'll then get capital B of n equals
two divided by n squared, multiplied by pi squared.
Multiply that by negative n, multiplied by pi,
multiplied by capital L,
multiplied by negative one to the n.
Once you simplify this, you'll get capital B of n
equals negative one to the n plus one multiplied by two,
multiplied by capital L, divided by n, multiplied by pi.
Let's plug this in to your Fourier Series
to get a final result of f of x
equals the sum of n equals one to infinity
of negative one to the n plus one multiplied by two,
multiplied by capital L, divided by n, multiplied by pi.
And you multiply that by sine of n,
multiplied by pi, multiplied by x, divide that by capital L.
Let's look at another Fourier Series example,
but this, let's find it for f of x equals x squared.
This will be for negative capital L,
less than or equal to x,
less than or equal to capital L.
And if you solve for a zero divided by two,
you would get L squared divided by three.
So using your formula with Fourier Series,
you'll have f of x equals a of zero divided by two,
plus the sum of n equals one to infinity
of capital A of n multiplied by cosine of n,
multiplied by pi, multiplied by x, divided by capital L.
Multiply that by capital B of n, multiplied by sine of n,
multiplied by pi, multiplied by x, divided by capital L.
Let's find your coefficient, capital A of n,
which will equal one divided by capital L
of the integral of negative capital L
to capital L of f of x,
multiplied by cosine of n, multiplied by pi,
multiplied by x, divided by capital L dx.
And then if you substitute in your values
and multiply the integral by two
to get it just from zero to capital L,
you'll then get capital A of n
equals two divided by capital L,
multiplied by the integral of zero
to capital L of x squared,
multiplied by cosine of n multiplied by pi,
multiplied by x, divided by capital L dx.
This will then equal two divided by capital L,
multiplied by capital L, divided by n cubed,
multiplied by pi cubed, multiplied by two,
multiplied by capital L, multiplied by n,
multiplied by pi, multiplied by x,
multiplied by cosine of n, multiplied by pi,
multiplied by x, divided by capital L.
And then you'll add n squared multiplied by pi squared,
multiplied by x squared minus two,
multiplied by capital L squared.
Multiply that by sine of n, multiplied by pi,
multiplied by x, divided by capital L,
and you'll evaluate this from zero to L.
Plugging in those values to solve it,
you'll then get two divided by n cubed
multiplied by pi cubed, multiplied by two,
multiplied by L squared, multiplied by n,
multiplied by pi,
multiplied by cosine of n, multiplied by pi
plus n squared, multiplied by pi squared,
multiplied by capital L squared minus two,
multiplied by capital L squared,
multiplied by sine of n, multiplied by pi.
Since sine of n multiplied by pi equals zero
and cosine of n multiplied by pi
equals negative one to the n,
you'll then get capital A of n equals
two divided by n cubed multiplied by pi cubed,
and then you multiply that by two,
multiplied by capital L squared, multiplied by n,
multiplied by pi, multiplied by negative one to the n.
Simplify this to then get capital a of n equals
negative one to the n multiplied by four,
multiplied by capital L squared,
divided by n squared, multiplied by pi squared.
Next, let's get your coefficient, capital B of n,
which equals one divided by L,
multiplied by the integral
of negative capital L to L of f of x,
multiplied by sine of n, multiplied by pi,
multiplied by x, divided by capital L dx.
Since you are working with an even function,
the integral of this will then equal zero,
so capital B of n equals zero.
Plug in your coefficient, capital A of n,
along with getting rid of the portion that included B of n,
to then get a final result of F of x equals
capital L squared divided by three,
plus the sum of n equals one to infinity
of negative one to the n multiplied by four,
multiplied by capital L squared, divided by n squared,
multiplied by pi squared.
And then you multiply that by cosine of n, multiplied by pi,
multiplied by x, divided by capital L.
Fourier Series are key
to solving various partial differential equations
such as the heat and wave equations.
They're used in signal processing
for audio compression.
In engineering, they're used
to study oscillatory motion
when building bridges and airplane wings.
In electrical engineering,
they're used to analyze circuits and control systems.
Understanding what Fourier Series are
and how they can be used in boundary value problems
can be very useful.
Note that this is just the beginning though,
and there are various other partial differential equations
you may come across.
This wraps up your introduction to boundary value problems.
These types of problems will frequently show up
when you're working with partial differential equations.
In the next chapter,
you'll explore what partial differential equations are
and how to solve
many of the common ones you may come across.