0% found this document useful (0 votes)
53 views43 pages

Facial Recognition Using Taylor Series

The document discusses Taylor feature patterns for facial expression recognition. It explains how to compute local binary patterns and 1D and 2D Taylor pixel features. It also describes converting images to the logarithm-Laplace domain and calculating 2D Taylor expansions over image blocks to generate Taylor feature patterns.

Uploaded by

Arman Makhani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views43 pages

Facial Recognition Using Taylor Series

The document discusses Taylor feature patterns for facial expression recognition. It explains how to compute local binary patterns and 1D and 2D Taylor pixel features. It also describes converting images to the logarithm-Laplace domain and calculating 2D Taylor expansions over image blocks to generate Taylor feature patterns.

Uploaded by

Arman Makhani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

PDE Project

November 2022

GROUP MEMBERS
1. Name : Makhani Arman Barkatbhai ID : 202103006
2. Name : Harsh Shashikantbhai kanani ID : 202103050
3. Name : Srushti Nitinbhai Kaneriya ID : 202103037
Module 1 (Differential Calculus)
Using Taylor’s series in facial expression recogni-
tion
Local binary pattern:
LBP is basically a texture operator which labels the pixels of an image
by thresholding the neighborhood of each pixel and considers the result
as a binary number. Let’s take an example to understand it better . pc
is the center pixel value . it is surrounded by N pixels then we define
a function S(pc , pn ) which gives the value 1 if pc ≥ pn and 0 otherwise.
and LBP is found by adding the product of S(pc , pn ) and 2n for n=0
to N-1.
NP−1
In short , LBP (Xc , Yc ) = S(pc , pn ) ∗ 2n
n=0
Looking at the image , it will be pretty clear on how to find the
LBP.First calculate the binary function nS and then just add the prod-
uct with 2n as mentioned before. But there is a more accurate way to
do the same which we will understand in the later part.

Taylor feature Pattern


Pixel taylor feature is basically used to portray the feature of an indi-
vidual pixel.
Let fn (pc ) be the nt h-order Taylor pixel feature whose focal pixel is pc .
According to Taylor’s theorem , fn (pc ) is expanded to
n−1
P f (k) (ϕ)(pc −ϕ)k f (n) (ϕ)(pc −ϕ)
fn (pc ) = k! + n!
k=0

Figure below shows the texture unit with 3X3 of 1st order Taylor pixel
feature f1 (pc ) and 5X5 of the 2nd order Taylor pixel feature f2 (pc ).
Grey implies the first layer of texture unit , and dark grey indicates
the second layer of the texture unit.
So , f1 (pc ) is expressed as:
f ( 0)(ϕ)(pc −ϕ)0 f ( 1)(ϕ)(pc −ϕ)1
f1 (pc ) = 0! + 1!

