# Metamath Proof Explorer

## Theorem fourier

Description: Fourier series convergence for periodic, piecewise smooth functions. The series converges to the average value of the left and the right limit of the function. Thus, if the function is continuous at a given point, the series converges exactly to the function value, see fouriercnp . Notice that for a piecewise smooth function, the left and right limits always exist, see fourier2 for an alternative form of the theorem that makes this fact explicit. When the first derivative is continuous, a simpler version of the theorem can be stated, see fouriercn . (Contributed by Glauco Siliprandi, 11-Dec-2019)

Ref Expression
Hypotheses fourier.f
`|- F : RR --> RR`
fourier.t
`|- T = ( 2 x. _pi )`
fourier.per
`|- ( x e. RR -> ( F ` ( x + T ) ) = ( F ` x ) )`
fourier.g
`|- G = ( ( RR _D F ) |` ( -u _pi (,) _pi ) )`
fourier.dmdv
`|- ( ( -u _pi (,) _pi ) \ dom G ) e. Fin`
fourier.dvcn
`|- G e. ( dom G -cn-> CC )`
fourier.rlim
`|- ( x e. ( ( -u _pi [,) _pi ) \ dom G ) -> ( ( G |` ( x (,) +oo ) ) limCC x ) =/= (/) )`
fourier.llim
`|- ( x e. ( ( -u _pi (,] _pi ) \ dom G ) -> ( ( G |` ( -oo (,) x ) ) limCC x ) =/= (/) )`
fourier.x
`|- X e. RR`
fourier.l
`|- L e. ( ( F |` ( -oo (,) X ) ) limCC X )`
fourier.r
`|- R e. ( ( F |` ( X (,) +oo ) ) limCC X )`
fourier.a
`|- A = ( n e. NN0 |-> ( S. ( -u _pi (,) _pi ) ( ( F ` x ) x. ( cos ` ( n x. x ) ) ) _d x / _pi ) )`
fourier.b
`|- B = ( n e. NN |-> ( S. ( -u _pi (,) _pi ) ( ( F ` x ) x. ( sin ` ( n x. x ) ) ) _d x / _pi ) )`
Assertion fourier
`|- ( ( ( A ` 0 ) / 2 ) + sum_ n e. NN ( ( ( A ` n ) x. ( cos ` ( n x. X ) ) ) + ( ( B ` n ) x. ( sin ` ( n x. X ) ) ) ) ) = ( ( L + R ) / 2 )`

### Proof

Step Hyp Ref Expression
1 fourier.f
` |-  F : RR --> RR`
2 fourier.t
` |-  T = ( 2 x. _pi )`
3 fourier.per
` |-  ( x e. RR -> ( F ` ( x + T ) ) = ( F ` x ) )`
4 fourier.g
` |-  G = ( ( RR _D F ) |` ( -u _pi (,) _pi ) )`
5 fourier.dmdv
` |-  ( ( -u _pi (,) _pi ) \ dom G ) e. Fin`
6 fourier.dvcn
` |-  G e. ( dom G -cn-> CC )`
7 fourier.rlim
` |-  ( x e. ( ( -u _pi [,) _pi ) \ dom G ) -> ( ( G |` ( x (,) +oo ) ) limCC x ) =/= (/) )`
8 fourier.llim
` |-  ( x e. ( ( -u _pi (,] _pi ) \ dom G ) -> ( ( G |` ( -oo (,) x ) ) limCC x ) =/= (/) )`
9 fourier.x
` |-  X e. RR`
10 fourier.l
` |-  L e. ( ( F |` ( -oo (,) X ) ) limCC X )`
11 fourier.r
` |-  R e. ( ( F |` ( X (,) +oo ) ) limCC X )`
12 fourier.a
` |-  A = ( n e. NN0 |-> ( S. ( -u _pi (,) _pi ) ( ( F ` x ) x. ( cos ` ( n x. x ) ) ) _d x / _pi ) )`
13 fourier.b
` |-  B = ( n e. NN |-> ( S. ( -u _pi (,) _pi ) ( ( F ` x ) x. ( sin ` ( n x. x ) ) ) _d x / _pi ) )`
14 1 a1i
` |-  ( T. -> F : RR --> RR )`
` |-  ( ( T. /\ x e. RR ) -> ( F ` ( x + T ) ) = ( F ` x ) )`
16 5 a1i
` |-  ( T. -> ( ( -u _pi (,) _pi ) \ dom G ) e. Fin )`
17 6 a1i
` |-  ( T. -> G e. ( dom G -cn-> CC ) )`
` |-  ( ( T. /\ x e. ( ( -u _pi [,) _pi ) \ dom G ) ) -> ( ( G |` ( x (,) +oo ) ) limCC x ) =/= (/) )`
` |-  ( ( T. /\ x e. ( ( -u _pi (,] _pi ) \ dom G ) ) -> ( ( G |` ( -oo (,) x ) ) limCC x ) =/= (/) )`
` |-  ( T. -> X e. RR )`
` |-  ( T. -> L e. ( ( F |` ( -oo (,) X ) ) limCC X ) )`
` |-  ( T. -> R e. ( ( F |` ( X (,) +oo ) ) limCC X ) )`
` |-  ( T. -> ( ( ( A ` 0 ) / 2 ) + sum_ n e. NN ( ( ( A ` n ) x. ( cos ` ( n x. X ) ) ) + ( ( B ` n ) x. ( sin ` ( n x. X ) ) ) ) ) = ( ( L + R ) / 2 ) )`
` |-  ( ( ( A ` 0 ) / 2 ) + sum_ n e. NN ( ( ( A ` n ) x. ( cos ` ( n x. X ) ) ) + ( ( B ` n ) x. ( sin ` ( n x. X ) ) ) ) ) = ( ( L + R ) / 2 )`