where (
1; pc − ϕ ≥ 0
f (x) =
−1; pc − ϕ < 0

where f ( 0)(ϕ) is communicated as the average of all the pixels value


1s t order texture1 (T1) , while ϕ is the average of all the pixels value
which comes under the 1s t layer of T1.
2n d order taylor pixel feature f2 (pc ) can be expressed as :
f ( 0)ϕ(pc −ϕ)0 f ( 1)ϕ(pc −ϕ)1 f ( 2)ϕ(pc −ϕ)2
f2 (pc ) = 0! + 1! + 2!

where (
1; pc − ϕ ≥ 0
f (1) (ϕ) =
−1; pc − ϕ < 0
(
1; (pc − ϕ1 )(pc − ϕ2 ) ≥ 0
f (2) (ϕ) =
−1; (pc − ϕ1 )(pc − ϕ2 ) < 0
where f (0) (ϕ) is the average if all the pixels value 2n d order texture2(t2)
while ϕ1 is the average of all the pixels value which comes under the
1s t layer , ϕ2 is the average of all the pixels value of the 2n d layer in
the T2 and ϕ is the average of all the pixels value that comes in the
1s t layer and 2n d layer of T2.

Taylor feature pattern


It is computed in the same way as LBP. Let’s take an example of 3X3
in any image so TFP of fn (pc ) is given as:

8
X
TFP = S(fn (pc ), fn (pj ))2j−1
j=1

where S(fn (pc ), fn (pj )) is computed the same as defined in LBP.


2n d order TFP with one dimensional provided satisfactory result but it
would be more accurate to 2n d order two-dimensional taylor expansion.
Two dimensional taylor expansion
In this technique , it is possible that the recognition rates vary a
lot with changing illuminations. To handle that , Logarithm-Laplace
strategy is used. LL space is invariable illumination space so input im-
age is first transfered into LL space.Then , 2D taylor expansion of the
LL domain image into R blocks takes place. R is basically associated
with the recognition rate and the time of the recognition step. Here
, R is set to different values such as 6 × 6, 8 × 8, 16 × 16 , etc. then ,
TFP is calculated . So , let’s begin with the procedure stepwise.
Converting into LL domain

Input image

I(x1 , y1 ) = H(x1 , y1 )K(x1 , y1 )HereH(x1 , y1 )

is reflectance segment which is managed by the qualities of the object.


K(x1 , y1 ) is illumination segment which depends upon lighting source.

Applying log both the sides ,

logI(x1 , y1 ) = logH(x1 , y1 ) + logK(x1 , y1 )


eg let’s define it as below ,

i(x1 , y1 ) = h(x1 , y1 )k(x1 , y1 )

where each of it is it’s respective log function. Converting say function


i into laplace domain ,

δ 2 i(x1 , y1 ) = δx2 i(x1 , y1 ) + δy2 i(x1 , y1 )

where the RHS indicates the laplacian in x and y axis. Now , applying
laplace transformation ,

δ 2 (x1 , y1 ) = i(x1 +1, y1 )+i(x1 −1, y1 )+i(x1 , y1 +1)i(x1 , y1 −1)−4i(x1 , y1 )


We can apply the same for functions h and k. For k , k(x1 +1, y1 ), k(x1 −
1, y1 ), k(x1 , y1 + 1)k(x1 , y1 − 1), k(x1 , y1 ) are equivalent so the illumina-
tion part cancels each other out becomes 0 . Now , it is only dependant
upon the reflectance part.
So ,

δ 2 i(x1 , y1 ) = h(x1 +1, y1 )+h(x1 −1, y1 )+h(x1 , y1 +1)+h(x1 , y1 −1)−4h(x1 , y1 )

2D Taylor expansion of image 2D pixel taylor feature is given by


f1 (pc ) = f1 (ϕ, ψ) + [(pc − ϕ) ∂f ∂f
∂x + (pc − ψ) ∂y ]

where √ √ √ √
p8 / 2 + p7 + p6 / 2 + p4 / 2p3 + p2 / 2
ϕ= √
4/ 2 + 2
where (Pi)s are all the pixels.

and
√ √ √ √
p8 / 2 + p1 + p2 / 2 + p4 / 2 + p5 + p6 / 2
ψ= √
4/ 2 + 2

Then , we will take


f (ϕ, ψ) = ϕ+ψ2
(
1
∂f 2; pc − ϕ ≥ 0
∂x =
− 21 ; pc − ϕ < 0
(
1
∂f 2; pc − ψ ≥ 0
∂y =
− 21 ; pc − ψ < 0
2n d order f2 (pc ) is given by

2
f2 (pc ) = f (ϕ, ψ) + [(pc − ϕ) ∂f ∂f 1 2∂ f
∂x + (pc − ψ) ∂y ] + 2 [(pc − ϕ) ∂x2 + 2(pc −
2 2
∂ f
ϕ)(pc − ψ) ∂x∂y + (pc − ψ)2 ∂∂yf2 ](1)
ϕ1 , ψ1 , ϕ2 and ψ2 are used in the computation of ϕ and ψ. So , we
will look into their definition.

√1 p8 +p7 + √1 p6 + √1 p4 +p3 + √1 p2
2 2 2 2
ϕ1 = √4 +2
2

Here the pixels are from T2 in x direction.


√1 p8 +p1 + √1 p2 + √1 p4 +p5 + √1 p6
2 2 2 2
ψ1 = √4 +2
2

Here the pixels are from T2 in y direction.


1
ϕ2 = 10 [p24 + p23 + p22 + p21 + p20 + p16 + p15 + p14 + p13 + p12 ]
1
ψ2 = 10 [p24 + p9 + p10 + p11 + p12 + p16 + p17 + p18 + p19 + p20 ]
Both of the above terms are average of all the pixels in the 2nd layer
of T2 in x and y direction respectively.
Now ,
ϕ = ϕ1 +ψ
2
2

ψ = ψ1 +ψ
2
2
Then ,
ϕ+ψ
f (ϕ, ψ)
( = 2 and then we calculate the partial derivatives
1
∂f 2; pc − ϕ1 ≥ 0
∂x = 1
− 2 ; p c − ϕ1 < 0
(
1
∂f 2; pc − ψ1 ≥ 0
∂y =
− 12 ; pc − ψ1 < 0
(
1
2
∂ f 4; (pc − ϕ1 )(pc − ϕ2 ) ≥ 0
∂x 2 =
− 14 ; (pc − ϕ1 )(pc − ϕ2 ) < 0
(
1
2
∂ f 4; (pc − ϕ1 )(pc − ϕ2 ) ≥ 0
∂y 2 =
− 14 ; (pc − ϕ1 )(pc − ϕ2 ) < 0
(
1
2
∂ f 4; (pc − ϕ2 )(pc − ψ2 ) ≥ 0
∂x∂y =
− 41 ; (pc − ϕ1 )(pc − ψ2 ) < 0

Now the last step is taylor feature pattern generation. We will map all
the face images into pixel taylor feature space and the resulting image
gets seperated by blocks.
Now , we will look into the 2D taylor feature pattern of each taylor
feature and the formula is very similar to 1D.

P8 m
TFP of 2D = m=1 S(fn (pc ), fn (pm )))2 −1
n
where S(pc , pm ) = 1; pc ≥ pm 0; otherwise

Using this formula 2D TFP of each pixel of each block is calculated


and then they are merged and final result will be stored in a histogram
which will help us recognise a person’s emotion using just the image
and the features of his/her face.

Module 2: Integral Calculus


Problem 1 :
Set up the integral of f(x,
p y, z) over W, the solid ”ice cream
p cone”
bounded by the cone z = x + y and the half sphere z = 1 − x2 − y 2 .
2 2

The cone is pictured below.


Three Dimensional View of Ice Cream Cone

Ice Cream Cone Region :- It is bounded above by the


p p half-sphere z =
1 − x − y and bounded below by the cone z = x2 + y 2 .
2 2

Ice Cream Cone Region


Solution
Hence lets use the shadow method for the solution of this problem.
The shadow helps us out in finding the bounds for the integral.

It basically helps us in writing by writing triple integration as a double


integral on the outside and a single integral on the inside of the form.

ZZ Ztop
f (x, y, z)
shadowbottom

p
Consider the z - axis as the vertical so that the
p cone z = x2 + y 2
becomes the bottom and half the sphere z = 1 − x2 − y 2 becomes
the top of the ice cream cone W. Hence W is the surface between these
two surfaces.

p p
x2 + y 2 ≤ z ≤ 1 − x2 − y 2 (2)

Hence this inequalities tends to give the range of z in terms of x and


y and thus they bound the inner integral with respect to z as below
form √ 2 2
1−x −y
Ztop Z
f (x, y, z) = f (x, y, z) dz.
bottom
√2 2
x +y

Here the region W is set of the points satisfying the inequalities in


Eq.(1) while x and y are the range over the shadow of the ice cream
that lies parallel to xy plane. It is showed in the below figure as the
cyan circle disc below.
Cyan colored shadow

Ice Cream Cone region with shadow :


The
p ice cream cone region is bounded above p by the half-sphere z =
1 − x − y bounded below by the cone z= x2 + y 2 . The two sur-
2 2

faces have a intersection along a circle x2 + y 2 = 12 and z = √12 which


is the widest part of the ice cream cone. Hence shadow of the cone is
parallel to the xy plane in the form of the disc have radius ≤ √12 .

The maximal range of x and y occurs where there is the intersection


between two surfaces it suggests that the surface where the ice cream
meets cone.
Hence this surface is the form of the circle as seen in the figure.Hence
the surfaces meet when
p p
x2 + y 2 = 1 − x2 − y 2
which means
x2 + y 2 = 1 − x2 − y 2
or
1
x2 + y 2 =
2
Saying it more in mathematical sense, it contains any point (x, y, z)
from the ice cream cone satisfying the inequality
1
x2 + y 2 ≤ (3)
2

Hence a circle in xy-plane with radius √1


2

Circle formed by the shadow

Hence finding the rest of bounds for integral values become quite easier
from this shadow region inequality as in Eq.(2).
Now we will consider y to be the interior integral of the double integral.
Hence we need to describe the range of y from the shadow region as a
function of x. So for this we rewrite inequality as
r r
1 1
− − x2 ≤ y ≤ − x2 (4)
2 2

Hence this range gives bounds of the inner integral of the double inte-
gral. And for the bounds of the outer integrals the maximal range of x
is required. From the inequality Eq.(2) we can say that maximal value
of x occurs when y becomes 0. Hence x2 ≤ 12 . Therefore the maximal
range of x can be return as
1 1
−√ ≤ x ≤ √
2 2

Hence the double integral of x and y is as follow


√1 2
ZZ Z √1 Z2 −x
2
f (x, y, z) dy dx = f (x, y, z) dy dx
− √12 √
shadow − 1 2
2 −x

Hence we have found bounds of all the three integrals. Combining all
the limits together with the shadow limits, the ice cream cone can be
represented by the inequalities as below

1 1
−√ ≤ x ≤ √
2 2
r r
1 1
− − x2 ≤ y ≤ − x2
2 2
p p
x2 + y 2 ≤ z ≤ 1 − x2 − y 2
And the integral function f(x, y, z) over W is
√1 2 √ 2 2
ZZZ Z √1 Z2 −x 1−x −y f (x,y,z) dz dy dx
Z
2
f dV =
− √12 √ √2 2
W 1 2 − 2 −x x +y

For finding the volume consider the f(x, y, z) = 1 and perform the
integration.
√1 2 √ 2 2
Z √1 Z2 −x 1−x −y
Z
2
V olume = dz dy dx
− √12 √ √2 2
1 2 − 2 −x x +y

Problem on spherical coordinates:


Evalute the following integral:

Z 0 Z √
1−x 2 Z √7−x 2 −y 2
√ √ 18y dz dy dx
−1 − 1−x 2 6x 2 +6y 2

Solution :
Now , converting the coordinates into spherical coordinates makes the
problem a lot easier. First , let’s consider the z limits.

√ −1 ≤ x ≤ √ 0
2 2
p − 1 − x ≤ y ≤p 1 − x
6x2 + 6y 2 ≤ z ≤ 7 − x2 − y 2
p
z= 7 − x2 − y 2

is an equation of upper portion of the sphere with radius 7 and
p
z = 6x2 + 6y 2

is an equation of cone.
From that we get ,

0≤ρ≤ 7
For the limits of φ , we will again
p consider the cone’s equation which
is the lower limit for z.Putting x2 + y 2 = r and r = ρ sin φ , we get

√ 1
ρ cos φ = 6ρ sin φ → So, tan φ = √
6
 
−1 1
then, φ = tan √ = 0.3876
6
So , we get the limits of φ from 0 to 0.3876.

Now , we get the θ limits


Observe
√ −1 ≤ x ≤ √
0
− 1 − x ≤ y ≤ 1 − x2
2

y limits tells us that we are inside a circle of radius 1 and we also know
that intersection of sphere and cone will lead us to a circle. x limits
tells us that we should take left side of the circle. So , based on that ,
π 3π
≤θ≤
2 2
So , we have gotten all the three coordinates.
Z Z √ 2Z √ 2 2
0 1−x 7−x −y

√ √ 18y dz dy dx
−1 − 1−x 2 6x 2 +6y 2



Z 0.3876 Z 2
Z 7
(18ρ sin φ sin θ) ρ2 sin φ dρ dθ dφ

=
π
0 2 0


Z 0.3876 Z 2
Z 7
= 18ρ3 sin2 φ sin θ dρ dθ dφ
π
0 2 0
Z 0.3876 Z 3π   √7
2 9 4 2
= ρ sin φ sin θ dθ dφ
0 π
2
2 0

Z 0.3876 Z
441 2 2
= sin φ sin θ dθ dφ
0 π
2
2
Z 0.3876   3π2
441 2
= − sin φ cos θ dφ
0 2 π
2
Z 0.3876
= 0 dφ = 0
0

Problem 3 :
Evaluate the triple integral
ZZZ p
x2 + z 2 dV
E

where E is the region bounded by the paraboloid y = x2 + z 2 and


the plane y = 4
Triple Integrating over the region of Paraboloid

Solution :
The region above y = 4 and below the parabola y = x2 that defines
the solid region E’s projection onto the xy-plane is shown below.

Projection of Paraboloid on the xy plane

Thus we have
p p
2
E = {(x, y, z)| − 2 ≤ x ≤ 2, x ≤ y ≤ 4, − y − x ≤ z ≤ y − x2 }.
2
The triple integration becomes as follows

x=2 y=4 z= y−x2
ZZZ p Z Z Z p
2 2
x + z dV = x2 + z 2 dz dy dx
E x=−2 y=x2
√ 2
z=− y−x

It seems really hard to compute this equation. Hence to make it simpler


consider the projection of E onto the xz - plane which will form the
circular disc x2 + z 2 ≤4. Hence the equation becomes

√ 2
ZZZ p Zx=2 Zy=4 z= Z y−x p
x2 + z 2 dV = x2 + z 2 dz dy dx
E x=−2 y=x2 z=−

y−x2


Zx=2 z=Z 4−x2 Zy=4 p
= x2 + z 2 dy dz dx

x=−2 z=− 4−x2 y=x2 +z 2

Here the order of the integration changes to first with respect to y,


second with respect to z and third with respect to x from the initial
order that is first with respect to z, second with respect to y and third
with respect to x.

In the upcoming steps of the computation it will be clear how this will
be useful for us in easy computation.
Now integrating firstly with respect to y we obtain
√ √
Zx=2 z=Z 4−x2 Zy=4 p Zx=2 z=Z 4−x2
p
2 2
x2 + z 2 dy dz dx = (4−x −z ) x2 + z 2 dz dx
√ √
x=−2 z=− 4−x2 y=x2 +z 2 x=−2 z=− 4−x2

Now further simplification of the calculation lets use the polar substi-
tution for x and z as follows

x = r cos θ
z = r sin θ

And hence
dz dx = r dr dθ

This is the same thing which we used in the polar coordinates of xy


plane instead here is xz plane. Hence there is change in limits of the
earlier equation by using the referral equation

r2 = x2 + z 2

Hence the calculation steps become as under



Zx=2 z=Z 4−x2 θ=2π
Z Zr=2
p
(4 − x2 − z 2 ) x2 + z 2 dz dx = (4 − r2 )rr dr dθ

x=−2 z=− 4−x2 θ=0 r=0

Z2/pi" 3
# 5 2
4r r
= − dθ
3 5 0
0
Z2π
64
= dθ
15
0
128π
=
15

Module 3: Vector Calculus


Deriving differential forms of maxwell’s equations
• Ampere’s law Ampere’s law is given by
I Z
d
· = µo i + µo ϵo ·n̂ dA
dt A

We will use Stokes theorem to convert the line integral into sur-
face integral. Also , As the integration is happening over space ,
d/dt can go inside the integral and it won’t affect anything. So
, because we don’t want any changes we write d/dt in the form
of partial derivation when we send it inside the integral.
Z Z Z ⃗
∂E
⃗ Bn̂
∇ ⃗ dA = µo J⃗ · n̂ dA + µo ϵo · n̂ dA
A A A ∂t

Z ⃗
⃗B
(∇ ⃗ − µo J⃗ − µo ϵo ∂ E ) · n̂ dA = 0
A ∂t


⃗B
∇ ⃗ = µo J⃗ + µo ϵo ∂ E ..........(∗)
∂t
Equation * represents the differential form of ampere’s law.
• Gauss law in Electric field
Gauss law in electric field is given by
I
⃗ · n̂dA = qen
E
ϵ

Now we will use divergence theorem to convert the surface in-


tegral into volume integral. So on applying divergence theorem,
we get
Z Z
⃗ · EdV
⃗ 1
∇ = ρdV
Z V ϵ V
⃗ − 1 ρ)dv = 0
⃗ ·E
(∇
V ϵ

Above equation will imply that

⃗ =ρ
⃗ ·E

ϵ
Above equation represents the Gauss law in electric field in dif-
ferential form.
• Gauss law in Magnetic field
Gauss law in Magnetic field is given by
I
⃗ · n̂dA = 0
B

Similarly here we will use divergence theorem to convert the sur-


face integral to volume integral. So on applying divergence the-
orem, we get
Z
⃗ · BdV
∇ ⃗ =0
V

Above equation implies that

⃗ ·B
∇ ⃗ =0

Above equation represents the Gauss law in magnetic field in


differential form.
• Faraday’s law
Faraday’s law is given by
I Z
⃗ · dr = − d
E ⃗ · n̂dA
B
dt A

Now as the integration is happening over space, d/dt can go


inside the integral and it won’t affect anything. So now equation
can be re-write as

I Z ⃗
dB
⃗ · dr = −
E · n̂dA
A dt

Now we will convert the use the stoke’s theorem to convert line
integral to surface integral. So on applying the stoke’s theorem,
we get

Z Z ⃗
dB
⃗ ×E
∇ ⃗ · n̂dA = − · n̂dA
A A dt
Z ⃗
⃗ + dB ) · n̂dA = 0
⃗ ×E
(∇
A dt
Above equation will imply that


⃗ = − dB
⃗ ×E

dt
Above equation represents the faraday’s law in differential form.

Module 4: Partial Differential Equation


Problem Statement :
Solve the wave equation using D’Alembert’s formula which will also
include to solve side conditions.

Solution:
We know that we can solve the wave equation by using fourier series.
But it is more convenient to use the D’alemberts solution to solve the
wave equation.
Suppose we wish to solve the wave equation

ytt = c2 yxx

subject to the given constraints

y(0, t) = 0, y(L, t) = 0 for all t,


y(x, 0) = f (x) 0 < x < L,
yt (x, 0) = g(x) 0 < x < L.

Now, we transform the equation into simpler forms. So we will change


the variables to u = x + at and v = x − at.
Now first of all, we will calculate yx and yt by differentiating y with
respect to x and t respectively. According to chain rule, we get

yx = yu ux + yv vx
yx = yu + yv
yt = yu ut + yv vt
yt = a(yu − yv )

Now we will find yxx and ytt .

yxx = yuu + 2yuv + yvv


ytt = a2 (yuu − 2yuv + yvv )

Now on putting the value of yxx and ytt in wave equation, we get yuv = 0
which will give

y = ϕ(u) + ψ(v)
(5)
y = ϕ(x + at) + ψ(x − at)

The above equation is a D’alemberts solution of wave equation.


Now, we will apply the initial conditions on the above equation. On
applying y(x, 0) = f (x) will give us

ϕ(x) + ψ(x) = f (x)

Similarly on applying yt (x, 0) = g(x) will give us

′ ′ g(x)
ϕ (x) − ψ (x) =
c
On Integrating above equation both sides by taking limits from x0 to
x ,we get

1 x
Z
ϕ(x) − ψ(x) = ϕ(x0 ) − ψ(x0 ) + g(s)ds
a x0
1 x
Z
ϕ(x) − ψ(x) = k(x0 ) + g(s)ds
a x0

On solving above equation for ϕ and ψ, we get


Z x
1 1
ϕ(x) = (f (x) + k(x0 )) + g(s)ds
2 2a x0
Z x
1 1
ψ(x) = (f (x) − k(x0 )) − g(s)ds
2 2a x0

So , now we put value of ϕ and ψ in eq(1) to get


Z x+at
1 1
y(x, t) = [f (x + at) + f (x − at)] + g(s)ds
2 2a x−at

we can see that the value of y(xp , tp ) depends on the initial data F
at points xp + atp and xp − atp . The interval l = [xp − at, xp + at] is
called the domain of dependence of the solution at point (xp , tp ).The
range of influence R of point P (xp , tp ) is defined as the region of the
solution domain in which the solution is influenced by the solution at
point P (xp , tp ). It is given in the figure given below:
If g(x) = 0, then f(x) is given by

1
y(x, t) = [f (x + at) + f (x − at)]
2
Figure 7: Domain of Independence I , Range of Influence R

It is easy to observe that f must be odd and have period of 2L under


the boundary conditions.
Now let’s solve one problem to understand the concept of D’alemberts
equation better.

Question 1:
Solve the problem

∂ 2y 2
2∂ y
=c , −∞ < x < ∞, t > 0
∂t2 ∂x2
u(x, 0) = F (x), −∞ < x < ∞
ut (x, 0) = 0, −∞ < x < ∞

where

0, −∞ < x < π

F (x) = A sin(x), −π < x < π

0, −π < x < ∞

Solution:
The function F(x) is only non-zero in the finite interval −π < x < π.
According to D’alemberts equation, solution is given by

1
y(x, t) = [F (x + ct) + F (x − ct)]
2
In order to handle the piecewise nature of the function F(x), we can
use Heavyside step function define as .
(
0, x < a
H(x − a) =
a, x > a

So Now we will re define the function F(x) as given below:

F (x) = [h(x + π) − h(x − π)]A sin x

So now solution can be written as

A
y(x, t) = [h(x + ct + π) − h(x + ct − π)] sin(x + ct)+
2
A
[h(x − ct + π) − h(x − ct − π)] sin(x − ct)
2
For c = 1, the solution looks like
A
y(x, t) = [h(x + t + π) − h(x + t − π)] sin(x + t)+
2
A
[h(x − t + π) − h(x − t − π)] sin(x − t)
2
Now, let us see the behaviour of the y at different times by taking
A = 1. Figure given below represents the behaviour of function y at
different times.

Figure given above represents that how the initial sinusodial wave de-
composes into two opposite moving waves with unit speed c = 1. After
both the waves seperating at t = π , each wave become the replica of
the initial wave profile with half of its amplitude.
Let us consider the case that when f (x) = 0 , then what will be the
solution of D’alemberts equation.
Figure 8: u(x,t) (solid) showing the average of the two profiles F(x +
ct) and F(x-ct) (dashed)

D’alembert’s solution when f = 0


We consider the initial value problem as

∂ 2y 2
2∂ y
=c , −∞ < x < ∞, t > 0
∂t2 ∂x2
y(x, 0) = 0, −∞ < x < ∞
yt (x, 0) = G(x), −∞ < x < ∞

In this case, D’alemberts solution assumes the form


1 x+ct
Z
y(x, t) = G(s)ds
2c x−ct
1
y(x, t) = [g(x + ct) − g(x − ct)]
2
where ,
Z x
1
g(x) = G(s)ds
c x0

Fundamental Solution:
Let us consider an infinite string with initial displacement equal to 0
and initial velocity given by an impulse function at x0 = 0. It means,

∂ 2y 2∂ y
2
−c = 0, −∞ < x < ∞, t > 0
∂t2 ∂x2
f (x) = 0
g(x) = δ(x)

where δ is the Dirac delta function which is defined as


(
∞, x = 0
δ(x) =
0, x ̸= 0
R∞
It has a property that −∞ δ(x)dx = 1. We will calculate g(x) as
follows.
Z x
1
g(x) = δ(s)ds
c −∞
(
1 0, −∞ < x < 0
g(x) = ×
c 1, 0 < x < ∞
1
g(x) = H(x)
c
where H is the Heavyside function. Hence the solution will be given
by

1
u(x, t) = [g(x + ct) − g(x − ct)]
2
1
u(x, t) = [H(x + ct) − H(x − ct)]
2c
This is called the fundamental solution of the wave equation.
Let us solve one problem based on the above concept to get better
understanding.

Question 2:
Consider an infinite string with zero initial displacement and initial
velocity given by the square wave function. That is, we have F(x) = 0
and

0, −∞ < x < −1

G(x) = 1, −1 ≤ x ≤ 1

0, 1 < x < ∞

Solution :
We can represent function G(x) by making use of Heavyside step func-
tion which is given below.

G(x) = H(x + 1) − H(x − 1)

The Initial velocity profile is given in the figure given below:

Figure 9: Initial velocity profile G(x)

We will now calculate g(x)


Z x
1
g(x) = G(s)ds
c −∞
R x
0ds = 0, −∞ < x < −1
1 R−∞

−1 Rx
g(x) = × −∞ 0ds + −1 1ds = x + 1, −1 < x < 1
c  R −1 0ds + R 1 1ds + R x 0ds = 2, 1 < x < ∞
−∞ −1 1

0, −∞ < x < −1

g(x) = x+1c , −1 < x < 1
2, 1 < x < ∞

c
1 2
g(x) = [H(x + 1) − H(x − 1)](x + 1) + H(x − 1)
c c
1
g(x) = [(x + 1)H(x + 1) − (x − 1)H(x − 1)]
c
Therefore , solution will be of the form

1
u(x, t) = [g(x + ct) − g(x − ct)]
2

1
u(x, t) = [(x + ct + 1)H(x + ct + 1) − (x + ct − 1)H(x + ct − 1)]
2c

1
− [(x − ct + 1)H(x − ct + 1) − (x − ct − 1)H(x − ct − 1)]
2c
For c = 1 , the solution becomes

1
u(x, t) = [(x + t + 1)H(x + t + 1) − (x + t − 1)H(x + t − 1)]
2
1
− [(x − t + 1)H(x − t + 1) − (x − t − 1)H(x − t − 1)]
2
The graph of the function u at different time t is given below:
The effect of an initial velocity G is a wave spreading out at speed
c in opposite direction along the x-axis. After some time t , the two
functions g(x)/2 and -g(x)/2 move a distance ct. The string will reach
a state of rest as t tends to infinity with residual displacement , ust = 1.
Figure 10: u(x,t) (solid) showing the average of the two profiles F(x +
ct) and F(x-ct) (dashed)

Fourier Series & Transform Application :


For a piecewise continuous and smooth function f(x) defined on -L ≤
x L the Fourier series representation is

∞ ∞
f (x) + f (−x) X nπx X nπx
= a0 + an cos + bn sin
2 n=1
L n=1
L

where
ZL
1
a0 = f (x) dx
2L
−L
ZL
1 nπx
an = f (x) cos dx
L L
−L

ZL
1 nπx
bn = f (x) sin dx
L L
−L

Fourier Transform of f(x) as the function F(x) is below


Z∞
γ
F (ω) = F (x̄)e−ιωx̄ dx̄ (6)

−∞

Inverse Fourier Transform of F(ω) is represented as below

Z∞
f (x) + f (−x) 1
= F (ω)eιωx dω (7)
2 γ
−∞

Hence the Equation pair of equation (4) and equation (5) is known as
Fourier Transform Pair. With the help of all these equation we will
find some of the application of Fourier Transforms in some of the fields
as below :

Inverse Fourier Transform of a Gaussian


Function of the types
2
G(ω) = e−αω
where α > 0 is a constant are generally termed as Gaussian func-
tions.The function g(x) whose Fourier Transform G(ω) is given by the
inverse Fourier Transform Formula
Z∞ Z∞
2
g(x) = G(ω)e−ιωx dω = e−αω e−ιωx dω
−∞ −∞

The last integral in the above equation can be evaluated to get the
following equation r
π −x2
g(x) = e 4α
α
which shows that the inverse Fourier transform of a Gaussian is itself
a Gaussian.

Let α = kt in the above equations, then substituting them we get


Z∞ r
2 π −x2
e−kω t e−ιωx dω = e 4kt
kt
−∞

Hence replacing it in the g(x) equation as arrived before


r
π −x2
g(x) = e 4kt
kt

The solution u(x, t) is obtained by replacing the above equation in the


main gaussian type equation,
Z∞ r
1 π −(x−x̄)2
u(x, t) = f (x̄) e 4kt dx̄
2π kt
−∞

which can also be written as


Z∞
1 −(x−x̄)2
u(x, t) = f (x̄) √ e 4kt dx̄
4πkt
−∞
Hence This is the final solution for the Gaussian Function which on
certain condition can also give the fundamental solution of the heat
equation.

Laplace’s equation in a half plane


∂ 2u ∂ 2u
∇2 u = + =0
∂x2 ∂y 2

We are only considering half plane so x lies between −∞ to ∞ and y¿0.

Boundary conditions are :

u(x, 0) = f (x)

limx→∞ u(x, y) = 0
limx→−∞ u(x, y) = 0
limy→∞ u(x, y) = 0

Let’s consider the fourier transform


Z ∞
u(x, y) = U (w, y)e−iwx dx
−∞

Z ∞
1
U (x, y) = u(x, y)eiwx dx
2π −∞

Taking the fourier transform of laplace equation in x we get the ordi-


nary differential equation ,

∂ 2U
2
− w2U = 0
∂y
Finding it’s general solution , we get

U (w, y) = a(w)ewy + b(w)e( − wy)

Put boundary conditions,

limy→∞ u(x, y) = 0

limy→∞ U (x, y) = 0
ans so a(w)=0 of w¿0 and b(w)=0 if w¡0. So ,
(
a(w)ewy ; w < 0
U (w, y) =
b(w)e−wy ; otherwise

Basically ,
U (w, y) = c(w)e−|w|y
where c(w) becomes a(w) when w < 0 and when w > 0 c(w)=b(w).
According to boundary conditions , we can say that
Z ∞
1
U (w, 0) = F|f (x)| = f (x)eiwx dx
2π −∞

c(w) is a fourier transform of f(x)


Z ∞
1
c(w) = f (x)eiwx dx
2π −∞

Work Contribution :
Module 1 - Equally Contributed
Module 2 -

Problem 1,3 - 202103037 - Srushti

Problem 2 - 202103006 - Arman

Module 3 -

Theorem Ampere - 202103006 - Arman

Rest all theorems - 202103050 - Harsh

Module 4 -

Part 1 - Fourier Application - Inverse Fourier Transform of Gaussian -


202103037 - Srushti

Part 1 - Fourier Application - Laplace’s Equation in Half Plane -


202103006 - Arman

Part 2 - D’alemberts Solution - 202103050 - Harsh

You might also like